るりまサーチ

最速Rubyリファレンスマニュアル検索!
60件ヒット [1-60件を表示] (0.258秒)
トップページ > クエリ:I[x] > クエリ:E[x] > クエリ:step[x] > クエリ:map[x]

別のキーワード

  1. open3 popen2e
  2. socket af_e164
  3. matrix det_e
  4. matrix rank_e
  5. open3 capture2e

ライブラリ

クラス

キーワード

検索結果

Enumerator::Lazy#filter_map {|item| ... } -> Enumerator::Lazy (18459.0)

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

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

@raise ArgumentError ブロックを指定しなかった場合に発生します。

//emlist[例][ruby]{
1.step.lazy.filter_map { |n| n * 2 if n.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy:...
...(1.step)>:filter_map>

1.step.lazy.filter_map { |n| n * 2 if n.even? }.take(10).force
# => [4, 8, 12, 16, 20, 24, 28, 32, 36, 40]
//}

@see Enumerable#filter_map...

Enumerator::Lazy#map {|item| ... } -> Enumerator::Lazy (18353.0)

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

...
E
numerable#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, 9, 10, 11]
//}

@see Enumerable#map...

Enumerator::Lazy.new(obj, size=nil) {|yielder, *values| ... } -> Enumerator::Lazy (6260.0)

Lazy Enumerator を作成します。Enumerator::Lazy#force メソッドなどに よって列挙が実行されたとき、objのeachメソッドが実行され、値が一つずつ ブロックに渡されます。ブロックは、yielder を使って最終的に yield される値を 指定できます。

...Lazy Enumerator を作成します。Enumerator::Lazy#force メソッドなどに
よって列挙が実行されたとき、objのeachメソッドが実行され、値が一つずつ
ブロックに渡されます。ブロックは、yielder を使って最終的に yield される値を
指定で...
...emlist[Enumerable#filter_map と、その遅延評価版を定義する例][ruby]{
module Enumerable
def filter_map(&block)
map
(&block).compact
e
nd
e
nd

class Enumerator::Lazy
def filter_map
Lazy.new(self) do |yielder, *values|
result = yield *values
yielder << result if re...
...sult
e
nd
e
nd
e
nd

1.step.lazy.filter_map{|i| i*i if i.even?}.first(5)
# => [4, 16, 36, 64, 100]
//}

@raise ArgumentError 引数を指定しなかった場合、ブロックを指定しなかった場合に発生します。

@see Enumerator.new...

Enumerator::Lazy#collect {|item| ... } -> Enumerator::Lazy (6253.0)

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

...
E
numerable#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, 9, 10, 11]
//}

@see Enumerable#map...

rake (6048.0)

Rake というコマンドラインツールを扱うライブラリです。

...e というコマンドラインツールを扱うライブラリです。

=== Rake とは

Rake は Make によく似た機能を持つ Ruby で書かれたシンプルなビルドツールです。

Rake は以下のような特徴を持っています。

* Rakefile (Rake における Makefile...
...ding: utf-8
task :hello do
puts 'do task hello!'
e
nd

動的にタスクを定義する例:
# coding: utf-8
require 'rake/testtask'
require 'rake/clean' # clean, clobber の二つのタスクを定義
task :default => [:test]

1.upto(8) do |n|
Rake::TestTask.new("test_step...
...#{n}") do |t|
t.libs << "step#{n}"
t.test_files = FileList["step#{n}/test_*.rb"]
t.verbose = false
e
nd
e
nd

desc 'execute all test'
task 'test_all' => (1..8).to_a.map{|n| "test_step#{n}"}

=== 用語集


: action / アクション
タスクを機能させるための...

絞り込み条件を変える

1.6.8から1.8.0への変更点(まとめ) (3612.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...の変更点(まとめ)/Windows 対応>))
* ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>))
* ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>))
* ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>))
* ((<1.6.8から1.8.0...
.../$defout>)) [obsolete]
: ((<組み込み変数/$deferr>)) [obsolete]
: ((<組み込み変数/$stdout>)) [change]
: ((<組み込み変数/$stderr>)) [change]
: ((<組み込み変数/$stdin>)) [change]

$stdout, $stderr は、$defout, $deferr の別名になり
$defout, $deferr は ((<obsolete>))...
...ess.detach>)) [new]

追加

: ((<Process/Process.abort>)) [new]
: ((<Process/Process.exit>)) [new]

追加。関数 abort, exit と同じ。

: ((<Process/Process.waitall>)) [new]
追加

: ((<Process::Status#pid|Process::Status/pid>)) [new]

追加

=== Range

: ((<Range#step|Range...