5件ヒット
[1-5件を表示]
(0.098秒)
ライブラリ
- ビルトイン (5)
クラス
-
Enumerator
:: Lazy (2) - Symbol (2)
- SystemExit (1)
検索結果
先頭5件
-
Symbol
# succ -> Symbol (63922.0) -
シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。
シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。
(self.to_s.next.intern と同じです。)
:a.next # => :b
:foo.next # => :fop
@see String#succ -
Enumerator
:: Lazy # collect {|item| . . . } -> Enumerator :: Lazy (27619.0) -
Enumerable#map と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#map と同じですが、配列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.map{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:map>
1.step.lazy.collect{ |n| n.succ }.take(10).force
# => [2, 3, 4, 5, 6, 7, 8,... -
SystemExit
# success? -> bool (27601.0) -
終了ステータスが正常終了を示す値ならば true を返します。
終了ステータスが正常終了を示す値ならば true を返します。
大半のシステムでは、ステータス 0 が正常終了を表します。
例:
begin
exit true
rescue SystemExit => err
p err.success? # => true
end
begin
exit false
rescue SystemExit => err
p err.success? # => false
end -
Symbol
# next -> Symbol (18622.0) -
シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。
シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。
(self.to_s.next.intern と同じです。)
:a.next # => :b
:foo.next # => :fop
@see String#succ -
Enumerator
:: Lazy # map {|item| . . . } -> Enumerator :: Lazy (18619.0) -
Enumerable#map と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#map と同じですが、配列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.map{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:map>
1.step.lazy.collect{ |n| n.succ }.take(10).force
# => [2, 3, 4, 5, 6, 7, 8,...