6728件ヒット
[1-100件を表示]
(0.250秒)
ライブラリ
- ビルトイン (6728)
クラス
-
ARGF
. class (150) - Array (563)
- Bignum (33)
- Binding (7)
- Class (12)
- Complex (120)
- Data (33)
- Dir (43)
- Encoding (24)
-
Encoding
:: Converter (72) -
Encoding
:: InvalidByteSequenceError (24) -
Encoding
:: UndefinedConversionError (24) - Enumerator (187)
-
Enumerator
:: ArithmeticSequence (98) -
Enumerator
:: Chain (35) -
Enumerator
:: Lazy (417) -
Enumerator
:: Yielder (30) - Exception (12)
- File (72)
-
File
:: Stat (504) - Fixnum (30)
- Float (519)
- Hash (267)
- IO (252)
- Integer (132)
- LoadError (12)
- MatchData (298)
- Method (12)
- Module (264)
- NilClass (48)
- NoMethodError (9)
- Numeric (200)
- Object (99)
- Proc (18)
-
Process
:: Status (180) -
Process
:: Tms (48) - Random (48)
- Range (77)
- Rational (345)
- Regexp (33)
-
RubyVM
:: InstructionSequence (34) - Set (6)
- StopIteration (12)
- String (425)
- Struct (55)
- Symbol (21)
- SyntaxError (3)
- SystemExit (12)
- Thread (69)
-
Thread
:: Backtrace :: Location (84) - Time (72)
- TracePoint (12)
- UnboundMethod (12)
モジュール
- Enumerable (544)
- GC (12)
- Warning (4)
キーワード
- % (32)
- & (12)
- * (30)
- ** (30)
- + (37)
- - (42)
- -@ (21)
-
/ (30) - < (12)
- << (12)
- <= (12)
- <=> (36)
- == (58)
- === (6)
- > (12)
- >= (12)
- >> (12)
- [] (96)
-
abort
_ on _ exception= (12) - abs (21)
-
absolute
_ path (24) - all? (15)
- allocate (12)
- angle (36)
- any? (16)
-
append
_ features (12) - arg (36)
-
ascii
_ compatible? (12) - atime (24)
- attr (36)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) - autoload (12)
-
backtrace
_ locations (36) -
base
_ label (12) - begin (19)
- birthtime (12)
- blksize (12)
- blockdev? (12)
- blocks (12)
- bsearch (24)
-
bsearch
_ index (10) - byteindex (3)
- byteoffset (6)
- byterindex (3)
- bytes (14)
- captures (12)
- ceil (28)
- chain (7)
- chardev? (12)
- chars (14)
- chunk (36)
-
chunk
_ while (21) - codepoints (14)
- coerce (12)
- collect (36)
- collect! (12)
-
collect
_ concat (36) - combination (24)
- compact (4)
- concat (42)
- conjugate (24)
-
const
_ source _ location (12) - convert (12)
- convpath (12)
- coredump? (12)
- cstime (12)
- ctime (12)
- cutime (12)
- cycle (24)
- deconstruct (5)
-
deconstruct
_ keys (5) -
delete
_ at (12) -
delete
_ if (24) - denominator (60)
-
deprecate
_ constant (12) -
destination
_ encoding (36) -
destination
_ encoding _ name (24) - detect (12)
- dev (12)
-
dev
_ major (12) -
dev
_ minor (12) - directory? (12)
- div (6)
- divmod (12)
- downto (12)
- drop (12)
-
drop
_ while (36) - each (196)
-
each
_ byte (36) -
each
_ char (36) -
each
_ child (7) -
each
_ codepoint (36) -
each
_ cons (12) -
each
_ entry (12) -
each
_ grapheme _ cluster (8) -
each
_ index (12) -
each
_ key (12) -
each
_ line (72) -
each
_ pair (24) -
each
_ slice (12) -
each
_ value (12) -
each
_ with _ index (12) -
each
_ with _ object (12) - eager (6)
- end (19)
-
enum
_ for (48) - eql? (27)
-
exclude
_ end? (7) - executable? (12)
-
executable
_ real? (12) - exited? (12)
- exitstatus (12)
- fdatasync (12)
- fdiv (30)
- feed (12)
-
fetch
_ values (20) - file? (12)
- filter (35)
- filter! (14)
-
filter
_ map (12) - find (12)
-
find
_ all (24) -
find
_ index (24) - finite? (12)
- first (14)
-
flat
_ map (36) - flatten (27)
- flatten! (15)
- flock (12)
- floor (29)
- force (12)
- ftype (12)
-
garbage
_ collect (12) - gid (12)
- grep (36)
-
grep
_ v (34) -
group
_ by (12) - grpowned? (12)
- gsub (48)
- gsub! (48)
- hash (46)
- index (31)
- infinite? (12)
- ino (12)
- inspect (77)
- isatty (12)
-
keep
_ if (24) - key (12)
- label (12)
- last (14)
- lazy (24)
- length (12)
- lineno (12)
- lines (42)
- lstat (12)
- magnitude (21)
- map (36)
- map! (12)
-
marshal
_ dump (12) - match (60)
- match? (27)
-
max
_ by (24) - members (3)
-
min
_ by (24) -
minmax
_ by (12) - mode (12)
- modulo (18)
- mtime (12)
-
named
_ captures (12) - names (12)
- nan? (12)
- negative? (29)
- next (12)
-
next
_ float (11) -
next
_ values (12) - nlink (12)
- none? (15)
- numerator (60)
- offset (24)
- one? (15)
- owned? (12)
- pack (21)
- partition (12)
- path (90)
- peek (12)
-
peek
_ values (12) - permutation (24)
- phase (36)
- pid (12)
- pipe? (12)
- positive? (19)
-
post
_ match (12) -
pre
_ match (12) -
prepend
_ features (12) -
prev
_ float (11) -
primitive
_ convert (48) - printf (24)
- private (48)
-
private
_ call? (9) -
private
_ class _ method (24) -
private
_ constant (12) -
private
_ instance _ methods (12) -
private
_ method _ defined? (12) -
private
_ methods (12) - quo (24)
- rand (36)
- rationalize (108)
- rdev (12)
-
rdev
_ major (12) -
rdev
_ minor (12) - readable? (12)
-
readable
_ real? (12) - regexp (12)
- reject (48)
- reject! (24)
- remainder (3)
-
remove
_ const (12) - reopen (24)
-
repeated
_ combination (24) -
repeated
_ permutation (24) - replicate (12)
-
report
_ on _ exception= (9) -
respond
_ to _ missing? (12) - result (12)
-
reverse
_ each (26) - rewind (19)
- rindex (24)
- rotate (12)
- rotate! (12)
- round (37)
-
ruby2
_ keywords (18) - saturday? (12)
- scan (24)
- select (60)
- select! (24)
- setgid? (12)
- setuid? (12)
- signaled? (12)
- size (62)
- size? (12)
-
slice
_ after (46) -
slice
_ before (60) -
slice
_ when (23) - socket? (12)
-
sort
_ by (12) -
sort
_ by! (12) -
source
_ location (43) - stat (12)
- state (12)
- status (24)
- step (107)
- sticky? (12)
- stime (12)
- stopped? (12)
- stopsig (12)
- strftime (12)
- string (12)
- sub (36)
- sub! (36)
- subsec (12)
- success? (12)
- symlink? (12)
- sync= (12)
- take (12)
-
take
_ while (48) - terminate (12)
- termsig (12)
- then (7)
- times (12)
-
to
_ a (12) -
to
_ binary (10) -
to
_ enum (48) -
to
_ f (90) -
to
_ h (6) -
to
_ i (36) -
to
_ path (27) -
to
_ proc (6) -
to
_ r (84) -
to
_ regexp (12) -
to
_ s (63) - tr (12)
- tr! (12)
-
tr
_ s (12) -
tr
_ s! (12) -
transform
_ keys (8) -
transform
_ keys! (8) -
transform
_ values (9) -
transform
_ values! (9) - truncate (60)
- tty? (12)
- uid (12)
- uniq (18)
- unpack (12)
- unpack1 (9)
- update (24)
- upto (12)
- utime (12)
-
values
_ at (48) - warn (4)
- with (3)
-
with
_ index (36) -
with
_ object (24) -
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) - yield (12)
-
yield
_ self (8) - zero? (24)
- zip (24)
検索結果
先頭5件
-
Array
# at(nth) -> object | nil (23102.0) -
nth 番目の要素を返します。nth 番目の要素が存在しない時には nil を返します。
nth 番目の要素を返します。nth 番目の要素が存在しない時には nil を返します。
@param nth インデックスを整数で指定します。
先頭の要素が 0 番目になります。nth の値が負の時には末尾から
のインデックスと見倣します。末尾の要素が -1 番目になります。
整数以外のオブジェクトを指定した場合は to_int メソッドによる
暗黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定... -
Array
# repeated _ combination(n) -> Enumerator (20301.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 (20301.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 (20201.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 (20201.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] (20132.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 (20101.0) -
マッチした部分より後ろの文字列を返します($'と同じ)。
...マッチした部分より後ろの文字列を返します($'と同じ)。
//emlist[例][ruby]{
/(bar)(BAZ)?/ =~ "foobarbaz"
p $~.post_match # => "baz"
//}
@see MatchData#pre_match... -
MatchData
# pre _ match -> String (20101.0) -
マッチした部分より前の文字列を返します($`と同じ)。
...マッチした部分より前の文字列を返します($`と同じ)。
//emlist[例][ruby]{
/(bar)(BAZ)?/ =~ "foobarbaz"
p $~.pre_match # => "foo"
//}
@see MatchData#post_match... -
Enumerator
:: Lazy # collect _ concat {|item| . . . } -> Enumerator :: Lazy (17201.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...