3000件ヒット
[1-100件を表示]
(0.111秒)
ライブラリ
クラス
-
ARGF
. class (126) - Array (324)
- Complex (24)
- Date (36)
- Dir (19)
- Enumerator (187)
-
Enumerator
:: ArithmeticSequence (98) -
Enumerator
:: Chain (35) -
Enumerator
:: Lazy (417) -
Enumerator
:: Yielder (30) - Float (24)
-
Gem
:: SourceIndex (12) - Hash (168)
- IO (150)
- Integer (60)
- Matrix (86)
- Numeric (81)
- Object (63)
- OpenStruct (12)
- Pathname (63)
- Prime (12)
-
Prime
:: PseudoPrimeGenerator (36) -
Psych
:: Nodes :: Node (12) -
REXML
:: Parent (48) - Range (59)
- Rational (24)
- String (80)
- StringIO (88)
- Struct (43)
- Vector (74)
-
Zlib
:: GzipReader (36)
モジュール
- Enumerable (440)
- TSort (33)
キーワード
- % (14)
- + (7)
- << (12)
- == (7)
- ascend (12)
- begin (7)
- bsearch (24)
-
bsearch
_ index (10) - bytes (21)
- chain (7)
- chars (21)
- chunk (36)
-
chunk
_ while (21) - codepoints (21)
- collect (60)
- collect! (26)
- collect2 (12)
-
collect
_ concat (24) - combination (12)
- compact (4)
- cycle (24)
-
delete
_ if (36) - denominator (60)
- descend (12)
- detect (12)
- downto (24)
- drop (12)
-
drop
_ while (36) - each (292)
- each2 (12)
-
each
_ byte (60) -
each
_ char (48) -
each
_ child (31) -
each
_ codepoint (48) -
each
_ cons (12) -
each
_ entry (15) -
each
_ grapheme _ cluster (8) -
each
_ index (24) -
each
_ key (12) -
each
_ line (108) -
each
_ pair (36) -
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)
- end (7)
-
enum
_ for (48) -
exclude
_ end? (7) - feed (12)
- filter (35)
- filter! (14)
-
filter
_ map (12) - find (24)
-
find
_ all (24) -
find
_ index (36) - first (14)
-
flat
_ map (24) - force (12)
- grep (12)
-
grep
_ v (10) -
group
_ by (12) - gsub (12)
- gsub! (12)
- hash (7)
- index (24)
- inspect (14)
-
keep
_ if (24) - last (14)
- lazy (24)
- lines (49)
- 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 (19)
- rindex (12)
- select (60)
- select! (24)
- size (26)
-
slice
_ after (46) -
slice
_ before (60) -
slice
_ when (23) -
sort
_ by (12) -
sort
_ by! (12) - step (95)
- 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) - uniq (18)
- upto (24)
-
with
_ index (48) -
with
_ object (36) - yield (12)
-
yield
_ self (8) - zip (24)
検索結果
先頭5件
-
Numeric
# numerator -> Integer (24226.0) -
自身を Rational に変換した時の分子を返します。
...自身を Rational に変換した時の分子を返します。
@return 分子を返します。
@see Numeric#denominator、Integer#numerator、Float#numerator、Rational#numerator、Complex#numerator... -
Rational
# numerator -> Integer (24226.0) -
分子を返します。
...分子を返します。
@return 分子を返します。
//emlist[例][ruby]{
Rational(7).numerator # => 7
Rational(7, 1).numerator # => 7
Rational(9, -4).numerator # => -9
Rational(-2, -10).numerator # => 1
//}
@see Rational#denominator... -
Complex
# numerator -> Complex (24214.0) -
分子を返します。
...分子を返します。
//emlist[例][ruby]{
Complex('1/2+2/3i').numerator # => (3+4i)
Complex(3).numerator # => (3+0i)
//}
@see Complex#denominator... -
Float
# numerator -> Integer (24214.0) -
自身を Rational に変換した時の分子を返します。
...自身を Rational に変換した時の分子を返します。
@return 分子を返します。
//emlist[例][ruby]{
2.0.numerator # => 2
0.5.numerator # => 1
//}
@see Float#denominator... -
Integer
# numerator -> Integer (24214.0) -
分子(常に自身)を返します。
...分子(常に自身)を返します。
@return 分子を返します。
//emlist[][ruby]{
10.numerator # => 10
-10.numerator # => -10
//}
@see Integer#denominator... -
Enumerable
# partition -> Enumerator (12301.0) -
各要素を、ブロックの条件を満たす要素と満たさない要素に分割します。 各要素に対してブロックを評価して、その値が真であった要素の配列と、 偽であった要素の配列の 2 つを配列に入れて返します。
...要素の配列と、
偽であった要素の配列の 2 つを配列に入れて返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0].partition {|i| i % 3 == 0 }
#=> [[9, 6, 3, 0], [10, 8, 7, 5, 4, 2, 1]]
//}... -
Enumerator
:: Yielder # to _ proc -> Proc (12101.0) -
Enumerator.new で使うメソッドです。
...Enumerator.new で使うメソッドです。
引数を Enumerator::Yielder#yield に渡す Proc を返します。
これは Enumerator::Yielder オブジェクトを他のメソッドにブロック引数と
して直接渡すために使えます。
//emlist[例][ruby]{
text = <<-END
Hello
こ......んにちは
END
enum = Enumerator.new do |y|
text.each_line(&y)
end
enum.each do |line|
p line
end
# => "Hello\n"
# "こんにちは\n"
//}... -
Date
# step(limit , step = 1) -> Enumerator (9301.0) -
ブロックの評価を繰り返します。ブロックは日付オブジェクトをとります。 limit は日付オブジェクトでなければなりません、 また step は非零でなければなりません。
...評価を繰り返します。ブロックは日付オブジェクトをとります。
limit は日付オブジェクトでなければなりません、
また step は非零でなければなりません。
@param limit 日付オブジェクト
@param step 歩幅
@see Date#downto, Date#upto... -
Enumerator
:: Lazy # filter {|item| . . . } -> Enumerator :: Lazy (9301.0) -
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
...le#select と同じですが、配列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:fi......nd_all>
1.step.lazy.select { |i| i.even? }.take(10).force
# => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
//}
@see Enumerable#select... -
Enumerator
:: Lazy # filter _ map {|item| . . . } -> Enumerator :: Lazy (9301.0) -
Enumerable#filter_map と同じですが、配列ではなく Enumerator::Lazy を返します。
...lter_map と同じですが、配列ではなく Enumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.filter_map { |n| n * 2 if n.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: (1.step)>:filt......er_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...