335件ヒット
[1-100件を表示]
(0.086秒)
ライブラリ
- ビルトイン (30)
-
json
/ add / ostruct (24) - ostruct (209)
- rake (36)
クラス
- Array (10)
- Hash (10)
- OpenStruct (221)
-
Rake
:: Application (12) - Struct (10)
モジュール
- Rake (24)
キーワード
- == (12)
- InspectKey (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (5) - [] (12)
- []= (12)
- application (12)
- application= (12)
-
delete
_ field (12) - dig (40)
-
each
_ pair (24) - eql? (12)
- hash (12)
- inspect (12)
-
json
/ add / ostruct (12) -
json
_ create (12) - modifiable (12)
- new (12)
-
new
_ ostruct _ member (12) -
to
_ h (19) -
to
_ json (12) -
to
_ s (12)
検索結果
先頭5件
-
OpenStruct (44042.0)
-
要素を動的に追加・削除できる手軽な構造体を提供するクラスです。
...的に追加・削除できる手軽な構造体を提供するクラスです。
OpenStruct のインスタンスに対して未定義なメソッド x= を呼ぶと、
OpenStruct クラスの BasicObject#method_missing で捕捉され、そのインスタンスに
インスタンスメソッド x......require 'ostruct'
ab = OpenStruct.new
ab.foo = 25
p ab.foo # => 25
ab.bar = 2
p ab.bar # => 2
p ab # => <OpenStruct foo=25, bar=2>
ab.delete_field("foo")
p ab.foo # => nil
p ab # => <OpenStruct bar=2>
初期化にハッシ......on = OpenStruct.new({ :name => "Thomas", :age => 3 })
p son.name # => "Thomas"
p son.age # => 3
son.age += 1
p son.age # => 4
son.items = ["candy","toy"]
p son.items # => ["candy","toy"]
p son # => #<OpenStruct name="Thomas", age=4, items=["cand... -
OpenStruct
:: InspectKey -> : _ _ inspect _ key _ _ (30200.0) -
内部的に使用する定数です。
内部的に使用する定数です。 -
OpenStruct
# inspect -> String (30100.0) -
オブジェクトを人間が読める形式に変換した文字列を返します。
...オブジェクトを人間が読める形式に変換した文字列を返します。
@see Object#inspect... -
OpenStruct
. new(hash = nil) -> OpenStruct (27229.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 (27223.0) -
JSON のオブジェクトから OpenStruct のオブジェクトを生成して返します。
...JSON のオブジェクトから OpenStruct のオブジェクトを生成して返します。
@param hash OpenStruct.new に指定可能な値をキー 't' もしくは :t に持つハッシュを指定します。... -
OpenStruct
# new _ ostruct _ member(name) -> Symbol (27100.0) -
与えられた名前のアクセサメソッドを自身に定義します。
...与えられた名前のアクセサメソッドを自身に定義します。
@param name 文字列かシンボルで定義するアクセサの名前を指定します。... -
OpenStruct
# to _ json(*args) -> String (27100.0) -
自身を JSON 形式の文字列に変換して返します。
...身を JSON 形式の文字列に変換して返します。
内部的にはハッシュにデータをセットしてから JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。
@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json に渡され......ます。
@see JSON::Generator::GeneratorMethods::Hash#to_json... -
OpenStruct
# to _ s -> String (27100.0) -
オブジェクトを人間が読める形式に変換した文字列を返します。
...オブジェクトを人間が読める形式に変換した文字列を返します。
@see Object#inspect... -
NEWS for Ruby 2
. 0 . 0 (26060.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......トは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 1.9.3 以降の変更
=== 言語仕様の変更
* キーワード引数を追加しました
* %i, %I をシンボルの配列作成のために追加しました。(%w, %W に似ています)
*......ions where FIPS mode would be an
explicit requirement.
* Authenticated Encryption with Associated Data (AEAD) is supported via
Cipher#auth_data= and Cipher#auth_tag/Cipher#auth_tag=.
Currently (OpenSSL 1.0.1c), only GCM mode is supported.
* ostruct
* 追加: OpenStruct#[...