2641件ヒット
[2601-2641件を表示]
(0.105秒)
ライブラリ
クラス
-
ARGF
. class (252) - Array (168)
- Dir (38)
- Enumerator (163)
-
Enumerator
:: ArithmeticSequence (14) -
Enumerator
:: Chain (14) -
Enumerator
:: Lazy (171) -
Enumerator
:: Yielder (30) -
Gem
:: SourceIndex (24) - Hash (158)
- IO (300)
- Matrix (196)
- Object (48)
- OpenStruct (24)
- Pathname (54)
- Prime (24)
-
Prime
:: PseudoPrimeGenerator (48) -
Psych
:: Nodes :: Node (24) -
REXML
:: Parent (72) - Range (33)
- StopIteration (12)
- String (112)
- StringIO (176)
- Struct (48)
- Vector (48)
-
Zlib
:: GzipReader (72)
モジュール
- Enumerable (252)
- TSort (66)
キーワード
- % (2)
- + (7)
- << (12)
- bytes (42)
- chars (42)
- chunk (36)
-
chunk
_ while (12) - codepoints (42)
- collect (24)
- collect! (38)
-
collect
_ concat (12) -
delete
_ if (24) - each2 (24)
-
each
_ byte (120) -
each
_ char (96) -
each
_ child (62) -
each
_ codepoint (96) -
each
_ cons (24) -
each
_ entry (30) -
each
_ grapheme _ cluster (16) -
each
_ index (48) -
each
_ key (24) -
each
_ line (216) -
each
_ pair (72) -
each
_ slice (24) -
each
_ strongly _ connected _ component (22) -
each
_ strongly _ connected _ component _ from (22) -
each
_ value (24) -
each
_ with _ index (72) -
each
_ with _ object (24) - eager (6)
-
enum
_ for (48) - feed (12)
- filter! (14)
-
find
_ index (36) -
flat
_ map (12) - index (36)
-
keep
_ if (24) - lines (98)
- map (24)
- map! (38)
- next (12)
-
next
_ values (12) -
peek
_ values (12) - reject! (24)
- result (12)
-
reverse
_ each (52) - rewind (12)
- select! (24)
-
slice
_ after (46) -
slice
_ before (60) -
slice
_ when (23) - step (3)
-
take
_ while (24) -
to
_ enum (48) -
to
_ proc (6) -
tsort
_ each (22) -
with
_ index (48) -
with
_ object (24) - yield (12)
検索結果
先頭5件
-
Matrix
# index(value , selector = :all) -> [Integer , Integer] | nil (15.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
...味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0]
//}
value を指定せず、さらにブロックを省略した場合、
Enumerator を返します... -
Matrix
# map {|x| . . . } -> Matrix (15.0) -
行列の各要素に対してブロックの適用を繰り返した結果を、要素として持つ行列を生成します。
...適用を繰り返した結果を、要素として持つ行列を生成します。
ブロックがない場合、 Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'
m = Matrix[[1, 2], [3, 4]]
p m.map { |x| x + 100 } # => Matrix[[101, 102], [103, 104]]
//}
@see Matrix#each... -
Enumerable
# take _ while {|element| . . . } -> Array (14.0) -
Enumerable オブジェクトの要素を順に偽になるまでブロックで評価します。 最初に偽になった要素の手前の要素までを配列として返します。
...クで評価します。
最初に偽になった要素の手前の要素までを配列として返します。
//emlist[例][ruby]{
e = [1, 2, 3, 4, 5, 0].each
e.take_while {|i| i < 3 } # => [1, 2]
//}
ブロックを省略した場合は Enumerator を返します。
@see Array#take_while... -
StringIO
# chars {|c| . . . } -> self (11.0) -
自身に含まれる文字を一文字ずつブロックに渡して評価します。
...自身に含まれる文字を一文字ずつブロックに渡して評価します。
自身は読み込み用にオープンされていなければなりません。
@raise IOError 自身が読み込み用にオープンされていない場合に発生します。
@see IO#each_char... -
StringIO
# codepoints {|codepoint| . . . } -> self (11.0) -
自身の各コードポイントに対して繰り返します。
...自身の各コードポイントに対して繰り返します。
@see IO#each_codepoint...