ライブラリ
- ビルトイン (3139)
- abbrev (12)
- benchmark (12)
- bigdecimal (12)
-
cgi
/ core (48) - csv (276)
- date (4)
- dbm (24)
- delegate (12)
- erb (12)
- expect (24)
- json (60)
- matrix (96)
-
minitest
/ unit (4) - mkmf (36)
-
net
/ imap (60) - observer (24)
- openssl (72)
- optparse (180)
- ostruct (10)
- pathname (12)
- pp (24)
- pstore (12)
- rake (240)
-
rake
/ rdoctask (24) -
rake
/ testtask (24) -
rdoc
/ context (12) -
rdoc
/ text (12) -
rexml
/ document (48) -
rexml
/ parsers / pullparser (24) -
rexml
/ parsers / ultralightparser (12) -
rinda
/ rinda (36) -
rinda
/ tuplespace (48) -
rubygems
/ command (24) -
rubygems
/ command _ manager (12) -
rubygems
/ commands / update _ command (12) -
rubygems
/ commands / which _ command (24) -
rubygems
/ dependency _ installer (72) -
rubygems
/ dependency _ list (24) -
rubygems
/ format (12) -
rubygems
/ indexer (24) -
rubygems
/ old _ format (12) -
rubygems
/ platform (12) -
rubygems
/ requirement (12) -
rubygems
/ security (24) -
rubygems
/ source _ index (24) -
rubygems
/ source _ info _ cache (12) -
rubygems
/ spec _ fetcher (48) -
rubygems
/ specification (96) -
rubygems
/ user _ interaction (24) - scanf (36)
- set (45)
- shell (18)
-
shell
/ command-processor (6) -
shell
/ filter (6) -
shell
/ process-controller (18) - shellwords (12)
- socket (108)
- thwait (6)
- tsort (24)
-
webrick
/ httprequest (24) -
webrick
/ https (12) -
webrick
/ httpserver (12) -
webrick
/ httputils (24) -
win32
/ registry (12) - win32ole (48)
クラス
-
ARGF
. class (60) - Array (1743)
- BasicSocket (12)
-
Benchmark
:: Tms (12) - BigDecimal (12)
- CSV (96)
-
CSV
:: Row (36) -
CSV
:: Table (132) - DBM (24)
- Data (3)
- Date (2)
- DateTime (2)
- ERB (12)
-
Encoding
:: Converter (24) - Enumerator (24)
-
Gem
:: Command (24) -
Gem
:: CommandManager (12) -
Gem
:: Commands :: UpdateCommand (12) -
Gem
:: Commands :: WhichCommand (24) -
Gem
:: DependencyInstaller (72) -
Gem
:: DependencyList (24) -
Gem
:: Format (12) -
Gem
:: Indexer (24) -
Gem
:: OldFormat (12) -
Gem
:: Platform (12) -
Gem
:: Requirement (12) -
Gem
:: Security :: Policy (12) -
Gem
:: Security :: Signer (12) -
Gem
:: SourceIndex (24) -
Gem
:: SourceInfoCache (12) -
Gem
:: SpecFetcher (48) -
Gem
:: Specification (96) -
Gem
:: StreamUI (12) - Hash (76)
- IO (60)
- IPSocket (36)
-
JSON
:: State (48) - MatchData (62)
- Matrix (24)
- Method (44)
-
MiniTest
:: Unit (2) - Module (192)
-
Net
:: IMAP (12) -
Net
:: IMAP :: BodyTypeBasic (12) -
Net
:: IMAP :: BodyTypeMessage (12) -
Net
:: IMAP :: BodyTypeMultipart (12) -
Net
:: IMAP :: BodyTypeText (12) - NilClass (12)
- Object (136)
-
OpenSSL
:: BN (12) -
OpenSSL
:: X509 :: ExtensionFactory (36) - OpenStruct (10)
- OptionParser (144)
-
OptionParser
:: ParseError (36) - PStore (12)
- Pathname (12)
-
RDoc
:: Context (12) -
REXML
:: Element (12) -
REXML
:: Parent (36) -
REXML
:: Parsers :: PullEvent (24) -
REXML
:: Parsers :: UltraLightParser (12) -
Rake
:: Application (12) -
Rake
:: FileList (84) -
Rake
:: NameSpace (12) -
Rake
:: RDocTask (24) -
Rake
:: Task (48) -
Rake
:: TaskArguments (12) -
Rake
:: TestTask (24) - Random (36)
- Range (38)
- Rational (24)
- Regexp (12)
-
Rinda
:: TupleEntry (12) -
Rinda
:: TupleSpace (36) -
Rinda
:: TupleSpaceProxy (36) -
RubyVM
:: AbstractSyntaxTree :: Node (7) -
RubyVM
:: InstructionSequence (12) - Set (60)
- Shell (18)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) -
Shell
:: ProcessController (18) - Socket (36)
-
Socket
:: Option (12) - String (57)
- Struct (28)
- ThreadsWait (6)
- Time (14)
- UDPSocket (12)
- UnboundMethod (24)
- Vector (72)
-
WEBrick
:: HTTPRequest (36) -
WEBrick
:: HTTPServer :: MountTable (12) -
WEBrick
:: HTTPUtils :: FormData (24) - WIN32OLE (12)
-
WIN32OLE
_ VARIANT (36) -
Win32
:: Registry (12)
モジュール
-
CGI
:: QueryExtension (24) -
CGI
:: QueryExtension :: Value (24) - Enumerable (556)
- FileUtils (12)
-
Gem
:: UserInteraction (12) -
JSON
:: Generator :: GeneratorMethods :: Array (12) - Kernel (60)
-
MiniTest
:: Assertions (2) - Observable (24)
-
OpenSSL
:: SSL :: SocketForwarder (24) -
RDoc
:: Text (12) -
Rake
:: TaskManager (48) - TSort (24)
キーワード
- & (24)
- * (36)
- + (12)
- - (12)
- << (12)
- <=> (12)
- == (36)
- === (8)
- =~ (16)
- DelegateClass (12)
- [] (192)
- []= (72)
-
_ invoke (12) - abbrev (12)
- accept (12)
-
accept
_ nonblock (12) - actions (12)
-
active
_ jobs (6) -
add
_ attributes (12) -
add
_ bindir (12) -
add
_ extra _ args (12) -
add
_ observer (12) -
add
_ to (12) - addr (36)
- all? (45)
- any? (39)
-
arg
_ names (12) - args (12)
-
array
_ nl (12) -
array
_ nl= (12) -
assert
_ send (1) - at (12)
- bsearch (48)
-
bsearch
_ index (20) - call (24)
-
capture
_ io (1) -
cert
_ chain (24) - children (7)
-
choose
_ from _ list (24) - cipher (12)
- class (12)
- coerce (48)
- collect (48)
- collect! (24)
- collect2 (24)
-
collect
_ concat (24) - combination (24)
- compact (25)
- compact! (21)
-
compact
_ specs (12) - concat (33)
- converters (12)
- convpath (12)
- count (72)
-
create
_ ext _ from _ array (12) -
create
_ extension (24) -
current
_ scope (12) - cycle (12)
-
deconstruct
_ keys (17) - delete (24)
-
delete
_ at (12) -
delete
_ if (24) -
delete
_ observers (12) - dependencies (12)
-
dependent
_ gems (12) -
development
_ dependencies (12) - difference (7)
- dig (40)
-
drop
_ while (48) - each (24)
- each2 (24)
-
each
_ index (12) - empty? (24)
- entries (7)
-
enum
_ for (24) - eql? (24)
- expect (24)
- extension (48)
- fcntl (12)
- fetch (48)
-
fetch
_ values (2) -
file
_ entries (24) - fill (24)
- filter (14)
- filter! (14)
-
find
_ command _ possibilities (12) -
find
_ gems _ with _ sources (12) -
find
_ index (36) -
find
_ matching (12) -
find
_ paths (12) -
find
_ spec _ by _ name _ and _ version (12) -
find
_ type (24) - first (48)
-
flat
_ map (24) - flatten (36)
- flatten! (24)
-
force
_ encoding (12) - freeze (12)
-
gather
_ dependencies (12) -
gem
_ file _ list (12) -
gem
_ paths (12) -
gems
_ to _ install (12) -
get
_ all _ gem _ names (12) - gets (12)
- grep (24)
- hash (12)
-
header
_ converters (12) - headers (24)
- import (12)
-
in
_ namespace (12) - index (36)
- insert (12)
- inspect (12)
- install (12)
-
install
_ rb (12) -
installed
_ gems (12) - intersect? (4)
- intersection (18)
- ioctl (12)
-
is
_ a? (12) - jobs (6)
- join (12)
-
keep
_ if (24) -
kind
_ of? (12) - last (24)
-
latest
_ specs (12) -
legacy
_ repos (12) - length (36)
- libs (12)
- list (24)
- map (48)
- map! (24)
- map2 (12)
-
marshal
_ dump (12) - max (42)
-
max
_ by (48) - min (42)
-
min
_ by (48) - minmax (24)
- mkdir (18)
-
module
_ function (36) - names (12)
-
next
_ values (12) - none? (14)
- on (144)
- one? (42)
-
option
_ list (12) - outdated (12)
- pack (21)
- params (12)
- parse (24)
-
pathmap
_ explode (12) -
peek
_ values (12) - peeraddr (36)
- permutation (24)
- pop (12)
- prerequisites (12)
-
pretty
_ print (12) -
pretty
_ print _ cycle (12) -
primitive
_ errinfo (12) - private (48)
-
private
_ class _ method (24) - product (24)
- protected (48)
- public (12)
-
public
_ class _ method (24) - rand (36)
- read (36)
-
read
_ all (24) - readline (12)
- readlines (36)
- recover (12)
- recvfrom (12)
-
recvfrom
_ nonblock (12) - reject (48)
- reject! (24)
-
remove
_ by _ name (12) -
repeated
_ combination (24) -
repeated
_ permutation (24) - replace (12)
- report (1)
- requirements (12)
-
resolve
_ args (12) -
response
_ handlers (12) -
reverse
_ each (24) - rindex (36)
- roots (12)
- rotate (12)
- rotate! (12)
-
ruby
_ opts (12) -
run
_ test _ suites (1) -
runtime
_ dependencies (12) - sample (24)
- scan (12)
- scanf (36)
-
search
_ with _ source (12) - select (36)
- select! (24)
- sendmsg (12)
-
set
_ backtrace (12) -
set
_ eoutvar (12) - shelljoin (12)
- shift (48)
- size (36)
- slice (12)
- slice! (24)
- sort (24)
- sort! (24)
-
sort
_ by (24) -
sort
_ by! (24) - sources (12)
-
spec
_ predecessors (12) - split (12)
-
split
_ all (12) -
strongly
_ connected _ components (12) - sum (42)
- sysaccept (12)
-
system
_ path (6) -
system
_ path= (6) - table (12)
- take (48)
-
take
_ while (48) - tap (12)
- tasks (24)
- threads (6)
-
to
_ a (223) -
to
_ ary (60) -
to
_ csv (12) -
to
_ enum (24) -
to
_ h (31) -
to
_ hash (12) -
to
_ json (12) -
to
_ s (12) -
top
_ level _ tasks (12) - transpose (12)
- tsort (12)
- union (7)
- uniq (24)
- uniq! (12)
- unpack (24)
- unpack1 (9)
- unshift (12)
- value (12)
-
values
_ at (60) - vartype (12)
-
verify
_ gem (12) -
waiting
_ jobs (6) -
which
_ to _ update (12) - zip (24)
- | (12)
検索結果
先頭5件
-
Array
# compact -> Array (15202.0) -
compact は自身から nil を取り除いた配列を生成して返します。 compact! は自身から破壊的に nil を取り除き、変更が 行われた場合は self を、そうでなければ nil を返します。
...ompact は自身から nil を取り除いた配列を生成して返します。
compact! は自身から破壊的に nil を取り除き、変更が
行われた場合は self を、そうでなければ nil を返します。
//emlist[例][ruby]{
ary = [1, nil, 2, nil, 3, nil]
p ary.compact #=......> [1, 2, 3]
p ary #=> [1, nil, 2, nil, 3, nil]
ary.compact!
p ary #=> [1, 2, 3]
p ary.compact! #=> nil
//}... -
Array
# flatten(lv = nil) -> Array (15202.0) -
flatten は自身を再帰的に平坦化した配列を生成して返します。flatten! は 自身を再帰的かつ破壊的に平坦化し、平坦化が行われた場合は self をそうでない 場合は nil を返します。 lv が指定された場合、lv の深さまで再帰的に平坦化します。
...flatten は自身を再帰的に平坦化した配列を生成して返します。flatten! は
自身を再帰的かつ破壊的に平坦化し、平坦化が行われた場合は self をそうでない
場合は nil を返します。
lv が指定された場合、lv の深さまで再帰的に......を指定した場合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
@raise ArgumentError 配列要素が自身......を含むような無限にネストした配列に対して flatten を呼んだ場合に発生します。
//emlist[例][ruby]{
# 自身を再帰的に平坦化する例。
a = [1, [2, 3, [4], 5]]
p a.flatten #=> [1, 2, 3, 4, 5]
p a #=> [1, [2, 3, [... -
Array
# product(*lists) -> Array (15202.0) -
レシーバの配列と引数で与えられた配列(複数可)のそれぞれから要素を1 個ずつとって配列とし,それらのすべての配列を要素とする配列を返します。
...のすべての積にな
ります。
@param lists 配列。複数指定可能。
//emlist[例][ruby]{
[1,2,3].product([4,5]) # => [[1,4],[1,5],[2,4],[2,5],[3,4],[3,5]]
[1,2].product([1,2]) # => [[1,1],[1,2],[2,1],[2,2]]
[1,2].product([3,4],[5,6]) # => [[1,3,5],[1,3,6],[1,4,5],[1,4,6],......],[2,4,6]]
[1,2].product() # => [[1],[2]]
[1,2].product([]) # => []
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = []
[1,2,3].product([4,5]) {|e| a << e} #... -
Array
# take(n) -> Array (15202.0) -
配列の先頭から n 要素を配列として返します。 このメソッドは自身を破壊的に変更しません。
...配列の先頭から n 要素を配列として返します。
このメソッドは自身を破壊的に変更しません。
@param n 要素数を指定します。
//emlist[例][ruby]{
a = [1, 2, 3, 4, 5, 0]
a.take(3) # => [1, 2, 3]
//}
@see Enumerable#take... -
Array
# take _ while {|element| . . . } -> Array (15202.0) -
配列の要素を順に偽になるまでブロックで評価します。 最初に偽になった要素の手前の要素までを配列として返します。 このメソッドは自身を破壊的に変更しません。
...の要素までを配列として返します。
このメソッドは自身を破壊的に変更しません。
//emlist[例][ruby]{
a = [1, 2, 3, 4, 5, 0]
a.take_while {|i| i < 3 } # => [1, 2]
//}
ブロックを省略した場合は Enumerator を返します。
@see Enumerable#take_while... -
Array
# values _ at(*selectors) -> Array (15202.0) -
引数で指定されたインデックスに対応する要素を配列で返します。インデッ クスに対応する値がなければ nil が要素になります。
...。
@param selectors インデックスを整数もしくは整数の Range で指定します。
//emlist[例][ruby]{
ary = %w( a b c d e )
p ary.values_at( 0, 2, 4 ) #=> ["a", "c", "e"]
p ary.values_at( 3, 4, 5, 6, 35 ) #=> ["d", "e", nil, nil, nil]
p ary.values_at( 0, -1, -2 )......a", "e", "d"]
p ary.values_at( -4, -5, -6, -35 ) #=> ["b", "a", nil, nil]
p ary.values_at( 1..2 ) #=> ["b", "c"]
p ary.values_at( 3..10 ) #=> ["d", "e", nil, nil, nil, nil, nil, nil]
p ary.values_at( 6..7 ) #=> [nil, nil]
p ary.values_at( 0, 3..5 ) #=> ["... -
Array
# delete _ at(pos) -> object | nil (15125.0) -
指定された位置 pos にある要素を取り除きそれを返します。 pos が範囲外であったら nil を返します。
...返します。
Array#at と同様に負のインデックスで末尾から位置を指定するこ
とができます。
@param pos 削除したい要素のインデックスを整数で指定します。
整数以外のオブジェクトを指定した場合は to_int メソッドに......暗黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
array = [0, 1, 2, 3, 4]
array.delete_at 2
p array #=> [0, 1, 3, 4]
//}... -
Array
# to _ ary -> self (15125.0) -
self をそのまま返します。
...をそのまま返します。
//emlist[例][ruby]{
class SubArray < Array; end
ary1 = Array([1, 2, 3, 4])
ary2 = SubArray([1, 2, 3, 4])
ary1.to_ary # => [1, 2, 3, 4]
ary1.to_ary.class # => Array
ary2.to_ary # => [1, 2, 3, 4]
ary2.to_ary.class # => SubArray
//}
@see Array#to_a... -
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] # こちらは変わらない
/...