別のキーワード
種類
- インスタンスメソッド (5)
- 文書 (2)
- モジュール関数 (1)
- クラス (1)
ライブラリ
- ビルトイン (6)
- shellwords (1)
クラス
- Array (2)
-
Enumerator
:: Lazy (2)
モジュール
- Enumerable (1)
- Shellwords (1)
キーワード
- Lazy (1)
-
NEWS for Ruby 2
. 3 . 0 (1) -
grep
_ v (1) - lazy (1)
- reject (2)
-
ruby 1
. 8 . 3 feature (1) - shelljoin (1)
検索結果
先頭5件
-
Enumerator
:: Lazy # grep(pattern) {|item| . . . } -> Enumerator :: Lazy (63760.0) -
Enumerable#grep と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#grep と同じですが、配列ではなくEnumerator::Lazy を返します。
//emlist[例][ruby]{
(100..Float::INFINITY).lazy.map(&:to_s).grep(/\A(\d)\1+\z/)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: 100..Infinity>:map>:grep(/\A(\d)\1+\z/)>
(100..Float::INFINITY).lazy.map(&:to_s).grep(/\A(\d)\1+\z/).... -
Enumerator
:: Lazy # grep _ v(pattern) {|item| . . . } -> Enumerator :: Lazy (27760.0) -
Enumerable#grep_v と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#grep_v と同じですが、配列ではなくEnumerator::Lazy を返します。
//emlist[例][ruby]{
(100..Float::INFINITY).lazy.map(&:to_s).grep_v(/(\d).*\1/)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: 100..Infinity>:map>:grep_v(/(\d).*\1/)>
(100..Float::INFINITY).lazy.map(&:to_s).grep_v(/(\d).*\1/).t... -
Enumerable
# lazy -> Enumerator :: Lazy (18691.0) -
自身を lazy な Enumerator に変換したものを返します。
自身を lazy な Enumerator に変換したものを返します。
この Enumerator は、以下のメソッドが遅延評価を行う (つまり、配列ではな
くEnumeratorを返す) ように再定義されています。
* map/collect
* flat_map/collect_concat
* select/find_all
* reject
* grep
* take, take_while
* drop, drop_while
* zip (※一貫性のため、ブロックを渡さないケースのみlazy)
* cycle (※一貫性のため、ブロックを渡さないケースのみl... -
Enumerator
:: Lazy (18037.0) -
map や select などのメソッドの遅延評価版を提供するためのクラス。
map や select などのメソッドの遅延評価版を提供するためのクラス。
動作は通常の Enumerator と同じですが、以下のメソッドが遅延評価を行う
(つまり、配列ではなく Enumerator を返す) ように再定義されています。
* map/collect
* flat_map/collect_concat
* select/find_all
* reject
* grep, grep_v
* take, take_while
* drop, drop_while
* slice_before, slice_after, slice_when
* chunk... -
NEWS for Ruby 2
. 3 . 0 (9055.0) -
NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
....rdoc#421--2015-12-22
* RubyGems
* RubyGems 2.5.1 に更新しました。
* http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.0+-2F+2015-11-03
* http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.1+-2F+2015-12-10
=== 組込みのグローバル変数の互... -
ruby 1
. 8 . 3 feature (9055.0) -
ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))
ruby 1.8.3 feature
*((<ruby 1.8 feature>))
*((<ruby 1.8.2 feature>))
ruby 1.8.2 から ruby 1.8.3 までの変更点です。
掲載方針
*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。
以下は各変更点に付けるべきタグです。
記号について(特に重要なものは大文字(主観))
* カテゴリ
* [ruby]: ruby インタプリタの変更
* [api]: 拡張ライブラリ API
* [lib]: ... -
Array
# reject -> Enumerator (9019.0) -
各要素に対してブロックを評価し、 その値が偽であった要素を集めた新しい配列を返します。 条件を反転させた select です。
各要素に対してブロックを評価し、
その値が偽であった要素を集めた新しい配列を返します。
条件を反転させた select です。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# 偶数を除外する (奇数を集める)
[1, 2, 3, 4, 5, 6].reject {|i| i % 2 == 0 } # => [1, 3, 5]
//}
@see Array#select, Enumerable#reject
@see Enumerable#grep_v -
Array
# reject {|item| . . . } -> [object] (9019.0) -
各要素に対してブロックを評価し、 その値が偽であった要素を集めた新しい配列を返します。 条件を反転させた select です。
各要素に対してブロックを評価し、
その値が偽であった要素を集めた新しい配列を返します。
条件を反転させた select です。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# 偶数を除外する (奇数を集める)
[1, 2, 3, 4, 5, 6].reject {|i| i % 2 == 0 } # => [1, 3, 5]
//}
@see Array#select, Enumerable#reject
@see Enumerable#grep_v -
Shellwords
. # shelljoin(array) -> String (337.0) -
配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に 使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド ライン文字列を生成します。
配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に
使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド
ライン文字列を生成します。
個々の配列要素に対するエスケープには、Shellwords.#shellescape と
同じ規則が適用されます。
@param array エスケープ対象の文字列を要素とする配列を指定します。
@return エスケープ結果を連結した文字列を返します。
例:
require 'shellwords'
pattern = 'Jan 15'
file = 'file nam...