ライブラリ
- ビルトイン (3806)
- abbrev (12)
- benchmark (12)
- bigdecimal (12)
-
cgi
/ core (48) - csv (312)
- date (4)
- dbm (24)
- delegate (12)
- erb (12)
- expect (24)
- json (48)
- matrix (96)
-
minitest
/ unit (4) - mkmf (48)
-
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 (12) -
rexml
/ parsers / pullparser (24) -
rexml
/ parsers / ultralightparser (12) -
rinda
/ rinda (36) -
rinda
/ tuplespace (48) -
rubygems
/ command (24) -
rubygems
/ command _ manager (24) -
rubygems
/ commands / build _ command (12) -
rubygems
/ commands / dependency _ command (12) -
rubygems
/ commands / update _ command (12) -
rubygems
/ commands / which _ command (24) -
rubygems
/ config _ file (12) -
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) -
rubygems
/ version (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) - win32ole (48)
- zlib (12)
クラス
-
ARGF
. class (84) - Array (2192)
- BasicSocket (12)
-
Benchmark
:: Tms (12) - BigDecimal (12)
-
CGI
:: Cookie (12) - CSV (96)
-
CSV
:: Row (72) -
CSV
:: Table (132) - Complex (12)
- DBM (24)
- Data (3)
- Date (2)
- DateTime (2)
- ERB (12)
-
Encoding
:: Converter (24) - Enumerator (24)
-
Gem
:: Command (24) -
Gem
:: CommandManager (24) -
Gem
:: Commands :: BuildCommand (12) -
Gem
:: Commands :: DependencyCommand (12) -
Gem
:: Commands :: UpdateCommand (12) -
Gem
:: Commands :: WhichCommand (24) -
Gem
:: ConfigFile (12) -
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) -
Gem
:: Version (24) - Hash (100)
- IO (60)
- IPSocket (36)
-
JSON
:: State (36) - MatchData (62)
- Matrix (24)
- Method (44)
-
MiniTest
:: Unit (2) - Module (228)
-
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
:: 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 (60)
- 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) -
Zlib
:: GzipReader (12)
モジュール
-
CGI
:: QueryExtension (24) -
CGI
:: QueryExtension :: Value (24) - Enumerable (654)
- FileUtils (12)
-
Gem
:: UserInteraction (12) -
JSON
:: Generator :: GeneratorMethods :: Array (12) - Kernel (72)
-
MiniTest
:: Assertions (2) - Observable (24)
-
OpenSSL
:: SSL :: SocketForwarder (24) -
RDoc
:: Text (12) -
Rake
:: TaskManager (48) - TSort (24)
キーワード
- & (24)
- * (36)
- + (12)
- << (24)
- <=> (12)
- == (36)
- === (8)
- =~ (16)
- DelegateClass (12)
- [] (192)
- []= (48)
-
_ 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? (62)
- append (8)
-
arg
_ names (12) - args (24)
- argv (12)
-
array
_ nl (12) -
assert
_ send (1) - assoc (24)
- 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)
- clear (12)
- clone (12)
- coerce (48)
- collect (48)
- collect! (24)
- collect2 (24)
-
collect
_ concat (24) - combination (24)
-
command
_ names (12) - 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 (24)
-
deconstruct
_ keys (17) - delete (24)
-
delete
_ at (12) -
delete
_ if (24) -
delete
_ observers (12) -
depend
_ rules (12) - dependencies (12)
-
dependent
_ gems (12) -
development
_ dependencies (12) - difference (7)
- dig (40)
- drop (24)
-
drop
_ while (48) - dup (12)
- each (24)
- each2 (24)
-
each
_ index (24) - empty? (24)
- entries (7)
-
enum
_ for (24) - eql? (24)
- expect (24)
- extension (48)
- fcntl (12)
- fetch (48)
-
fetch
_ values (2) - fields (12)
-
file
_ entries (24) - fill (72)
- filter (14)
- filter! (14)
-
find
_ command _ possibilities (12) -
find
_ gems _ with _ sources (12) -
find
_ index (36) -
find
_ matching (12) -
find
_ paths (12) -
find
_ reverse _ dependencies (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 (36)
- import (12)
-
in
_ namespace (12) - include? (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 (12)
- join (12)
-
keep
_ if (24) -
kind
_ of? (12) - last (24)
-
latest
_ specs (12) -
legacy
_ repos (12) - length (36)
- libs (12)
- list (24)
-
load
_ gemspecs (12) - map (48)
- map! (24)
- map2 (12)
-
marshal
_ dump (48) -
marshal
_ load (24) - max (84)
-
max
_ by (48) - min (84)
-
min
_ by (48) - minmax (24)
- mkdir (18)
-
module
_ function (36) - names (12)
-
next
_ values (12) - none? (42)
- 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 (24)
- prepend (8)
- prerequisites (12)
-
pretty
_ print (12) -
pretty
_ print _ cycle (12) -
primitive
_ errinfo (12) - private (48)
-
private
_ class _ method (24) - product (24)
- protected (48)
- public (48)
-
public
_ class _ method (24) - push (12)
- rand (36)
- rassoc (24)
- read (36)
-
read
_ all (24) - readline (12)
- readlines (60)
- 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 (12)
- reverse! (12)
-
reverse
_ each (24) - rindex (36)
- roots (12)
- rotate (12)
- rotate! (12)
- row (12)
-
ruby
_ opts (12) -
run
_ test _ suites (1) -
runtime
_ dependencies (12) - sample (48)
- scan (12)
- scanf (36)
-
search
_ with _ source (12) - select (36)
- select! (24)
- sendmsg (12)
-
set
_ backtrace (12) -
set
_ eoutvar (12) - shelljoin (12)
- shift (48)
- shuffle (24)
- shuffle! (24)
- size (36)
- slice (36)
- slice! (36)
- 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) - 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 (48)
- uniq! (24)
- unpack (24)
- unpack1 (9)
- unshift (12)
- value (24)
-
values
_ at (60) - vartype (12)
-
verify
_ gem (12) -
waiting
_ jobs (6) -
which
_ to _ update (12) - zip (24)
- | (12)
検索結果
先頭5件
-
Array
# slice(range) -> Array | nil (30377.0) -
指定された自身の部分配列を返します。Array#[] と同じです。
...指定された自身の部分配列を返します。Array#[] と同じです。
@param pos Array#[] と同じです。
@param len Array#[] と同じです。
@param range Array#[] と同じです。
//emlist[例][ruby]{
p [0, 1, 2].slice(0, 2) #=> [0, 1]
p [0, 1, 2].slice(2..3) #=>... -
Array
# fetch _ values(*indexes) -> Array (30347.0) -
引数で指定されたインデックスに対する値の配列を返します。
...mlist[例][ruby]{
ary = ["a", "b", "c"]
ary.fetch_values(0, 2) # => ["a", "c"]
ary.fetch_values(-1, 1) # => ["d", "b"]
ary.fetch_values(0, 10) # => index 10 outside of array bounds: -3...3 (IndexError)
ary.fetch_values(0, 10) { |i| i.to_s } # => ["a", "10"]
//}
@see Array#values_at, Array#fetch... -
Array
# fetch _ values(*indexes) { |index| . . . } -> Array (30347.0) -
引数で指定されたインデックスに対する値の配列を返します。
...mlist[例][ruby]{
ary = ["a", "b", "c"]
ary.fetch_values(0, 2) # => ["a", "c"]
ary.fetch_values(-1, 1) # => ["d", "b"]
ary.fetch_values(0, 10) # => index 10 outside of array bounds: -3...3 (IndexError)
ary.fetch_values(0, 10) { |i| i.to_s } # => ["a", "10"]
//}
@see Array#values_at, Array#fetch... -
Array
# shift(n) -> Array (30339.0) -
配列の先頭の要素を取り除いてそれを返します。 引数を指定した場合はその個数だけ取り除き、それを配列で返します。
...@raise ArgumentError 引数に負の数を指定した場合に発生します。
//emlist[例][ruby]{
a = [0, 1, 2, 3, 4]
p a.shift #=> 0
p a #=> [1, 2, 3, 4]
p [].shift #=> nil
p [].shift(1) #=> []
//}
@see Array#push, Array#pop, Array#unshift... -
Array
# values _ at(*selectors) -> Array (30339.0) -
引数で指定されたインデックスに対応する要素を配列で返します。インデッ クスに対応する値がなければ nil が要素になります。
...) #=> ["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 )... -
Array
# &(other) -> Array (30327.0) -
集合の積演算です。両方の配列に含まれる要素からなる新しい配列を返 します。重複する要素は取り除かれます。
...る暗黙の型変換を試みます。
@raise TypeError 引数に配列以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
[1, 1, 2, 3] & [3, 1, 4] #=> [1, 3]
//}
@see Array#|, Array#intersection... -
Array
# drop(n) -> Array (30327.0) -
配列の先頭の n 要素を捨てて、 残りの要素を配列として返します。 このメソッドは自身を破壊的に変更しません。
...は自身を破壊的に変更しません。
@param n 捨てる要素数。
//emlist[例][ruby]{
a = [1, 2, 3, 4, 5, 0]
a.drop(3) # => [4, 5, 0]
# 変数aの値は変化しない
a # => [1, 2, 3, 4, 5, 0]
//}
@see Enumerable#drop, Array#drop_while, Array#shift... -
Array
# |(other) -> Array (30327.0) -
集合の和演算です。両方の配列にいずれかに含まれる要素を全て含む新し い配列を返します。重複する要素は取り除かれます。
...暗黙の型変換を試みます。
@raise TypeError 引数に配列以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
[1, 1, 4, 2, 3] | [5, 4, 5] #=> [1, 4, 2, 3, 5]
//}
@see Array#&
@see Array#union... -
Array
# [](range) -> Array | nil (30320.0) -
Range オブジェクト range の範囲にある要素からなる部分配列を返します。 range の begin が自身の範囲外となる時は nil を返します。ただし、begin が配列の長さに等しいときは空の配列を返します。 range の begin が end より後にある場合には空の配列を返します。
... -1 番目になります。
end の値が配列の範囲を越える時には、越えた分は無視されます。
//emlist[例][ruby]{
a = [ "a", "b", "c", "d", "e" ]
a[0..1] #=> ["a", "b"]
a[0...1] #=> ["a"]
a[0..-1] #=> ["a", "b", "c", "d", "e"]
a[-2..-1] #=> ["d", "e"]
a[-2........4] #=> ["d", "e"] (start は末尾から -2 番目、end は先頭から (4+1) 番目となる。)
a[0..10] #=> ["a", "b", "c", "d", "e"]
a[10..11] #=> nil
a[2..1] #=> []
a[-1..-2] #=> []
# 特殊なケース。begin が自身の長さと同じ場合には以下のようになります。
a[5... -
Array
# [](start , length) -> Array | nil (30320.0) -
start 番目から length 個の要素を含む部分配列を返します。 start が自身の範囲外となる時は nil を返します。ただし、start が配列の長さに等しいときは空の配列を返します。 length が負の時は nil を返します。
...指定します。
start の値が負の時には末尾からのインデックスと見倣します。
末尾の要素が -1 番目になります。
整数以外のオブジェクトを指定した場合は to_int メソッドによ
る暗黙の......た場合に発生します。
//emlist[例][ruby]{
a = [ "a", "b", "c", "d", "e" ]
a[0, 1] #=> ["a"]
a[-1, 1] #=> ["e"]
a[0, 10] #=> ["a", "b", "c", "d", "e"]
a[0, 0] #=> []
a[0, -1] #=> nil
a[10, 1] #=> nil
# 特殊なケース。start が自身の長さと同じ場合には以下... -
Array
# concat(*other _ arrays) -> self (30319.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
# first(n) -> Array (30317.0) -
先頭の n 要素を配列で返します。n は 0 以上でなければなりません。
...指定した場合に発生します。
@raise ArgumentError n が負値の場合発生します。
//emlist[例][ruby]{
ary = [0, 1, 2]
p ary.first(0)
p ary.first(1)
p ary.first(2)
p ary.first(3)
p ary.first(4)
# => []
# [0]
# [0, 1]
# [0, 1, 2]
# [0, 1, 2]
//}
@see Array#last... -
Array
# last(n) -> Array (30317.0) -
末尾の n 要素を配列で返します。n は 0 以上でなければなりません。
...指定した場合に発生します。
@raise ArgumentError n が負値の場合発生します。
//emlist[例][ruby]{
ary = [0, 1, 2]
p ary.last(0)
p ary.last(1)
p ary.last(2)
p ary.last(3)
p ary.last(4)
# => []
# [2]
# [1, 2]
# [0, 1, 2]
# [0, 1, 2]
//}
@see Array#first...