るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.140秒)

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. l

ライブラリ

検索結果

Struct#each {|value| ... } -> self (108.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.each {|x| puts(x) }

# => Joe Smith
# 123 Maple, Anytown NC
# 12345
//}...