別のキーワード
ライブラリ
- ビルトイン (1131)
- abbrev (12)
- csv (36)
- date (4)
- delegate (12)
- expect (24)
- json (60)
- matrix (48)
- observer (12)
- openssl (36)
- optparse (36)
- pathname (12)
- rake (36)
-
rexml
/ document (12) -
rubygems
/ commands / update _ command (12) -
rubygems
/ commands / which _ command (24) -
rubygems
/ dependency _ installer (12) -
rubygems
/ dependency _ list (12) -
rubygems
/ format (12) -
rubygems
/ old _ format (12) -
rubygems
/ platform (12) -
rubygems
/ requirement (12) -
rubygems
/ security (12) -
rubygems
/ source _ index (24) -
rubygems
/ source _ info _ cache (12) -
rubygems
/ spec _ fetcher (24) -
rubygems
/ specification (96) - scanf (36)
- set (18)
- shell (18)
-
shell
/ command-processor (6) -
shell
/ filter (6) - socket (36)
-
webrick
/ httpserver (12) -
webrick
/ httputils (24)
クラス
- Array (577)
-
CSV
:: Row (24) -
CSV
:: Table (12) - Data (3)
- Date (2)
- DateTime (2)
-
Encoding
:: Converter (12) - Enumerator (24)
-
Gem
:: Commands :: UpdateCommand (12) -
Gem
:: Commands :: WhichCommand (24) -
Gem
:: DependencyInstaller (12) -
Gem
:: DependencyList (12) -
Gem
:: Format (12) -
Gem
:: OldFormat (12) -
Gem
:: Platform (12) -
Gem
:: Requirement (12) -
Gem
:: Security :: Policy (12) -
Gem
:: SourceIndex (24) -
Gem
:: SourceInfoCache (12) -
Gem
:: SpecFetcher (24) -
Gem
:: Specification (96) - Hash (24)
- IO (36)
- IPSocket (12)
-
JSON
:: State (48) - MatchData (62)
- Matrix (24)
- Module (72)
- Object (48)
-
OpenSSL
:: X509 :: ExtensionFactory (36) - OptionParser (36)
- Pathname (12)
-
REXML
:: Element (12) -
Rake
:: Application (12) - Random (36)
- Range (12)
- Rational (24)
- Set (24)
- Shell (18)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) -
Socket
:: Option (12) - String (45)
- UDPSocket (12)
- Vector (24)
-
WEBrick
:: HTTPServer :: MountTable (12) -
WEBrick
:: HTTPUtils :: FormData (24)
モジュール
- Enumerable (222)
- FileUtils (12)
-
JSON
:: Generator :: GeneratorMethods :: Array (12) - Kernel (24)
- Observable (12)
キーワード
- DelegateClass (12)
- [] (84)
- abbrev (12)
-
add
_ attributes (12) -
add
_ bindir (12) -
add
_ observer (12) - addr (12)
- all? (15)
- any? (16)
-
array
_ nl (12) -
array
_ nl= (12) - bsearch (24)
-
bsearch
_ index (10) -
cert
_ chain (12) - coerce (24)
- collect (24)
- collect! (12)
- collect2 (12)
-
collect
_ concat (24) - combination (24)
- concat (33)
- convpath (12)
-
create
_ ext _ from _ array (12) -
create
_ extension (24) - cycle (12)
-
deconstruct
_ keys (9) -
delete
_ at (12) -
delete
_ if (12) - dependencies (12)
-
dependent
_ gems (12) -
development
_ dependencies (12) -
drop
_ while (24) - each (12)
- each2 (12)
-
each
_ index (12) -
enum
_ for (24) - expect (24)
- fetch (12)
-
fetch
_ values (2) - fields (12)
-
file
_ entries (24) - filter (7)
- filter! (7)
-
find
_ index (12) -
find
_ matching (12) -
find
_ paths (12) -
flat
_ map (24) - flatten (36)
- flatten! (24)
-
gather
_ dependencies (12) -
gem
_ paths (12) - grep (24)
- index (12)
-
keep
_ if (12) -
latest
_ specs (12) - list (12)
- map (24)
- map! (12)
-
marshal
_ dump (12) -
max
_ by (24) -
min
_ by (24) - mkdir (18)
-
next
_ values (12) - none? (14)
- on (36)
- one? (14)
- outdated (12)
- pack (21)
-
pathmap
_ explode (12) -
peek
_ values (12) - permutation (24)
- private (48)
-
private
_ class _ method (24) - rand (36)
-
recvfrom
_ nonblock (12) - reject (24)
- reject! (12)
-
remove
_ by _ name (12) -
repeated
_ combination (24) -
repeated
_ permutation (24) - requirements (12)
-
reverse
_ each (12) - rindex (12)
- rotate (12)
- rotate! (12)
-
runtime
_ dependencies (12) - scan (12)
- scanf (36)
-
search
_ with _ source (12) - select (12)
- select! (12)
-
sort
_ by (12) -
sort
_ by! (12) - split (12)
-
split
_ all (12) -
system
_ path (6) -
system
_ path= (6) -
take
_ while (24) -
to
_ a (24) -
to
_ ary (12) -
to
_ enum (24) -
to
_ h (12) -
to
_ hash (12) -
to
_ json (12) -
top
_ level _ tasks (12) - unpack (24)
- unpack1 (9)
-
values
_ at (60) -
verify
_ gem (12) -
which
_ to _ update (12)
検索結果
先頭5件
-
Array
# concat(*other _ arrays) -> self (15210.0) -
other_arrays の要素を自身の末尾に破壊的に連結します。
...other_arrays の要素を自身の末尾に破壊的に連結します。
@param other_arrays 自身と連結したい配列を指定します。
//emlist[例][ruby]{
[ "a", "b" ].concat( ["c", "d"] ) #=> [ "a", "b", "c", "d" ]
[ "a" ].concat( ["b"], ["c", "d"] ) #=> [ "a", "b", "c", "d" ]
[ "a"......].concat #=> [ "a" ]
a = [ 1, 2, 3 ]
a.concat( [ 4, 5 ] )
a #=> [ 1, 2, 3, 4, 5 ]
a = [ 1, 2 ]
a.concat(a, a) #=> [1, 2, 1, 2, 1, 2]
//}
@see Array#+... -
Array
# rotate(cnt = 1) -> Array (15208.0) -
cnt で指定したインデックスの要素が先頭になる配列を新しく作成します。 cnt より前の要素は末尾に移動します。cnt に負の数を指定した場合、逆の操 作を行います。
...ます。
//emlist[例][ruby]{
a = [ "a", "b", "c", "d" ]
a.rotate # => ["b", "c", "d", "a"]
a # => ["a", "b", "c", "d"]
a.rotate(2) # => ["c", "d", "a", "b"]
a.rotate(-1) # => ["d", "a", "b", "c"]
a.rotate(-3) # => ["b", "c", "d", "a"]
//}
@see Array#rotate!... -
Array
# flatten(lv = nil) -> Array (15202.0) -
flatten は自身を再帰的に平坦化した配列を生成して返します。flatten! は 自身を再帰的かつ破壊的に平坦化し、平坦化が行われた場合は self をそうでない 場合は nil を返します。 lv が指定された場合、lv の深さまで再帰的に平坦化します。
...flatten は自身を再帰的に平坦化した配列を生成して返します。flatten! は
自身を再帰的かつ破壊的に平坦化し、平坦化が行われた場合は self をそうでない
場合は nil を返します。
lv が指定された場合、lv の深さまで再帰的に......要素が自身を含むような無限にネストした配列に対して flatten を呼んだ場合に発生します。
//emlist[例][ruby]{
# 自身を再帰的に平坦化する例。
a = [1, [2, 3, [4], 5]]
p a.flatten #=> [1, 2, 3, 4, 5]
p a #......[2, 3]]]]
p a.flatten! #=> [1, 2, 3]
p a #=> [1, 2, 3]
# 平坦化が行われない場合は nil を返す。
p [1, 2, 3].flatten! #=> nil
# 平坦化の再帰の深さを指定する例。
a = [ 1, 2, [3, [4, 5] ] ]
a.flatten(1)... -
Array
# delete _ at(pos) -> object | nil (15138.0) -
指定された位置 pos にある要素を取り除きそれを返します。 pos が範囲外であったら nil を返します。
...指定された位置 pos にある要素を取り除きそれを返します。
pos が範囲外であったら nil を返します。
Array#at と同様に負のインデックスで末尾から位置を指定するこ
とができます。
@param pos 削除したい要素のインデックス......暗黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
array = [0, 1, 2, 3, 4]
array.delete_at 2
p array #=> [0, 1, 3, 4]
//}... -
Array
# concat(other) -> self (15120.0) -
配列 other を自身の末尾に破壊的に連結します。
...other を自身の末尾に破壊的に連結します。
@param other 自身と連結したい配列を指定します。
//emlist[例][ruby]{
array = [1, 2]
a = [3, 4]
array.concat a
p array # => [1, 2, 3, 4]
p a # => [3, 4] # こちらは変わらない
//}......列 other を自身の末尾に破壊的に連結します。
@param other 自身と連結したい配列を指定します。
//emlist[例][ruby]{
array = [1, 2]
a = [3, 4]
array.concat a
p array # => [1, 2, 3, 4]
p a # => [3, 4] # こちらは変わらない
//}... -
Array
# combination(n) {|c| block } -> self (15113.0) -
サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。
...得られる組み合わせの順序は保証されません。ブロックなしで呼び出されると、組み合わせ
を生成する Enumerator オブジェクトを返します。
@param n 生成される配列のサイズを整数で指定します。
整数以外のオブジェ......3, 4]
a.combination(1).to_a #=> [[1],[2],[3],[4]]
a.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
a.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]
a.combination(4).to_a #=> [[1,2,3,4]]
a.combination(0).to_a #=> [[]]: one combination of length 0
a.combination(5).to_a......#=> [] : no combinations of length 5
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3, 4]
result = []
a.combination(2) {|e| result << e} # => [1,2,3,4]
result #=> [[1,2... -
Array
# permutation(n = self . length) { |p| block } -> self (15113.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...行します。
得られる順列の順序は保証されません。ブロックなしで呼び出されると, 順列
を生成する Enumerator オブジェクトを返します。
@param n 生成する配列のサイズを整数で指定します。
整数以外のオブジェク......utation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(1).to_a #=> [[1],[2],[3]]
a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(0).to_a #=> [[]]: one permutati......n of length 0
a.permutation(4).to_a #=> [] : no permutations of length 4
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e| result <<... -
Array
# rotate!(cnt = 1) -> self (15107.0) -
cnt で指定したインデックスの要素が先頭になるように自身の順番を変更しま す。cnt より前の要素は末尾に移動します。cnt に負の数を指定した場合、逆 の操作を行います。
...指定した場合に発生します。
//emlist[例][ruby]{
a = [ "a", "b", "c", "d" ]
a.rotate! #=> ["b", "c", "d", "a"]
a #=> ["b", "c", "d", "a"]
a.rotate!(2) #=> ["d", "a", "b", "c"]
a.rotate!(-3) #=> ["a", "b", "c", "d"]
//}
@see Array#rotate... -
Array
# flatten!(lv = nil) -> self | nil (15102.0) -
flatten は自身を再帰的に平坦化した配列を生成して返します。flatten! は 自身を再帰的かつ破壊的に平坦化し、平坦化が行われた場合は self をそうでない 場合は nil を返します。 lv が指定された場合、lv の深さまで再帰的に平坦化します。
...flatten は自身を再帰的に平坦化した配列を生成して返します。flatten! は
自身を再帰的かつ破壊的に平坦化し、平坦化が行われた場合は self をそうでない
場合は nil を返します。
lv が指定された場合、lv の深さまで再帰的に......要素が自身を含むような無限にネストした配列に対して flatten を呼んだ場合に発生します。
//emlist[例][ruby]{
# 自身を再帰的に平坦化する例。
a = [1, [2, 3, [4], 5]]
p a.flatten #=> [1, 2, 3, 4, 5]
p a #......[2, 3]]]]
p a.flatten! #=> [1, 2, 3]
p a #=> [1, 2, 3]
# 平坦化が行われない場合は nil を返す。
p [1, 2, 3].flatten! #=> nil
# 平坦化の再帰の深さを指定する例。
a = [ 1, 2, [3, [4, 5] ] ]
a.flatten(1)...