るりまサーチ

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

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. argf.class to_a

ライブラリ

クラス

キーワード

検索結果

Rake::TaskArguments#to_hash -> Hash (27308.0)

パラメータ名と対応する値を格納したハッシュを返します。

...納したハッシュを返します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
a
rguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
a
rguments.to_hash # => {:name1=>"value1", :name2=>"value2"}
end
//}...

JSON::State#to_hash -> Hash (24302.0)

自身をハッシュに変換します。

...e "json"
require "pp"

json_state = JSON::State.new
pp json_state.to_h

# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,
# :max_nesting=>100,
# :depth=>0,
# :buffer_initial_length=>...

Rake::TaskArguments#with_defaults(defaults) -> Hash (9213.0)

パラメータにデフォルト値をセットします。

...@param defaults デフォルト値として使用するキーと値を格納したハッシュを指定します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
a
rguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value...
...2"])
a
rguments.to_hash # => {:name1=>"value1", :name2=>"value2"}
a
rguments.with_defaults({ default_key: "default_value"}) # => {:default_key=>"default_value", :name1=>"value1", :name2=>"value2"}
a
rguments.to_hash # =...
...> {:default_key=>"default_value", :name1=>"value1", :name2=>"value2"}
end
//}...

JSON::State#to_h -> Hash (6102.0)

自身をハッシュに変換します。

...e "json"
require "pp"

json_state = JSON::State.new
pp json_state.to_h

# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,
# :max_nesting=>100,
# :depth=>0,
# :buffer_initial_length=>...