2777件ヒット
[1-100件を表示]
(0.052秒)
種類
- インスタンスメソッド (2484)
- 特異メソッド (233)
- モジュール関数 (60)
ライブラリ
クラス
-
ARGF
. class (93) - Addrinfo (12)
- Array (324)
- CSV (12)
- Complex (24)
- Date (36)
- Dir (59)
- Enumerator (188)
-
Enumerator
:: ArithmeticSequence (70) -
Enumerator
:: Lazy (329) -
Etc
:: Group (12) -
Etc
:: Passwd (12) - Float (24)
- Hash (168)
- IO (150)
- Integer (72)
- Matrix (94)
- Numeric (81)
- Object (63)
- Pathname (39)
- Prime (24)
-
Prime
:: PseudoPrimeGenerator (36) - Range (59)
- Rational (24)
- String (80)
- StringIO (88)
- Struct (19)
- Vector (24)
-
Zlib
:: GzipReader (36)
モジュール
- Enumerable (368)
- Find (12)
- Kernel (24)
- ObjectSpace (24)
- TSort (66)
オブジェクト
- ENV (31)
キーワード
- % (14)
- + (7)
- == (7)
- begin (7)
- bsearch (24)
-
bsearch
_ index (10) - bytes (14)
- chain (7)
- chars (14)
- chunk (36)
-
chunk
_ while (21) - codepoints (14)
- collect (48)
- collect! (19)
- collect2 (12)
-
collect
_ concat (12) - combination (12)
- combine (8)
- cycle (24)
-
delete
_ if (24) - denominator (60)
- detect (12)
- downto (24)
- drop (12)
-
drop
_ while (24) - each (254)
- each2 (12)
-
each
_ byte (60) -
each
_ char (48) -
each
_ child (35) -
each
_ codepoint (24) -
each
_ cons (12) -
each
_ entry (15) -
each
_ grapheme _ cluster (8) -
each
_ index (12) -
each
_ key (12) -
each
_ line (108) -
each
_ object (24) -
each
_ pair (12) -
each
_ prime (12) -
each
_ slice (12) -
each
_ strongly _ connected _ component (22) -
each
_ strongly _ connected _ component _ from (22) -
each
_ value (12) -
each
_ with _ index (36) -
each
_ with _ object (12) - end (7)
-
enum
_ for (24) - feed (12)
- filter (35)
- filter! (21)
-
filter
_ map (12) - find (36)
-
find
_ all (24) -
find
_ index (36) - first (14)
-
flat
_ map (12) - foreach (60)
- grep (12)
-
grep
_ v (10) - gsub (24)
- gsub! (12)
- index (24)
-
keep
_ if (36) - last (14)
- lazy (12)
- lines (49)
- loop (12)
- map (48)
- map! (19)
-
max
_ by (24) -
min
_ by (24) -
minmax
_ by (12) - new (31)
- next (12)
-
next
_ values (12) - peek (12)
-
peek
_ values (12) - permutation (12)
- produce (6)
- reject (48)
- reject! (24)
-
repeated
_ combination (12) -
repeated
_ permutation (12) -
reverse
_ each (14) - rewind (12)
- rindex (12)
- select (60)
- select! (36)
- size (19)
-
slice
_ after (46) -
slice
_ before (60) -
slice
_ when (23) -
sort
_ by (12) -
sort
_ by! (12) - step (88)
- take (12)
-
take
_ while (48) - then (7)
- times (12)
-
to
_ enum (24) -
transform
_ keys (8) -
transform
_ keys! (8) -
transform
_ values (9) -
transform
_ values! (9) -
tsort
_ each (22) - upto (24)
-
with
_ index (24) -
with
_ object (36) -
yield
_ self (8) - zip (24)
検索結果
先頭5件
-
Numeric
# numerator -> Integer (18137.0) -
自身を Rational に変換した時の分子を返します。
...自身を Rational に変換した時の分子を返します。
@return 分子を返します。
@see Numeric#denominator、Integer#numerator、Float#numerator、Rational#numerator、Complex#numerator... -
Rational
# numerator -> Integer (18137.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... -
Float
# numerator -> Integer (18125.0) -
自身を Rational に変換した時の分子を返します。
...自身を Rational に変換した時の分子を返します。
@return 分子を返します。
//emlist[例][ruby]{
2.0.numerator # => 2
0.5.numerator # => 1
//}
@see Float#denominator... -
Integer
# numerator -> Integer (18125.0) -
分子(常に自身)を返します。
...分子(常に自身)を返します。
@return 分子を返します。
//emlist[][ruby]{
10.numerator # => 10
-10.numerator # => -10
//}
@see Integer#denominator... -
Complex
# numerator -> Complex (18119.0) -
分子を返します。
...分子を返します。
//emlist[例][ruby]{
Complex('1/2+2/3i').numerator # => (3+4i)
Complex(3).numerator # => (3+0i)
//}
@see Complex#denominator... -
Enumerator
. new(obj , method = :each , *args) -> Enumerator (3119.0) -
オブジェクト obj について、 each の代わりに method という 名前のメソッドを使って繰り返すオブジェクトを生成して返します。 args を指定すると、 method の呼び出し時に渡されます。
...定すると、 method の呼び出し時に渡されます。
@param obj イテレータメソッドのレシーバとなるオブジェクト
@param method イテレータメソッドの名前を表すシンボルまたは文字列
@param args イテレータメソッドの呼び出しに渡す... -
Enumerator
:: Lazy # drop(n) -> Enumerator :: Lazy (3118.0) -
Enumerable#drop と同じですが、配列ではなくEnumerator::Lazy を返します。
...、配列ではなくEnumerator::Lazy を返します。
@param n 要素数を指定します。
@raise ArgumentError n に負の数を指定した場合に発生します。
//emlist[例][ruby]{
1.step.lazy.drop(3)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:drop(3)>
1.s......tep.lazy.drop(3).take(10).force
# => [4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
//}
@see Enumerable#drop... -
Enumerator
:: Lazy # take(n) -> Enumerator :: Lazy (3118.0) -
Enumerable#take と同じですが、配列ではなくEnumerator::Lazy を返します。
...ですが、配列ではなくEnumerator::Lazy を返します。
n が大きな数 (100000とか) の場合に備えて再定義されています。
配列が必要な場合は Enumerable#first を使って下さい。
@param n 要素数を指定します。
@raise ArgumentError n に負の数......を指定した場合に発生します。
//emlist[例][ruby]{
1.step.lazy.take(5)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:take(5)>
1.step.lazy.take(5).force
# => [1, 2, 3, 4, 5]
//}
@see Enumerable#take... -
Enumerator
# with _ object(obj) -> Enumerator (3112.0) -
繰り返しの各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。
...かった場合は、上で説明した繰り返しを実行し、
最後に obj を返す Enumerator を返します。
//emlist[例][ruby]{
# 0,1,2 と呼びだす enumeratorを作る
to_three = Enumerator.new do |y|
3.times do |x|
y << x
end
end
to_three_with_string = to_three.with_obje......ct("foo")
to_three_with_string.each do |x,string|
puts "#{string}: #{x}"
end
# => foo:0
# => foo:1
# => foo:2
//}
@param obj 繰り返しの各要素に添えて渡されるオブジェクト
@see Enumerable#each_with_object...