626件ヒット
[201-300件を表示]
(0.035秒)
ライブラリ
- ビルトイン (449)
- benchmark (12)
-
cgi
/ core (24) - csv (36)
- dbm (12)
- matrix (24)
- rake (36)
-
rubygems
/ platform (12) - set (9)
-
webrick
/ httputils (12)
クラス
-
ARGF
. class (72) - Array (168)
-
Benchmark
:: Tms (12) - CSV (12)
-
CSV
:: Table (24) - DBM (12)
-
Gem
:: Platform (12) - Hash (12)
- MatchData (60)
- Matrix (12)
- NilClass (12)
- Object (36)
-
Rake
:: FileList (36) - Range (14)
-
RubyVM
:: InstructionSequence (12) - Set (12)
- Time (12)
- Vector (12)
-
WEBrick
:: HTTPUtils :: FormData (12)
モジュール
-
CGI
:: QueryExtension :: Value (24) - Enumerable (48)
キーワード
- << (12)
- == (12)
- [] (48)
- combination (24)
- entries (7)
-
header
_ converters (12) -
max
_ by (48) - permutation (24)
- readlines (36)
-
repeated
_ combination (24) -
repeated
_ permutation (24) - sample (48)
- tap (12)
-
to
_ ary (60) -
values
_ at (12)
検索結果
先頭5件
-
Vector
# to _ a -> Array (18342.0) -
ベクトル(Vector)から配列 (Array) に変換します。
...ベクトル(Vector)から配列 (Array) に変換します。
//emlist[例][ruby]{
require 'matrix'
v = Vector[2, 3, 5, 7, 9]
p v.to_a
# => [2, 3, 5, 7, 9]
//}... -
Rake
:: FileList # to _ a -> Array (18312.0) -
内部的な配列を返します。
...内部的な配列を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
file_list.to_a # => ["a.c", "b.c"]
end
//}... -
CSV
:: Table # to _ a -> [Array] (18310.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] (18310.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] (18310.0) -
キーと値からなる 2 要素の配列を並べた配列を生成して返します。
...キーと値からなる 2 要素の配列を並べた配列を生成して返します。
//emlist[例][ruby]{
h1 = { "a" => 100, 2 => ["some"], :c => "c" }
p h1.to_a #=> c, "c"
//}
@see Hash#keys,Hash#values... -
NilClass
# to _ a -> Array (18310.0) -
空配列 [] を返します。
...空配列 [] を返します。
//emlist[例][ruby]{
nil.to_a #=> []
//}... -
RubyVM
:: InstructionSequence # to _ a -> Array (18310.0) -
self の情報を 14 要素の配列にして返します。
...令とオペランドの配列の配列。
//emlist[例][ruby]{
require 'pp'
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
pp iseq.to_a
# ※ Ruby 2.5.0 での実行結果
# => ["YARVInstructionSequence/SimpleDataFormat",
# 2,
# 0,
# 1,
# {:arg_size=>0, :local_size=>2, :stack_max=>2},... -
Set
# to _ a -> Array (18310.0) -
self を配列に変換します。要素の順序は不定です。
...self を配列に変換します。要素の順序は不定です。
//emlist[][ruby]{
require 'set'
set = Set['hello', 'world']
p set.to_a # => ["hello", "world"]
//}......self を配列に変換します。要素の順序は不定です。
//emlist[][ruby]{
set = Set['hello', 'world']
p set.to_a # => ["hello", "world"]
//}... -
Time
# to _ a -> Array (18310.0) -
時刻を10要素の配列で返します。
...rue/false)
* zone: タイムゾーン (文字列)
//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5)
p t # => 2000-01-02 03:04:05 +0900
p t.to_a # => [5, 4, 3, 2, 1, 2000, 0, 2, false, "JST"]
//}
要素の順序は C 言語の tm 構造体に合わせています。ただし、
tm 構造...