るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.143秒)
トップページ > クエリ:i[x] > クエリ:l[x] > クエリ:INTEGER[x] > クラス:Struct[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. ipaddr to_i

ライブラリ

キーワード

検索結果

Struct#length -> Integer (6303.0)

構造体のメンバの数を返します。

... Struct の下位クラスのインスタンスに対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してください。

//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
joe = Customer.new("Joe Smith", "123 Mapl...
...e, Anytown NC", 12345)
joe.length #=> 3
//}...

Struct#size -> Integer (6203.0)

構造体のメンバの数を返します。

... Struct の下位クラスのインスタンスに対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してください。

//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
joe = Customer.new("Joe Smith", "123 Mapl...
...e, Anytown NC", 12345)
joe.length #=> 3
//}...