4632件ヒット
[1-100件を表示]
(0.076秒)
別のキーワード
クラス
-
ARGF
. class (12) - Array (565)
- Class (12)
- Complex (108)
- Data (18)
- Dir (19)
-
Encoding
:: Converter (72) - Enumerator (163)
-
Enumerator
:: Lazy (308) - Exception (12)
- File (64)
-
File
:: Stat (84) - Float (363)
- Hash (267)
- IO (156)
- Integer (108)
- MatchData (206)
- Method (12)
- Module (252)
- NilClass (24)
- Numeric (176)
- Object (75)
- Proc (12)
- Random (36)
- Range (66)
- Rational (291)
- Regexp (33)
-
RubyVM
:: InstructionSequence (34) - Set (6)
- String (413)
- Struct (31)
- Symbol (9)
- Thread (45)
-
Thread
:: Backtrace :: Location (72) - Time (24)
- TracePoint (12)
- UnboundMethod (12)
モジュール
- Enumerable (448)
- GC (12)
キーワード
- % (26)
- * (24)
- ** (24)
- + (31)
- - (36)
- -@ (21)
-
/ (24) - < (12)
- <= (12)
- <=> (24)
- == (39)
- === (6)
- > (12)
- >= (12)
- [] (96)
-
abort
_ on _ exception= (12) -
absolute
_ path (24) - all? (15)
- allocate (12)
- angle (24)
- any? (16)
-
append
_ features (12) - arg (24)
- atime (24)
- attr (36)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) - autoload (12)
-
backtrace
_ locations (36) -
base
_ label (12) - begin (12)
- birthtime (12)
- bsearch (24)
-
bsearch
_ index (10) - bytebegin (2)
- byteend (2)
- byteindex (3)
- byteoffset (6)
- byterindex (3)
- captures (12)
- ceil (28)
- chain (7)
- chunk (36)
-
chunk
_ while (12) - coerce (12)
- collect (36)
- collect! (12)
-
collect
_ concat (12) - combination (24)
- concat (42)
- conjugate (12)
-
const
_ source _ location (12) - convpath (12)
- ctime (12)
- cycle (24)
- deconstruct (5)
-
deconstruct
_ keys (5) -
delete
_ at (12) -
delete
_ if (24) - denominator (48)
-
deprecate
_ constant (12) -
destination
_ encoding (12) - detect (12)
- directory? (12)
- divmod (12)
- downto (12)
- drop (12)
-
drop
_ while (24) - each (132)
-
each
_ byte (24) -
each
_ char (24) -
each
_ child (7) -
each
_ codepoint (12) -
each
_ cons (12) -
each
_ entry (12) -
each
_ grapheme _ cluster (8) -
each
_ index (12) -
each
_ key (12) -
each
_ line (48) -
each
_ pair (12) -
each
_ slice (12) -
each
_ value (12) -
each
_ with _ index (12) -
each
_ with _ object (12) - end (12)
-
enum
_ for (24) - eql? (27)
- fdatasync (12)
- fdiv (24)
- feed (12)
-
fetch
_ values (22) - filter (35)
- filter! (14)
-
filter
_ map (12) - find (12)
-
find
_ all (24) -
find
_ index (24) -
flat
_ map (12) - flatten (27)
- flatten! (15)
- flock (12)
- floor (29)
-
garbage
_ collect (12) - grep (36)
-
grep
_ v (34) - gsub (48)
- gsub! (48)
- hash (3)
- index (31)
- inspect (36)
- isatty (12)
-
keep
_ if (24) - key (12)
- label (12)
- lazy (12)
- lstat (12)
- map (36)
- map! (12)
- match (48)
- match? (27)
-
max
_ by (24) -
min
_ by (24) -
minmax
_ by (12) - modulo (12)
- mtime (12)
-
named
_ captures (12) - negative? (29)
- next (12)
-
next
_ float (11) -
next
_ values (12) - none? (15)
- numerator (48)
- offset (24)
- one? (15)
- pack (21)
- path (44)
- peek (12)
-
peek
_ values (12) - permutation (24)
- phase (24)
- positive? (19)
-
post
_ match (12) -
pre
_ match (12) -
prepend
_ features (12) -
prev
_ float (11) -
primitive
_ convert (48) - private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ instance _ methods (12) -
private
_ method _ defined? (12) - quo (24)
- rand (36)
- rationalize (108)
- reject (48)
- reject! (24)
-
remove
_ const (12) - reopen (24)
-
repeated
_ combination (24) -
repeated
_ permutation (24) -
report
_ on _ exception= (9) -
respond
_ to _ missing? (12) -
reverse
_ each (14) - rewind (12)
- rindex (24)
- rotate (12)
- rotate! (12)
- round (37)
- scan (24)
- select (60)
- select! (24)
- size (13)
-
slice
_ after (46) -
slice
_ before (60) -
slice
_ when (23) -
sort
_ by (12) -
sort
_ by! (12) -
source
_ location (36) - stat (12)
- step (100)
- strftime (12)
- sub (36)
- sub! (36)
- symlink? (12)
- take (12)
-
take
_ while (48) - then (7)
- times (12)
-
to
_ a (12) -
to
_ binary (10) -
to
_ enum (24) -
to
_ f (36) -
to
_ i (24) -
to
_ path (8) -
to
_ r (36) -
to
_ s (36) - tr (12)
-
tr
_ s (12) -
tr
_ s! (12) -
transform
_ keys (8) -
transform
_ keys! (8) -
transform
_ values (9) -
transform
_ values! (9) - truncate (60)
- tty? (12)
- unpack (12)
- unpack1 (9)
- update (24)
- upto (12)
-
values
_ at (48) - with (3)
-
with
_ index (12) -
with
_ object (24) -
yield
_ self (8) - zip (24)
検索結果
先頭5件
-
Array
# at(nth) -> object | nil (15128.0) -
nth 番目の要素を返します。nth 番目の要素が存在しない時には nil を返します。
...nth 番目の要素を返します。nth 番目の要素が存在しない時には nil を返します。
@param nth インデックスを整数で指定します。
先頭の要素が 0 番目になります。nth の値が負の時には末尾から
のインデックス......ドによる
暗黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [ "a", "b", "c", "d", "e" ]
a[0] #=> "a"
a[1] #=> "b"
a... -
Array
# repeated _ combination(n) -> Enumerator (12333.0) -
サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。
...生成する Enumerator オブジェクトを返します。
@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引......指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3]
a.repeated_combination(1).to_a #=> [[1], [2], [3]]
a.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
a.repeated_combination(3).to_a #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],......3,3]]
a.repeated_combination(4).to_a #=> [[1,1,1,1],[1,1,1,2],[1,1,1,3],[1,1,2,2],[1,1,2,3],
# [1,1,3,3],[1,2,2,2],[1,2,2,3],[1,2,3,3],[1,3,3,3],
# [2,2,2,2],[2,2,2,3],[2,2,3,3],[2,3,3,3],[3,3,3,3]]
a.repeated_combination(0).to_a... -
Array
# repeated _ permutation(n) -> Enumerator (12333.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...を生成する Enumerator オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引......t[例][ruby]{
a = [1, 2]
a.repeated_permutation(1).to_a #=> [[1], [2]]
a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a.repeated_permutation(0).......to_a #=> [[]] # one permutation of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=... -
Array
# repeated _ combination(n) { |c| . . . } -> self (12233.0) -
サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。
...生成する Enumerator オブジェクトを返します。
@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引......指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3]
a.repeated_combination(1).to_a #=> [[1], [2], [3]]
a.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
a.repeated_combination(3).to_a #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],......3,3]]
a.repeated_combination(4).to_a #=> [[1,1,1,1],[1,1,1,2],[1,1,1,3],[1,1,2,2],[1,1,2,3],
# [1,1,3,3],[1,2,2,2],[1,2,2,3],[1,2,3,3],[1,3,3,3],
# [2,2,2,2],[2,2,2,3],[2,2,3,3],[2,3,3,3],[3,3,3,3]]
a.repeated_combination(0).to_a... -
Array
# repeated _ permutation(n) { |p| . . . } -> self (12233.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...を生成する Enumerator オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引......t[例][ruby]{
a = [1, 2]
a.repeated_permutation(1).to_a #=> [[1], [2]]
a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a.repeated_permutation(0).......to_a #=> [[]] # one permutation of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=... -
MatchData
# values _ at(*index) -> [String] (12152.0) -
正規表現中の n 番目の括弧にマッチした部分文字列の配列を返します。
...列全体を表します。
@param index インデックスを整数またはシンボル(名前付きキャプチャの場合)で 0 個以上指定します。
//emlist[例][ruby]{
m = /(foo)(bar)(baz)/.match("foobarbaz")
# same as m.to_a.values_at(...)
p m.values_at(0, 1, 2, 3, 4) # => ["fo......z", "foo", "bar", "baz", nil]
p m.values_at(-1, -2, -3, -4, -5) # => ["baz", "bar", "foo", nil, nil]
m = /(?<a>\d+) *(?<op>[+\-*\/]) *(?<b>\d+)/.match("1 + 2")
m.to_a # => ["1 + 2", "1", "+", "2"]
m.values_at(:a, :b, :op) # => ["1", "2", "+"]
//}
@see Array#values_at, Array#[]... -
MatchData
# post _ match -> String (12115.0) -
マッチした部分より後ろの文字列を返します($'と同じ)。
...マッチした部分より後ろの文字列を返します($'と同じ)。
//emlist[例][ruby]{
/(bar)(BAZ)?/ =~ "foobarbaz"
p $~.post_match # => "baz"
//}
@see MatchData#pre_match... -
MatchData
# pre _ match -> String (12115.0) -
マッチした部分より前の文字列を返します($`と同じ)。
...マッチした部分より前の文字列を返します($`と同じ)。
//emlist[例][ruby]{
/(bar)(BAZ)?/ =~ "foobarbaz"
p $~.pre_match # => "foo"
//}
@see MatchData#post_match... -
Enumerator
:: Lazy # collect _ concat {|item| . . . } -> Enumerator :: Lazy (9227.0) -
ブロックの実行結果をひとつに繋げたものに対してイテレートするような Enumerator::Lazy のインスタンスを返します。
...ロックの実行結果をひとつに繋げたものに対してイテレートするような
Enumerator::Lazy のインスタンスを返します。
//emlist[][ruby]{
["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force
#=> ["f", "o", "o", "b", "a", "r"]
//}
ブロックの返した値 x......umerator::Lazy) とき
それ以外のときは、x は分解されず、そのままの値として使われます。
//emlist[][ruby]{
[{a:1}, {b:2}].lazy.flat_map {|i| i}.force
#=> [{:a=>1}, {:b=>2}]
//}
@raise ArgumentError ブロックを指定しなかった場合に発生します。
@see......Enumerable#flat_map...