1483件ヒット
[1-100件を表示]
(0.124秒)
ライブラリ
- ビルトイン (888)
- benchmark (11)
-
cgi
/ core (22) - csv (99)
- dbm (11)
- gdbm (11)
- matrix (88)
-
net
/ smtp (77) - openssl (22)
- optparse (11)
- ostruct (22)
- rake (33)
-
rexml
/ document (55) -
rubygems
/ platform (11) - sdbm (11)
- set (11)
- shell (24)
-
shell
/ command-processor (24) -
shell
/ filter (30) -
webrick
/ httputils (11) -
yaml
/ dbm (11)
クラス
-
ARGF
. class (88) - Array (154)
-
Benchmark
:: Tms (11) - CSV (22)
-
CSV
:: FieldInfo (11) -
CSV
:: Row (11) -
CSV
:: Table (55) - DBM (11)
- Enumerator (61)
-
Enumerator
:: Lazy (11) -
File
:: Stat (11) - GDBM (11)
-
Gem
:: Platform (11) - Hash (33)
- MatchData (99)
- Matrix (33)
-
Matrix
:: EigenvalueDecomposition (22) -
Matrix
:: LUPDecomposition (22) -
Net
:: SMTP (77) - NilClass (11)
- Object (33)
-
OpenSSL
:: X509 :: Extension (11) -
OpenSSL
:: X509 :: Name (11) - OpenStruct (22)
- OptionParser (11)
-
REXML
:: Attributes (11) -
REXML
:: Element (11) -
REXML
:: Elements (11) -
REXML
:: Parent (22) -
Rake
:: FileList (33) - Range (12)
- Regexp (22)
-
RubyVM
:: InstructionSequence (11) - SDBM (11)
- Set (11)
- Shell (24)
-
Shell
:: CommandProcessor (24) -
Shell
:: Filter (30) - String (160)
- Struct (22)
- Time (11)
- Vector (11)
-
WEBrick
:: HTTPUtils :: FormData (11) -
YAML
:: DBM (11)
モジュール
-
CGI
:: QueryExtension :: Value (22) - Enumerable (149)
キーワード
- + (6)
- << (22)
- == (11)
- [] (44)
- atime (11)
- bytes (22)
- captures (11)
- cat (18)
- chain (6)
- chars (22)
- children (11)
- chunk (11)
-
chunk
_ while (11) - codepoints (22)
-
col
_ sep (11) - combination (22)
- delete (11)
-
delete
_ if (22) - each (66)
-
each
_ byte (22) -
each
_ codepoint (22) -
each
_ grapheme _ cluster (14) -
each
_ line (22) -
each
_ pair (22) - echo (18)
- entries (17)
- force (11)
-
get
_ elements (11) - glob (18)
-
grapheme
_ clusters (14) -
header
_ converters (11) - keys (11)
- length (11)
- line (11)
- lines (22)
- match (22)
-
max
_ by (44) - permutation (22)
- rcptto (11)
-
rcptto
_ list (11) - readlines (33)
- ready (11)
-
repeated
_ combination (22) -
repeated
_ permutation (22) - sample (44)
-
send
_ mail (11) - sendmail (11)
- size (22)
-
slice
_ after (22) -
slice
_ before (22) -
slice
_ when (11) - tap (11)
- tee (18)
-
to
_ ary (77) - values (22)
-
values
_ at (11)
検索結果
先頭5件
-
Array
# to _ a -> Array (18126.0) -
self を返します。ただし、Array のサブクラスのインスタンスに対して呼ばれた時は、 自身を Array に変換したものを返します。
...に変換したものを返します。
//emlist[例][ruby]{
class SubArray < Array; end
ary1 = Array([1, 2, 3, 4])
ary2 = SubArray([1, 2, 3, 4])
ary1.to_a # => [1, 2, 3, 4]
ary1.to_a.class # => Array
ary2.to_a # => [1, 2, 3, 4]
ary2.to_a.class # => Array
//}
@see Array#to_ary... -
Object
# to _ a -> Array (18120.0) -
オブジェクトを配列に変換した結果を返します。 デフォルトでは定義されていません。
...のメソッドは実際には Object クラスには定義されていません。
必要に応じてサブクラスで定義すべきものです。
//emlist[][ruby]{
p( {'a'=>1}.to_a ) # [["a", 1]]
p ['array'].to_a # ["array"]
p nil.to_a # []
//}
@see Object#to_ary,Kernel.#Array... -
REXML
:: Elements # to _ a(xpath = nil) -> [REXML :: Element] (18114.0) -
すべての子要素の配列を返します。
...][ruby]{
require 'rexml/document'
require 'rexml/xpath'
doc = REXML::Document.new '<a>sean<b/>elliott<c/></a>'
doc.root.elements.to_a # => [<b/>, <c/>]
doc.root.elements.to_a("child::node()") # => [<b/>, <c/>]
REXML::XPath.match(doc.root, "child::node()") # => ["sean", <b/>, "elliott", <c/>]
//}... -
CSV
:: Table # to _ a -> [Array] (18108.0) -
配列の配列を返します。
...。
//emlist[例][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
table = CSV::Table.new([row1, row2])
table.to_a # => [["header1", "header2"], ["row1_1", "row1_2"], ["row2_1", "row2_2"]]
//}... -
DBM
# to _ a -> [Array] (18108.0) -
キーと値のペアを配列に変換して返します。
...キーと値のペアを配列に変換して返します。
require 'dbm'
db1 = DBM.open('aaa.db', 0666, DBM::NEWDB)
db1[:a] = 'aaa'
db1[:b] = 'bbbbbb'
p db1.to_a #=> [["b", "bbbbbb"], ["a", "aaa"]]... -
Hash
# to _ a -> [Array] (18108.0) -
キーと値からなる 2 要素の配列を並べた配列を生成して返します。
...キーと値からなる 2 要素の配列を並べた配列を生成して返します。
//emlist[例][ruby]{
h1 = { "a" => 100, 2 => ["some"], :c => "c" }
p h1.to_a #=> c, "c"
//}
@see Hash#keys,Hash#values... -
MatchData
# to _ a -> [String] (18108.0) -
$&, $1, $2,... を格納した配列を返します。
...$&, $1, $2,... を格納した配列を返します。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.to_a # => ["foobar", "foo", "bar", nil]
//}
@see MatchData#captures... -
Matrix
# to _ a -> Array (18108.0) -
自分自身をArrayに変換したものを返します。
...します。
行ベクトルを配列(Array)としたものの配列(つまり配列の配列)として返します。
//emlist[例][ruby]{
require 'matrix'
a1 = [ 1, 2, 3]
a2 = [10, 15, 20]
a3 = [-1, -2, 1.5]
m = Matrix[a1, a2, a3]
p m.to_a # => [[1, 2, 3], [10, 15, 20], [-1, -2, 1.5]]
//}... -
NilClass
# to _ a -> Array (18108.0) -
空配列 [] を返します。
...空配列 [] を返します。
//emlist[例][ruby]{
nil.to_a #=> []
//}... -
OpenSSL
:: X509 :: Name # to _ a -> [[String , String , Integer]] (18108.0) -
内容を配列にして返します。
...ssl'
n = OpenSSL::X509::Name.parse('/C=JP/ST=Kanagawa/L=Yokohama/O=Example Company/OU=Lab3/CN=foobar/emailAddress=foobar@lab3.example.co.jp')
n.to_a
# => [["C", "JP", 19], ["ST", "Kanagawa", 12], ["L", "Yokohama", 12], ["O", "Example Company", 12], ["OU", "Lab3", 12], ["CN", "foobar", 12], ["e...