210件ヒット
[201-210件を表示]
(0.071秒)
ライブラリ
- ビルトイン (78)
- rake (72)
-
rubygems
/ command (24) -
rubygems
/ commands / build _ command (12) -
rubygems
/ commands / dependency _ command (12) -
rubygems
/ config _ file (12)
クラス
-
Gem
:: Command (24) -
Gem
:: Commands :: BuildCommand (12) -
Gem
:: Commands :: DependencyCommand (12) -
Gem
:: ConfigFile (12) - Object (30)
- Proc (30)
-
Rake
:: TaskArguments (72) - String (18)
キーワード
- [] (12)
- concat (18)
- curry (24)
-
defaults
_ str (12) - each (12)
-
handle
_ arguments (12) - inspect (12)
- lookup (12)
-
new
_ scope (12) -
ruby2
_ keywords (6) - then (14)
-
to
_ s (12) -
yield
_ self (16)
検索結果
-
Object
# then -> Enumerator (3007.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...ng".yield_self {|s| s.upcase } # => "MY STRING"
//}
値をメソッドチェインのパイプラインに次々と渡すのは良い使い方です。
//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'
construct_url(arguments).
yield_self {|url|......返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Object
# yield _ self -> Enumerator (3007.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...s.upcase } # => "MY STRING"
3.next.yield_self {|x| x**x }.to_s # => "256"
//}
値をメソッドチェインのパイプラインに次々と渡すのは良い使い方です。
//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'
construct_url......返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap......ng".yield_self {|s| s.upcase } # => "MY STRING"
//}
値をメソッドチェインのパイプラインに次々と渡すのは良い使い方です。
//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'
construct_url(arguments).
yield_self {|url|...