るりまサーチ

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

別のキーワード

  1. bigdecimal/util to_d
  2. float to_d
  3. kernel $-d
  4. rsa d
  5. rsa d=

モジュール

検索結果

<< 1 2 3 ... > >>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

...トします。

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

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

task default: :test_rake_app
task :test_rake_app do
arguments
= Rake::TaskArguments.new(["name1", "name2"], [...
...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
//}...

絞り込み条件を変える

String#prepend(*arguments) -> String (6207.0)

複数の文字列を先頭に破壊的に追加します。

...列を先頭に破壊的に追加します。

@param arguments 追加したい文字列を指定します。

//emlist[例][ruby]{
a = "!!!"
a.prepend # => "!!!"
a # => "!!!"

a = "!!!"
a.prepend "hello ", "world" # => "hello world!!!"
a # => "hello world!!!"
//}...

Module#ruby2_keywords(method_name, ...) -> nil (6116.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.

...iven 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 fin...
...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
o...
...ther methods.

This should only be used for methods that delegate keywords to another
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...

Proc#ruby2_keywords -> proc (6116.0)

Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc 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 proc to other methods.

...as passing keywords through a normal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked with a special f...
...mal 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 proc to other methods.

This should only be used for procs that delegate keywords...
...to another
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 proc responds to this method before calling
it....

Kernel.#lambda -> Proc (6112.0)

与えられたブロックから手続きオブジェクト (Proc のインスタンス) を生成して返します。Proc.new に近い働きをします。

...引数でうけるべきです。

ブロックを指定しない lambda は Ruby 2.6 までは警告メッセージ
「warning: tried to create Proc object without a block」
が出力され、Ruby 2.7 では
ArgumentError (tried to create Proc object without a block)
が発生します。

ブロ...
...RBOSE = true のときには警告メッセージ
「warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
が出力され、Ruby 3.0 では
ArgumentError (tried to create Proc object without a block)
が発生します。

@raise ArgumentError スタック上に...
...st[lambda は引数の数が違うとエラーになる][ruby]{
b = lambda{|a,b,c|
p a,b,c
}
b.call(2, 4)
#=> wrong number of arguments (2 for 3) (ArgumentError)
//}

d
:spec/call#block_arg も参照してください。

==== ジャンプ構文の挙動の違い

return と break は、lambda と...
...ist[lambda は引数の数が違うとエラーになる][ruby]{
b = lambda{|a,b,c|
p a,b,c
}
b.call(2, 4)
# => wrong number of arguments (given 2, expected 3)
//}

d
:spec/call#block_arg も参照してください。

==== ジャンプ構文の挙動の違い

return と break は、lambda と Pr...

Kernel.#lambda { ... } -> Proc (6112.0)

与えられたブロックから手続きオブジェクト (Proc のインスタンス) を生成して返します。Proc.new に近い働きをします。

...引数でうけるべきです。

ブロックを指定しない lambda は Ruby 2.6 までは警告メッセージ
「warning: tried to create Proc object without a block」
が出力され、Ruby 2.7 では
ArgumentError (tried to create Proc object without a block)
が発生します。

ブロ...
...RBOSE = true のときには警告メッセージ
「warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
が出力され、Ruby 3.0 では
ArgumentError (tried to create Proc object without a block)
が発生します。

@raise ArgumentError スタック上に...
...st[lambda は引数の数が違うとエラーになる][ruby]{
b = lambda{|a,b,c|
p a,b,c
}
b.call(2, 4)
#=> wrong number of arguments (2 for 3) (ArgumentError)
//}

d
:spec/call#block_arg も参照してください。

==== ジャンプ構文の挙動の違い

return と break は、lambda と...
...ist[lambda は引数の数が違うとエラーになる][ruby]{
b = lambda{|a,b,c|
p a,b,c
}
b.call(2, 4)
# => wrong number of arguments (given 2, expected 3)
//}

d
:spec/call#block_arg も参照してください。

==== ジャンプ構文の挙動の違い

return と break は、lambda と Pr...
...、lambda に & 引数を渡すのは推奨されません。& 引数ではなくてブロック記法で記述する必要があります。

& 引数を渡した lambda は Warning[:deprecated] = true のときに警告メッセージ
「warning: lambda without a literal block is deprecated; use t...
...he proc without lambda instead
を出力します。

@raise ArgumentError ブロックを省略した呼び出しを行ったときに発生します。

//emlist[例][ruby]{
d
ef foo &block
proc(&block)
end

it = foo{p 12}
it.call #=> 12
//}

@see Proc,Proc.new

===[a:should_use_next] 手続...

絞り込み条件を変える

<< 1 2 3 ... > >>