1件ヒット
[1-1件を表示]
(0.016秒)
検索結果
-
Struct
# deconstruct _ keys(array _ of _ names) -> Hash (99712.0) -
self のメンバの名前と値の組を Hash で返します。
self のメンバの名前と値の組を Hash で返します。
@param array_of_names 返り値に含めるメンバの名前の配列を指定します。nil の場合は全てのメンバを意味します。
//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
h = joe.deconstruct_keys([:zip, :address])
h # => {:zip=>12345, :address...