るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.127秒)
トップページ > クエリ:-[x] > クエリ:ruby[x] > クエリ:h[x] > クエリ:with_defaults[x]

別のキーワード

  1. _builtin to_h
  2. array to_h
  3. struct to_h
  4. hash to_h
  5. ostruct to_h

ライブラリ

クラス

検索結果

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

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

...t[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
arguments.to_hash # => {:name1=>"value1", :name2=>"value2"}
arguments.with_de...
...faults({ default_key: "default_value"}) # => {:default_key=>"default_value", :name1=>"value1", :name2=>"value2"}
arguments.to_hash # => {:default_key=>"default_value", :name1=>"value1", :name2=>"value2"}
end
//}...