Ruby 1.9.3 リファレンスマニュアル > ライブラリ一覧 > matrixライブラリ > Matrixクラス > each

instance method Matrix#each

each {|e| ... } -> self

[TODO]

Yields all elements of the matrix, starting with those of the first row, or returns an Enumerator is no block given

Matrix[ [1,2], [3,4] ].each { |e| puts e }
 # => prints the numbers 1 to 4
class Matrix