るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.078秒)
トップページ > 種類:特異メソッド[x] > クエリ:new[x] > バージョン:2.5.0[x] > クラス:OpenStruct[x]

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

ライブラリ

検索結果

OpenStruct.new(hash = nil) -> OpenStruct (54328.0)

OpenStruct オブジェクトを生成します。

...
OpenStruct
オブジェクトを生成します。

ハッシュが与えられたとき、それぞれのキーを生成したオブジェクトの要素にし、値をセットします。

@param hash 設定する要素とその値を指定します。
hash には Hash クラスのイン...
...たは each_pair メソッ
ドを持つオブジェクトを用いる事ができます。
@raise NoMethodError hash のキーが to_sym メソッドを持たないときに発生します。

require 'ostruct'
some1 = OpenStruct.new({:a =>"a",:b =>"b"}) # => #<OpenStruct b="b", a="a">...

OpenStruct.json_create(hash) -> OpenStruct (25.0)

JSON のオブジェクトから OpenStruct のオブジェクトを生成して返します。

...JSON のオブジェクトから OpenStruct のオブジェクトを生成して返します。

@param hash OpenStruct.new に指定可能な値をキー 't' もしくは :t に持つハッシュを指定します。...