るりまサーチ

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

別のキーワード

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

キーワード

検索結果

<< < 1 2 >>

OpenStruct#eql?(other) -> bool (3004.0)

self と other が等しい場合に true を返します。そうでない場合は false を 返します。

...self と other が等しい場合に true を返します。そうでない場合は false を
返します。

具体的には other が OpenStruct オブジェクトかそのサブクラスでかつ、
self の各要素を保持した内部の Hash が eql? で比較して等しい場合に
true...

OpenStruct#hash -> Integer (3004.0)

self のハッシュ値を返します。

self のハッシュ値を返します。

OpenStruct#inspect -> String (3004.0)

オブジェクトを人間が読める形式に変換した文字列を返します。

オブジェクトを人間が読める形式に変換した文字列を返します。

@see Object#inspect

OpenStruct#modifiable -> Hash (3004.0)

このメソッドは内部的に使用されます。

このメソッドは内部的に使用されます。

自身が Object#freeze されている場合にこのメソッドを呼び出すと例外が発生します。

@raise TypeError 自身が Object#freeze されている場合に発生します。

OpenStruct#to_h -> { Symbol => object } (3004.0)

self を各要素の名前をキー(Symbol)、要素が値のハッシュに変換して返 します。

...self を各要素の名前をキー(Symbol)、要素が値のハッシュに変換して返
します。


//emlist[例][ruby]{
require 'ostruct'
data = OpenStruct.new("country" => "Australia", :capital => "Canberra")
data.to_h # => {:country => "Australia", :capital => "Canberra" }
//}...
...指定すると各ペアでブロックを呼び出し、
その結果をペアとして使います。

//emlist[例][ruby]{
require 'ostruct'
data = OpenStruct.new("country" => "Australia", :capital => "Canberra")
data.to_h # => {:country => "Australia", :capital => "Canberra" }
data.to_h {|name...

絞り込み条件を変える

OpenStruct#to_h {|name, value| block } -> Hash (3004.0)

self を各要素の名前をキー(Symbol)、要素が値のハッシュに変換して返 します。

...指定すると各ペアでブロックを呼び出し、
その結果をペアとして使います。

//emlist[例][ruby]{
require 'ostruct'
data = OpenStruct.new("country" => "Australia", :capital => "Canberra")
data.to_h # => {:country => "Australia", :capital => "Canberra" }
data.to_h {|name...

OpenStruct#to_s -> String (3004.0)

オブジェクトを人間が読める形式に変換した文字列を返します。

オブジェクトを人間が読める形式に変換した文字列を返します。

@see Object#inspect
<< < 1 2 >>