2414件ヒット
[2401-2414件を表示]
(0.150秒)
クラス
-
ARGF
. class (24) - Array (324)
- Complex (24)
- Dir (19)
- Enumerator (187)
-
Enumerator
:: Lazy (386) -
Enumerator
:: Yielder (30) - Float (24)
- Hash (168)
- IO (96)
- Integer (60)
- Matrix (86)
- Numeric (57)
- Object (63)
- Pathname (51)
- Prime (12)
-
Prime
:: PseudoPrimeGenerator (24) - Range (59)
- Rational (24)
- String (80)
- StringIO (50)
- Struct (43)
- Vector (50)
モジュール
- Enumerable (440)
- TSort (33)
キーワード
- % (14)
- + (7)
- << (12)
- ascend (12)
- bsearch (24)
-
bsearch
_ index (10) - bytes (7)
- chain (7)
- chunk (36)
-
chunk
_ while (12) - collect (60)
- collect! (26)
- collect2 (12)
-
collect
_ concat (24) - combination (12)
- cycle (24)
-
delete
_ if (24) - denominator (48)
- descend (12)
- detect (12)
- downto (12)
- drop (12)
-
drop
_ while (36) - each (180)
-
each
_ byte (36) -
each
_ char (24) -
each
_ child (19) -
each
_ codepoint (36) -
each
_ cons (12) -
each
_ entry (15) -
each
_ grapheme _ cluster (8) -
each
_ index (12) -
each
_ key (12) -
each
_ line (72) -
each
_ pair (24) -
each
_ slice (12) -
each
_ strongly _ connected _ component (11) -
each
_ strongly _ connected _ component _ from (11) -
each
_ value (12) -
each
_ with _ index (36) -
each
_ with _ object (12) - eager (6)
-
enum
_ for (48) - feed (12)
- filter (35)
- filter! (14)
-
filter
_ map (12) - find (12)
-
find
_ all (24) -
find
_ index (36) -
flat
_ map (24) - force (12)
- grep (12)
-
grep
_ v (10) -
group
_ by (12) - gsub (12)
- gsub! (12)
- index (24)
-
keep
_ if (24) - lazy (24)
- lines (7)
- map (60)
- map! (26)
-
max
_ by (24) -
min
_ by (24) -
minmax
_ by (12) - next (12)
-
next
_ values (12) - partition (12)
- peek (12)
-
peek
_ values (12) - permutation (12)
- reject (48)
- reject! (24)
-
repeated
_ combination (12) -
repeated
_ permutation (12) -
reverse
_ each (26) - rewind (12)
- rindex (12)
- select (60)
- select! (24)
- size (12)
-
slice
_ after (46) -
slice
_ before (60) -
slice
_ when (23) -
sort
_ by (12) -
sort
_ by! (12) - step (76)
- take (12)
-
take
_ while (48) - then (7)
- times (12)
-
to
_ enum (48) -
to
_ proc (6) -
transform
_ keys (8) -
transform
_ keys! (8) -
transform
_ values (9) -
transform
_ values! (9) -
tsort
_ each (11) - upto (12)
-
with
_ index (48) -
with
_ object (24) - yield (12)
-
yield
_ self (8) - zip (24)
検索結果
先頭3件
-
Hash
# keep _ if -> Enumerator (207.0) -
キーと値を引数としてブロックを評価した結果が真であるような要素を self に残します。
...ます。
select! はオブジェクトが変更された場合に self を、
されていない場合に nil を返します。
ブロックが与えられなかった場合は、自身と keep_if から生成した
Enumerator オブジェクトを返します。
//emlist[例][ruby]{
h1 = {}
c =......("a".."g")
c.each_with_index {|e, i| h1[i] = e }
h2 = h1.dup
h1.select! # => #<Enumerator: {0=>"a", 1=>"b", 2=>"c", 3=>"d", 4=>"e", 5=>"f", 6=>"g"}:select!>
h1.select! { |k, v| k % 3 == 0 } # => {0=>"a", 3=>"d", 6=>"g"}
h1.select! { |k, v| true } # => nil
h2.keep_if { |k, v| k % 3 == 0 }......# => {0=>"a", 3=>"d", 6=>"g"}
h2.keep_if { |k, v| true } # => {0=>"a", 3=>"d", 6=>"g"}
//}
@see Hash#select, Hash#delete_if, Hash#reject!... -
Range
# %(s) -> Enumerator (207.0) -
範囲内の要素を s おきに繰り返します。
...ます。
@return ブロックを指定した時は self を返します。
@return ブロックを指定しなかった時かつ数値の Range の時は Enumerator::ArithmeticSequence を返します。
@return ブロックを指定しなかったその他の Range の時は Enumerator を返し......ます。(例: String の Range)
//emlist[例][ruby]{
(1..10).step(3) {|v| p v}
# => 1
# 4
# 7
# 10
("a".."f").step(2) {|v| p v}
# => "a"
# "c"
# "e"
(10..0).step(-3) {|v| p v}
# => 10
# 7
# 4
# 1
//}... -
Range
# %(s) -> Enumerator :: ArithmeticSequence (207.0) -
範囲内の要素を s おきに繰り返します。
...ます。
@return ブロックを指定した時は self を返します。
@return ブロックを指定しなかった時かつ数値の Range の時は Enumerator::ArithmeticSequence を返します。
@return ブロックを指定しなかったその他の Range の時は Enumerator を返し......ます。(例: String の Range)
//emlist[例][ruby]{
(1..10).step(3) {|v| p v}
# => 1
# 4
# 7
# 10
("a".."f").step(2) {|v| p v}
# => "a"
# "c"
# "e"
(10..0).step(-3) {|v| p v}
# => 10
# 7
# 4
# 1
//}...