6083件ヒット
[1-100件を表示]
(0.068秒)
クラス
-
ARGF
. class (141) - Array (513)
- Bignum (33)
- Binding (6)
- Class (11)
- Complex (110)
- Data (22)
- Dir (39)
- Encoding (22)
-
Encoding
:: Converter (66) -
Encoding
:: InvalidByteSequenceError (22) -
Encoding
:: UndefinedConversionError (22) - Enumerator (171)
-
Enumerator
:: ArithmeticSequence (84) -
Enumerator
:: Chain (30) -
Enumerator
:: Lazy (378) -
Enumerator
:: Yielder (27) - Exception (11)
- File (66)
-
File
:: Stat (462) - Fixnum (30)
- Float (475)
- Hash (243)
- IO (233)
- Integer (122)
- LoadError (11)
- MatchData (268)
- Method (11)
- Module (200)
- NilClass (44)
- NoMethodError (8)
- Numeric (182)
- Object (90)
- Proc (16)
-
Process
:: Status (165) -
Process
:: Tms (44) - Random (44)
- Range (67)
- Rational (315)
- Regexp (30)
-
RubyVM
:: InstructionSequence (31) - StopIteration (11)
- String (387)
- Struct (50)
- Symbol (19)
- SyntaxError (2)
- SystemExit (11)
- Thread (63)
-
Thread
:: Backtrace :: Location (77) - Time (66)
- TracePoint (11)
- UnboundMethod (11)
モジュール
- Enumerable (496)
- GC (11)
- Warning (3)
キーワード
- % (29)
- & (11)
- * (28)
- ** (28)
- + (34)
- - (39)
- -@ (19)
-
/ (28) - < (11)
- << (11)
- <= (11)
- <=> (33)
- == (52)
- === (5)
- > (11)
- >= (11)
- >> (11)
- [] (88)
-
abort
_ on _ exception= (11) - abs (19)
-
absolute
_ path (22) - all? (13)
- allocate (11)
- angle (33)
- any? (14)
-
append
_ features (11) - arg (33)
-
ascii
_ compatible? (11) - atime (22)
- attr (33)
-
attr
_ accessor (11) -
attr
_ reader (11) -
attr
_ writer (11) - autoload (11)
-
backtrace
_ locations (33) -
base
_ label (11) - begin (17)
- birthtime (11)
- blksize (11)
- blockdev? (11)
- blocks (11)
- bsearch (22)
-
bsearch
_ index (9) - byteindex (2)
- byteoffset (4)
- byterindex (2)
- bytes (14)
- captures (11)
- ceil (26)
- chain (6)
- chardev? (11)
- chars (14)
- chunk (33)
-
chunk
_ while (19) - codepoints (14)
- coerce (11)
- collect (33)
- collect! (11)
-
collect
_ concat (33) - combination (22)
- compact (3)
- concat (38)
- conjugate (22)
-
const
_ source _ location (5) - convert (11)
- convpath (11)
- coredump? (11)
- cstime (11)
- ctime (11)
- cutime (11)
- cycle (22)
- deconstruct (2)
-
deconstruct
_ keys (2) -
delete
_ at (11) -
delete
_ if (22) - denominator (55)
-
deprecate
_ constant (9) -
destination
_ encoding (33) -
destination
_ encoding _ name (22) - detect (11)
- dev (11)
-
dev
_ major (11) -
dev
_ minor (11) - directory? (11)
- div (6)
- divmod (11)
- downto (11)
- drop (11)
-
drop
_ while (33) - each (178)
-
each
_ byte (33) -
each
_ char (33) -
each
_ child (6) -
each
_ codepoint (33) -
each
_ cons (11) -
each
_ entry (11) -
each
_ grapheme _ cluster (7) -
each
_ index (11) -
each
_ key (11) -
each
_ line (66) -
each
_ pair (22) -
each
_ slice (11) -
each
_ value (11) -
each
_ with _ index (11) -
each
_ with _ object (11) - eager (5)
- end (17)
-
enum
_ for (44) - eql? (24)
-
exclude
_ end? (6) - executable? (11)
-
executable
_ real? (11) - exited? (11)
- exitstatus (11)
- fdatasync (11)
- fdiv (28)
- feed (11)
-
fetch
_ values (18) - file? (11)
- filter (30)
- filter! (12)
-
filter
_ map (10) - find (11)
-
find
_ all (22) -
find
_ index (22) - finite? (11)
- first (12)
-
flat
_ map (33) - flatten (22)
- flatten! (11)
- flock (11)
- floor (27)
- force (11)
- ftype (11)
-
garbage
_ collect (11) - gid (11)
- grep (33)
-
grep
_ v (31) -
group
_ by (11) - grpowned? (11)
- gsub (44)
- gsub! (44)
- hash (41)
- index (29)
- infinite? (11)
- ino (11)
- inspect (69)
- isatty (11)
-
keep
_ if (22) - key (11)
- label (11)
- last (12)
- lazy (22)
- length (11)
- lineno (11)
- lines (42)
- lstat (11)
- magnitude (19)
- map (33)
- map! (11)
-
marshal
_ dump (11) - match (55)
- match? (24)
-
max
_ by (22) - members (2)
-
min
_ by (22) -
minmax
_ by (11) - mode (11)
- modulo (17)
- mtime (11)
-
named
_ captures (11) - names (11)
- nan? (11)
- negative? (26)
- next (11)
-
next
_ float (10) -
next
_ values (11) - nlink (11)
- none? (13)
- numerator (55)
- offset (22)
- one? (13)
- owned? (11)
- pack (19)
- partition (11)
- path (81)
- peek (11)
-
peek
_ values (11) - permutation (22)
- phase (33)
- pid (11)
- pipe? (11)
- positive? (17)
-
post
_ match (11) -
pre
_ match (11) -
prepend
_ features (11) -
prev
_ float (10) -
primitive
_ convert (44) - printf (22)
- private (23)
-
private
_ call? (8) -
private
_ class _ method (15) -
private
_ constant (11) -
private
_ instance _ methods (11) -
private
_ method _ defined? (11) -
private
_ methods (11) - quo (22)
- rand (33)
- rationalize (99)
- rdev (11)
-
rdev
_ major (11) -
rdev
_ minor (11) - readable? (11)
-
readable
_ real? (11) - regexp (11)
- reject (44)
- reject! (22)
- remainder (3)
-
remove
_ const (11) - reopen (22)
-
repeated
_ combination (22) -
repeated
_ permutation (22) - replicate (11)
-
report
_ on _ exception= (8) -
respond
_ to _ missing? (11) - result (11)
-
reverse
_ each (22) - rewind (17)
- rindex (22)
- rotate (11)
- rotate! (11)
- round (34)
-
ruby2
_ keywords (10) - saturday? (11)
- scan (22)
- select (55)
- select! (22)
- setgid? (11)
- setuid? (11)
- signaled? (11)
- size (56)
- size? (11)
-
slice
_ after (42) -
slice
_ before (55) -
slice
_ when (21) - socket? (11)
-
sort
_ by (11) -
sort
_ by! (11) -
source
_ location (39) - stat (11)
- state (11)
- status (22)
- step (96)
- sticky? (11)
- stime (11)
- stopped? (11)
- stopsig (11)
- strftime (11)
- string (11)
- sub (33)
- sub! (33)
- subsec (11)
- success? (11)
- symlink? (11)
- sync= (11)
- take (11)
-
take
_ while (44) - terminate (11)
- termsig (11)
- then (6)
- times (11)
-
to
_ a (11) -
to
_ binary (9) -
to
_ enum (44) -
to
_ f (83) -
to
_ h (4) -
to
_ i (33) -
to
_ path (24) -
to
_ proc (5) -
to
_ r (77) -
to
_ regexp (11) -
to
_ s (57) - tr (11)
- tr! (11)
-
tr
_ s (11) -
tr
_ s! (11) -
transform
_ keys (7) -
transform
_ keys! (7) -
transform
_ values (8) -
transform
_ values! (8) - truncate (55)
- tty? (11)
- uid (11)
- uniq (16)
- unpack (11)
- unpack1 (8)
- update (22)
- upto (11)
- utime (11)
-
values
_ at (44) - warn (3)
- with (2)
-
with
_ index (32) -
with
_ object (22) -
world
_ readable? (11) -
world
_ writable? (11) - writable? (11)
-
writable
_ real? (11) - yield (11)
-
yield
_ self (7) - zero? (22)
- zip (22)
検索結果
先頭5件
-
Array
# at(nth) -> object | nil (15104.0) -
nth 番目の要素を返します。nth 番目の要素が存在しない時には nil を返します。
nth 番目の要素を返します。nth 番目の要素が存在しない時には nil を返します。
@param nth インデックスを整数で指定します。
先頭の要素が 0 番目になります。nth の値が負の時には末尾から
のインデックスと見倣します。末尾の要素が -1 番目になります。
整数以外のオブジェクトを指定した場合は to_int メソッドによる
暗黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定... -
Array
# repeated _ combination(n) -> Enumerator (12303.0) -
サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。
...得られる組み合わせの順序は保証されません。ブロックなしで呼び出されると、
組み合わせを生成する Enumerator オブジェクトを返します。
@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェ......epeated_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],
# [1,3,3],[2,2,2],[2,2,3],[2,3,3],[3,3,3]]
a.repeated_combinatio......3,3]]
a.repeated_combination(0).to_a #=> [[]] # one combination of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.repeated_combination(3) {|e|... -
Array
# repeated _ permutation(n) -> Enumerator (12303.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...実行します。
得られる順列の順序は保証されません。ブロックなしで呼び出されると, 順列
を生成する Enumerator オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェ......eated_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 permutati......ロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
//}
@see Array#repeated_combination, Array#permutation... -
Array
# repeated _ combination(n) { |c| . . . } -> self (12203.0) -
サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。
...得られる組み合わせの順序は保証されません。ブロックなしで呼び出されると、
組み合わせを生成する Enumerator オブジェクトを返します。
@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェ......epeated_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],
# [1,3,3],[2,2,2],[2,2,3],[2,3,3],[3,3,3]]
a.repeated_combinatio......3,3]]
a.repeated_combination(0).to_a #=> [[]] # one combination of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.repeated_combination(3) {|e|... -
Array
# repeated _ permutation(n) { |p| . . . } -> self (12203.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...実行します。
得られる順列の順序は保証されません。ブロックなしで呼び出されると, 順列
を生成する Enumerator オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェ......eated_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 permutati......ロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
//}
@see Array#repeated_combination, Array#permutation... -
MatchData
# values _ at(*index) -> [String] (12134.0) -
正規表現中の n 番目の括弧にマッチした部分文字列の配列を返します。
...]{
m = /(foo)(bar)(baz)/.match("foobarbaz")
# same as m.to_a.values_at(...)
p m.values_at(0, 1, 2, 3, 4) # => ["foobarbaz", "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 (12103.0) -
マッチした部分より後ろの文字列を返します($'と同じ)。
...マッチした部分より後ろの文字列を返します($'と同じ)。
//emlist[例][ruby]{
/(bar)(BAZ)?/ =~ "foobarbaz"
p $~.post_match # => "baz"
//}
@see MatchData#pre_match... -
MatchData
# pre _ match -> String (12103.0) -
マッチした部分より前の文字列を返します($`と同じ)。
...マッチした部分より前の文字列を返します($`と同じ)。
//emlist[例][ruby]{
/(bar)(BAZ)?/ =~ "foobarbaz"
p $~.pre_match # => "foo"
//}
@see MatchData#post_match... -
Enumerator
:: Lazy # collect _ concat {|item| . . . } -> Enumerator :: Lazy (9203.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......き
* x が each および force メソッドを持つ (例:Enumerator::Lazy) とき
それ以外のときは、x は分解されず、そのままの値として使われます。
//emlist[][ruby]{
[{a:1}, {b:2}].lazy.flat_map {|i| i}.force
#=> [{:a=>1}, {:b=>2}]
//}
@raise ArgumentError ブ......ロックを指定しなかった場合に発生します。
@see Enumerable#flat_map... -
Enumerator
:: Lazy # flat _ map {|item| . . . } -> Enumerator :: Lazy (9203.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......き
* x が each および force メソッドを持つ (例:Enumerator::Lazy) とき
それ以外のときは、x は分解されず、そのままの値として使われます。
//emlist[][ruby]{
[{a:1}, {b:2}].lazy.flat_map {|i| i}.force
#=> [{:a=>1}, {:b=>2}]
//}
@raise ArgumentError ブ......ロックを指定しなかった場合に発生します。
@see Enumerable#flat_map...