Ruby 2.2.0 リファレンスマニュアル > ライブラリ一覧 > matrixライブラリ > Vectorクラス > size

instance method Vector#size

size() -> Integer[permalink][rdoc]

ベクトルの要素数(次元)を返します。