るりまサーチ

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

別のキーワード

  1. bigdecimal round_half_even
  2. _builtin even?
  3. integer even?
  4. round_half_even bigdecimal
  5. bignum even?

クラス

モジュール

キーワード

検索結果

<< < 1 2 3 >>

Enumerator::Lazy#slice_before {|elt| bool } -> Enumerator::Lazy (8.0)

Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。

...ble#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。

//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>

1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).f...

Enumerator::Lazy#slice_before(initial_state) {|elt, state| bool } -> Enumerator::Lazy (8.0)

Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。

...ble#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。

//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>

1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).f...

Enumerator::Lazy#slice_before(pattern) -> Enumerator::Lazy (8.0)

Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。

...ble#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。

//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>

1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).f...

Numeric (8.0)

数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。

...- - - -
eql? | o - - o o - o
even?
| - o o o - - -
fdiv | o - o...
...downto | - o - - -
eql? | o - o - o
even?
| - o - - -
fdiv | o o o o o...

Object#tap {|x| ... } -> self (8.0)

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

...のメソッドの主目的です。

//emlist[][ruby]{
(1..10) .tap {|x| puts "original: #{x}" }
.to_a .tap {|x| puts "array: #{x}" }
.select {|x| x.even? } .tap {|x| puts "evens: #{x}" }
.map {|x| x*x } .tap {|x| puts "squares: #{x}" }
//}...
...目的です。

//emlist[][ruby]{
(1..10) .tap {|x| puts "original: #{x}" }
.to_a .tap {|x| puts "array: #{x}" }
.select {|x| x.even? } .tap {|x| puts "evens: #{x}" }
.map {|x| x*x } .tap {|x| puts "squares: #{x}" }
//}

@see Object#yield_self...

絞り込み条件を変える

<< < 1 2 3 >>