446件ヒット
[1-100件を表示]
(0.057秒)
ライブラリ
- ビルトイン (152)
- getoptlong (24)
- logger (1)
- rake (72)
-
rubygems
/ commands / dependency _ command (12)
クラス
- Data (12)
-
Gem
:: Commands :: DependencyCommand (12) - GetoptLong (24)
- Proc (30)
-
Rake
:: TaskArguments (60) - String (45)
- Struct (16)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (9)
- Application (1)
-
EMPTY
_ TASK _ ARGS (12) -
NEWS for Ruby 3
. 0 . 0 (5) - Proc (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- [] (10)
- concat (18)
- curry (24)
- inspect (12)
- lambda (18)
- lookup (12)
- new (42)
-
new
_ scope (12) - prepend (18)
- proc (19)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby2
_ keywords (6) - rubygems (12)
-
rubygems
/ commands / cleanup _ command (12) -
rubygems
/ commands / dependency _ command (12) -
rubygems
/ commands / fetch _ command (12) -
rubygems
/ commands / help _ command (12) -
rubygems
/ commands / install _ command (12) -
rubygems
/ commands / pristine _ command (12) -
rubygems
/ commands / specification _ command (12) -
rubygems
/ commands / unpack _ command (12) -
to
_ s (12) - クラス/メソッドの定義 (12)
- 手続きオブジェクトの挙動の詳細 (12)
検索結果
先頭5件
-
Gem
:: Commands :: DependencyCommand # arguments -> String (21101.0) -
引数の説明を表す文字列を返します。
引数の説明を表す文字列を返します。 -
Rake
:: TaskArguments # new _ scope(names) -> Rake :: TaskArguments (9242.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"], ["value......1", "value2"])
new_arguments = arguments.new_scope(["name3", "name4"])
p new_arguments # => #<Rake::TaskArguments >
p new_arguments.names # => ["name3", "name4"]
end
//}... -
GetoptLong
# set _ options(*arguments) -> self (9207.0) -
あなたのプログラムで、認識させたいオプションをセットします。 個々のオプションは、オプション名と引数のフラグからなる配列でな ければいけません。
...ます。配列中の引数のフラグは、GetoptLong::NO_ARGUMENT,
GetoptLong::REQUIRE_ARGUMENT, GetoptLong::OPTIONAL_ARGUMENT
のいずれかでなくてはなりません。
オプションを設定できるのは、get, get_option, each,
each_option メソッドを呼び出す前だけです......します。
@param arguments オプションを表す配列を指定します。
@raise ArgumentError 不正な引数が与えられるた場合、発生します。
parser.set_options(['-d', '--debug', GetoptLong::NO_ARGUMENT],
['--version', GetoptLong::NO_ARGUMEN......['--help', GetoptLong::NO_ARGUMENT])
オプション名と引数のフラグの順番に決まりはないので、次のような
形式でも構いません。
parser.set_options([GetoptLong::NO_ARGUMENT, '-d', '--debug'],
[GetoptLong::NO_ARGUMENT,... -
Rake
:: TaskArguments # inspect -> String (9100.0) -
自身を人間に読みやすい文字列にして返します。
...自身を人間に読みやすい文字列にして返します。
@see Hash#inspect... -
Rake
:: TaskArguments # lookup(name) -> object (9100.0) -
与えられた名前に対応する値を返します。
...与えられた名前に対応する値を返します。
@param name パラメータ名を指定します。... -
String
# prepend(*arguments) -> String (6207.0) -
複数の文字列を先頭に破壊的に追加します。
...複数の文字列を先頭に破壊的に追加します。
@param arguments 追加したい文字列を指定します。
//emlist[例][ruby]{
a = "!!!"
a.prepend # => "!!!"
a # => "!!!"
a = "!!!"
a.prepend "hello ", "world" # => "hello world!!!"
a # => "hello... -
Rake
:: EMPTY _ TASK _ ARGS -> Rake :: TaskArguments (6200.0) -
空のタスクに渡すパラメータをあらわす定数です。
空のタスクに渡すパラメータをあらわす定数です。 -
String
# prepend(other _ str) -> String (6102.0) -
文字列 other_str を先頭に破壊的に追加します。
...文字列 other_str を先頭に破壊的に追加します。
@param other_str 追加したい文字列を指定します。
//emlist[例][ruby]{
a = "world"
a.prepend("hello ") # => "hello world"
a # => "hello world"
//}... -
Proc (6048.0)
-
ブロックをコンテキスト(ローカル変数のスコープやスタックフ レーム)とともにオブジェクト化した手続きオブジェクトです。
...た手続きオブジェクトです。
Proc は ローカル変数のスコープを導入しないことを除いて
名前のない関数のように使えます。ダイナミックローカル変数は
Proc ローカルの変数として使えます。
Proc がローカル変数のスコー......][ruby]{
var = 1
$foo = Proc.new { var }
var = 2
def foo
$foo.call
end
p foo # => 2
//}
===[a:should_use_next] 手続きを中断して値を返す
手続きオブジェクトを中断して、呼出し元(呼び出しブロックでは yield、それ以外では Proc#call)
へジャン......ist[Proc.new は引数の数が違っていてもエラーにならない][ruby]{
b = Proc.new{|a,b,c|
p a,b,c
}
b.call(2, 4)
#=> 2
4
nil
//}
//emlist[lambda は引数の数が違うとエラーになる][ruby]{
b = lambda{|a,b,c|
p a,b,c
}
b.call(2, 4)
#=> wrong number of arguments (2......ist[Proc.new は引数の数が違っていてもエラーにならない][ruby]{
b = Proc.new{|a,b,c|
p a,b,c
}
b.call(2, 4)
#=> 2
4
nil
//}
//emlist[lambda は引数の数が違うとエラーになる][ruby]{
b = lambda{|a,b,c|
p a,b,c
}
b.call(2, 4)
# => wrong number of arguments (g...