るりまサーチ (Ruby 2.7.0)

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

別のキーワード

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

検索結果

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
arguments.to_hash ...

絞り込み条件を変える

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

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

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

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

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

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

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

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

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

task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
new_arguments = arguments.new_scope(["nam...

Proc#curry -> Proc (18376.0)

Procをカリー化します

Procをカリー化します

カリー化したProcはいくつかの引数をとります。十分な数の引数が与えられると、元のProcに引数を渡し
て実行し、結果を返します。引数の個数が足りないときは、部分適用したカリー化Procを返します。

@param arity 引数の個数を指定します
@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] ...

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

Procをカリー化します

Procをカリー化します

カリー化したProcはいくつかの引数をとります。十分な数の引数が与えられると、元のProcに引数を渡し
て実行し、結果を返します。引数の個数が足りないときは、部分適用したカリー化Procを返します。

@param arity 引数の個数を指定します
@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] ...

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

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 argument...

絞り込み条件を変える

Proc#ruby2_keywords -> proc (18352.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.

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 ...

Gem::Command#defaults_str -> String (18322.0)

このメソッドはサブクラスで再定義されます。 コマンドのオプションで使用するデフォルト値を表示するために使用する文字列を返します。

このメソッドはサブクラスで再定義されます。
コマンドのオプションで使用するデフォルト値を表示するために使用する文字列を返します。

@see Gem::Command#arguments

Rake::TaskArguments#[](key) -> object (18058.0)

与えられたパラメータ名に対応する値を返します。

与えられたパラメータ名に対応する値を返します。

@param key パラメータの名前を指定します。

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

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

Rake::TaskArguments#names -> Array (18040.0)

パラメータ名のリストを返します。

パラメータ名のリストを返します。

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

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

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

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

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

//emlist[][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"}
end
//}

絞り込み条件を変える

Rake::TaskArguments#each {|key, val| ... } -> Hash (18004.0)

自身に含まれるパラメータ名とそれに対応する値をブロックパラメータとしてブロックを評価します。

自身に含まれるパラメータ名とそれに対応する値をブロックパラメータとしてブロックを評価します。


@see Hash#each

Rake::TaskArguments#inspect -> String (18004.0)

自身を人間に読みやすい文字列にして返します。

自身を人間に読みやすい文字列にして返します。


@see Hash#inspect

Rake::TaskArguments#to_s -> String (18004.0)

自身を人間に読みやすい文字列にして返します。

自身を人間に読みやすい文字列にして返します。


@see Hash#inspect

GetoptLong#set_options(*arguments) -> self (625.0)

あなたのプログラムで、認識させたいオプションをセットします。 個々のオプションは、オプション名と引数のフラグからなる配列でな ければいけません。

あなたのプログラムで、認識させたいオプションをセットします。
個々のオプションは、オプション名と引数のフラグからなる配列でな
ければいけません。

配列中のオプション名は、一文字オプション (例: -d) か長いオプ
ション (例: --debug) を表した文字列のいずれかでなければなり
ません。配列の中の一番左端のオプション名が、オプションの正式名
になります。配列中の引数のフラグは、GetoptLong::NO_ARGUMENT,
GetoptLong::REQUIRE_ARGUMENT, GetoptLong::OPTIONAL_ARGUMENT
のいずれかでなくてはなりません。

オ...

String#concat(*arguments) -> self (625.0)

self に複数の文字列を破壊的に連結します。

self に複数の文字列を破壊的に連結します。

引数の値が整数である場合は Integer#chr の結果に相当する文字を末尾に追加します。追加する文字のエンコーディングは self.encoding です。

self を返します。

@param arguments 複数の文字列もしくは 0 以上の整数

//emlist[例][ruby]{
str = "foo"
str.concat
p str # => "foo"

str = "foo"
str.concat "bar", "baz"
p str # => "foobarbaz"

str = "foo"
str....

絞り込み条件を変える

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

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

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

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

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

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

Object#then -> Enumerator (322.0)

self を引数としてブロックを評価し、ブロックの結果を返します。

self を引数としてブロックを評価し、ブロックの結果を返します。

//emlist[例][ruby]{
3.next.then {|x| x**x }.to_s # => "256"
"my string".yield_self {|s| s.upcase } # => "MY STRING"
//}

値をメソッドチェインのパイプラインに次々と渡すのは良い使い方です。

//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'

construct_url(arguments).
...

Object#yield_self -> Enumerator (322.0)

self を引数としてブロックを評価し、ブロックの結果を返します。

self を引数としてブロックを評価し、ブロックの結果を返します。

//emlist[例][ruby]{
3.next.then {|x| x**x }.to_s # => "256"
"my string".yield_self {|s| s.upcase } # => "MY STRING"
//}

値をメソッドチェインのパイプラインに次々と渡すのは良い使い方です。

//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'

construct_url(arguments).
...