るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.037秒)
トップページ > バージョン:2.4.0[x] > クエリ:@[x] > クエリ:self[x] > ライブラリ:ostruct[x]

別のキーワード

  1. object yield_self
  2. _builtin yield_self
  3. _builtin self
  4. tracepoint self
  5. codeobject document_self

クラス

キーワード

検索結果

OpenStruct#dig(key, ...) -> object | nil (91.0)

self 以下のネストしたオブジェクトを dig メソッドで再帰的に参照して返し ます。途中のオブジェクトが nil であった場合は nil を返します。

...す。途中のオブジェクトが nil であった場合は nil を返します。

@param key キーを任意個指定します。

require 'ostruct'
address = OpenStruct.new('city' => "Anytown NC", 'zip' => 12345)
person = OpenStruct.new('name' => 'John Smith', 'address' => address)
per...

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

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

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

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

@param other 比較対象のオブジェクトを指定します。