るりまサーチ

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

別のキーワード

  1. psych psych_y
  2. kernel y
  3. psych y
  4. kernel psych_y
  5. y kernel

検索結果

<< 1 2 3 ... > >>

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

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

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

Rake::EMPTY_TASK_ARGS -> Rake::TaskArguments (6200.0)

空のタスクに渡すパラメータをあらわす定数です。

空のタスクに渡すパラメータをあらわす定数です。

Proc#curry -> Proc (6172.0)

Procをカリー化します

...aram 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] #=> 6
p b.curry(5)[1][2][3][4][5] #=> 6
p b.curry(5)[1, 2...
...ry(1)[1] #=> 1

b = proc {|x, y, z, *w| (x||0) + (y||0) + (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...
...b.curry[1][2][3] #=> 6
p b.curry[1, 2][3, 4] #=> 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, *...

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

Procをカリー化します

...aram 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] #=> 6
p b.curry(5)[1][2][3][4][5] #=> 6
p b.curry(5)[1, 2...
...ry(1)[1] #=> 1

b = proc {|x, y, z, *w| (x||0) + (y||0) + (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...
...b.curry[1][2][3] #=> 6
p b.curry[1, 2][3, 4] #=> 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, *...

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.

...arks 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...
...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 method to
other methods.

This should only be used for methods that delegate keywor...
...ds 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 module responds to this method before calling...

絞り込み条件を変える

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.

...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...
...ormal 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 keyword...
...s 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...

Object#yield_self -> Enumerator (6106.0)

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

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

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

//emlist[メソッドチェインのパイプライン][ruby]{
require...
...son'

construct_url(arguments).
y
ield_self {|url| URI(url).read }.
y
ield_self {|response| JSON.parse(response) }
//}

ブロックなしで呼び出されたときは Enumerator を返します。
例えば条件によって値を捨てるのに使えます。

//emlist[][ruby]{
# 条件にあ...
...うので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}

@see Object#tap...

Object#yield_self {|x| ... } -> object (6106.0)

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

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

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

//emlist[メソッドチェインのパイプライン][ruby]{
require...
...son'

construct_url(arguments).
y
ield_self {|url| URI(url).read }.
y
ield_self {|response| JSON.parse(response) }
//}

ブロックなしで呼び出されたときは Enumerator を返します。
例えば条件によって値を捨てるのに使えます。

//emlist[][ruby]{
# 条件にあ...
...うので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}

@see Object#tap...

Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (6012.0)

Rubyで使われる記号の意味(正規表現の複雑な記号は除く) ex q num per and or  plus minus ast slash hat sq  period comma langl rangl eq tilde  dollar at under lbrarbra  lbra2rbra2 lbra3rbra3 dq colon ac  backslash semicolon

...Rubyで使われる記号の意味(正規表現の複雑な記号は除く)
ex q num per and or 
plus minus ast slash hat sq 
period comma langl rangl eq tilde 
dollar at under lbrarbra 
lbra2rbra2 lbra3rbra3 dq colon ac 
backslash semicol...
...
同名の(! の無い)メソッドに比べてより破壊的な作用をもつメソッド(例: tr と tr!)で使われます。

: /xxx/ !~ yyy

正規表現のメソッド =~ の否定。マッチが失敗したらtrueを返します。


===[a:q] ?

: ?a

d:spec/literal#string。長さ 1...
...の標準出力が文字列として与えられます。d:spec/literal#commandを参照。
//emlist{
puts `ruby -h`
#=> Usage: ruby [switches] [--] [programfile] [arguments]
#=> ....
//}

===[a:backslash] \
バックスラッシュ。環境によって¥に見えたりします。

: pu...

rubygems/commands/install_command (6012.0)

Gem パッケージをローカルリポジトリにインストールするためのライブラリです。

...プラットフォーム上では無効です
-P, --trust-policy POLICY Specify gem trust policy
--ignore-dependencies 依存している Gem パッケージをインストールしません
-y, --include-dependencies 依存している Gem パッケージ...
...をインストールします
--[no-]format-executable Make installed executable names match ruby.
If ruby is ruby18, foo_exec will be
foo_exec18
Local/Remote Options:
-l, --local...
...スを表示します
--debug Ruby 自体のデバッグオプションを有効にします
Arguments
:
GEMNAME インストールする Gem パッケージ名を指定します
Summary:
Gem パッケージをローカルにインストール...

絞り込み条件を変える

rubygems (6006.0)

RubyGems を扱うためのクラスやモジュールが定義されているライブラリです。

...RubyGems を扱うためのクラスやモジュールが定義されているライブラリです。


===[a:gem_command] gem コマンドの使い方

$ gem help

RubyGems は Ruby のための高機能なパッケージ管理ツールです。
これはより多くの情報へのポ...
...でいる基本的なヘルプメッセージです。

使用方法:
gem -h/--help
gem -v/--version
gem command [arguments...] [options...]

例:
gem install rake
gem list --local
gem build package.gemspec
gem help install...
...(e.g. 'gem help install')
より詳しい情報:
https://rubygems.org

==== Gem パッケージをインストールする

例えば rak ( https://rubygems.org/gems/rak ) をインストールするには、以下のいずれかを実行します。

$...
<< 1 2 3 ... > >>