るりまサーチ

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

別のキーワード

  1. struct new
  2. mkmf have_struct_member
  3. struct []
  4. struct each
  5. struct members

ライブラリ

検索結果

Struct#[]=(member, value) (27143.0)

構造体の member で指定されたメンバの値を value にして value を返します。

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

//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
joe = Customer.new("Joe Smith...