るりまサーチ

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

別のキーワード

  1. util u
  2. matrix u
  3. erb u
  4. encoding koi8_u
  5. _builtin koi8_u

検索結果

<< 1 2 3 > >>

Gem::Command#arguments -> String (24202.0)

このメソッドはサブクラスで再定義されます。 コマンドが取る引数の説明を表示するために使用します。

このメソッドはサブクラスで再定義されます。
コマンドが取る引数の説明を表示するために使用します。

サブクラスで実装する場合は、一つの引数につき一行で、左揃えの文字列を返すようにしてください。

Gem::Commands::BuildCommand#arguments -> String (24202.0)

引数の説明を表す文字列を返します。

引数の説明を表す文字列を返します。

Gem::Commands::DependencyCommand#arguments -> String (24202.0)

引数の説明を表す文字列を返します。

引数の説明を表す文字列を返します。

Gem::ConfigFile#handle_arguments(arg_list) (12202.0)

コマンドに渡された引数を処理します。

コマンドに渡された引数を処理します。

@param arg_list コマンドに渡された引数の配列を指定します。

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

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

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

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

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

絞り込み条件を変える

Rake::TaskArguments#lookup(name) -> object (9101.0)

与えられた名前に対応する値を返します。

与えられた名前に対応する値を返します。

@param name パラメータ名を指定します。

Rake::TaskArguments#new_scope(names) -> Rake::TaskArguments (6231.0)

与えられたパラメータ名のリストを使用して新しい Rake::TaskArguments を作成します。

...skArguments を作成します。

@param names パラメータ名のリストを指定します。

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

task default: :test_rake_app
task :test_rake_app do
arguments
= Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
new_argume...
...nts = arguments.new_scope(["name3", "name4"])
p new_arguments # => #<Rake::TaskArguments >
p new_arguments.names # => ["name3", "name4"]
end
//}...

Proc#curry -> Proc (6125.0)

Procをカリー化します

...ます
@return カリー化したProcオブジェクトを返します

//emlist[例][ruby]{
b = proc {|x, y, z| (x||0) + (y||0) + (z||0) }
p b.curry[1][2][3] #=> 6
p b.curry[1, 2][3, 4] #=> 6
p b.curry(5)[1][2][3][4][5] #=> 6
p b.curry(5)[1, 2][3, 4][5] #=> 6
p b.curry(1)[1]...
...(z||0) + w.sum }
p b.curry[1][2][3] #=> 6
p b.curry[1, 2][3, 4] #=> 10
p b.curry(5)[1][2][3][4][5] #=> 15
p b.curry(5)[1, 2][3, 4][5] #=> 15
p b.curry(1)[1] #=> 1

b = lambda {|x, y, z| (x||0) + (y||0) + (z||0) }
p b.curry[1][2][3] #=> 6
p b.curry[1, 2][3,...
...#=> wrong number of arguments (given 4, expected 3)
p b.curry(5) #=> wrong number of arguments (given 5, expected 3)
p b.curry(1) #=> wrong number of arguments (given 1, expected 3)

b = lambda {|x, y, z, *w| (x||0) + (y||0) + (z||0) + w.sum }
p b.curry[1][2][3]...

Proc#curry(arity) -> Proc (6125.0)

Procをカリー化します

...ます
@return カリー化したProcオブジェクトを返します

//emlist[例][ruby]{
b = proc {|x, y, z| (x||0) + (y||0) + (z||0) }
p b.curry[1][2][3] #=> 6
p b.curry[1, 2][3, 4] #=> 6
p b.curry(5)[1][2][3][4][5] #=> 6
p b.curry(5)[1, 2][3, 4][5] #=> 6
p b.curry(1)[1]...
...(z||0) + w.sum }
p b.curry[1][2][3] #=> 6
p b.curry[1, 2][3, 4] #=> 10
p b.curry(5)[1][2][3][4][5] #=> 15
p b.curry(5)[1, 2][3, 4][5] #=> 15
p b.curry(1)[1] #=> 1

b = lambda {|x, y, z| (x||0) + (y||0) + (z||0) }
p b.curry[1][2][3] #=> 6
p b.curry[1, 2][3,...
...#=> wrong number of arguments (given 4, expected 3)
p b.curry(5) #=> wrong number of arguments (given 5, expected 3)
p b.curry(1) #=> wrong number of arguments (given 1, expected 3)

b = lambda {|x, y, z, *w| (x||0) + (y||0) + (z||0) + w.sum }
p b.curry[1][2][3]...

Module#ruby2_keywords(method_name, ...) -> nil (6117.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.

...s through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword arguments, the final hash argument is marked with a special
flag such th...
...element of a normal argument splat to
another method call, and that method call does not include explicit
keywords or a keyword splat, the final element is interpreted as
keywords. In other words, keywords will be passed through the method to
other methods.

This should only be used for methods tha...
...r
method, and only for backwards compatibility with Ruby versions before
2.7.

This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the module responds to this method before calling
it. Also, b...

絞り込み条件を変える

<< 1 2 3 > >>