るりまサーチ

最速Rubyリファレンスマニュアル検索!
287件ヒット [1-100件を表示] (0.115秒)

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 > >>

RubyVM::InstructionSequence#to_a -> Array (30238.0)

self の情報を 14 要素の配列にして返します。

...フォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。

: major_version

命令シーケンスのメジャーバージョン。

: minor_version

命令シーケンスのマイナーバージョン。

: format_type

データフォーマットを示す...
...構成される Hash オブジェクト。

:arg_size: メソッド、ブロックが取る引数の総数(1 つもない場合は 0)。

:local_size: ローカル変数の総数 + 1。

:stack_max: スタックの深さ。(SystemStackError を検出するために使用)

: #label...
...列から作成していた場合は nil。

: #first_lineno

命令シーケンスの 1 行目の行番号。

: type

命令シーケンスの種別。
:top、:method、:block、:class、:rescue、:ensure、:eval、:main、
:defined_guard のいずれか。

: locals

全ての引数名...

REXML::Elements#to_a(xpath = nil) -> [REXML::Element] (21238.0)

すべての子要素の配列を返します。

...

R
EXML::Elements#each と同様、REXML::XPath.match などと
異なり、要素以外の子ノードは無視されます。

@param xpath XPath文字列

//emlist[][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/>]
R
EXML::XPath.match(doc.root, "child::node()") # => ["sean", <b/>, "elliott", <c/>]
//}...

Matrix#to_a -> Array (21226.0)

自分自身をArrayに変換したものを返します。

...自身を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,...

OptionParser#to_a -> [String] (21226.0)

サマリの各行を要素とした配列を返します。

...の各行を要素とした配列を返します。

//emlist[例][ruby]{
require
"optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end

opts.to_a # => ["Usage: test [options]", " -i, --init\n", " -u, --updat...

REXML::Attributes#to_a -> [Attribute] (21226.0)

属性の配列を返します。

...属性の配列を返します。

//emlist[][ruby]{
require
'rexml/document'
doc = REXML::Document.new("<a x='1' y='2' z='3' />")
doc.root.attributes.to_a # => [x='1', y='2', z='3']
//}...

絞り込み条件を変える

Vector#to_a -> Array (21226.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]
//}...

Range#to_a -> Array (18256.0)

self を配列に変換します。

...

@raise RangeError 終端のない Range オブジェクトを変換しようとしたときに発生します。

//emlist[例][ruby]{
p (5..0).to_a # => []
p (0..3).to_a # => [0, 1, 2, 3]
p ('a'..'c').to_a # => ["a", "b", "c"]
p (:a..:d).to_a # => [:a, :b, :c, :d]

require
'date'
p...
...(Date.new(1965, 4, 14) .. Date.new(1965, 4, 14)).to_a # => [#<Date: 1965-04-14 ((2438865j,0s,0n),+0s,2299161j)>]

(1..).to_a # RangeError: cannot convert endless range to an array
//}...

Enumerable#to_a(*args) -> [object] (18232.0)

全ての要素を含む配列を返します。

...列を返します。

@param args each の呼び出し時に引数として渡されます。

//emlist[例][ruby]{
(1..7).to_a #=> [1, 2, 3, 4, 5, 6, 7]
{ 'a'=>1, 'b'=>2, 'c'=>3 }.to_a #=> [["a", 1], ["b", 2], ["c", 3]]

require
'prime'
Prime.entries 10 #=>...

CSV::Table#to_a -> [Array] (18226.0)

配列の配列を返します。

...

//emlist[例][ruby]{
require
"csv"

r
ow1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
r
ow2 = 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"]]
//}...
<< 1 2 3 > >>