655件ヒット
[1-100件を表示]
(0.087秒)
別のキーワード
ライブラリ
- ビルトイン (535)
- csv (60)
- rake (36)
-
rexml
/ document (24)
クラス
- Array (84)
-
CSV
:: Table (60) - Enumerator (48)
-
Enumerator
:: Lazy (12) - Hash (24)
- MatchData (12)
- Object (36)
-
REXML
:: Attributes (12) -
REXML
:: Elements (12) -
Rake
:: FileList (36) - Range (14)
- Regexp (24)
-
RubyVM
:: InstructionSequence (12) - String (76)
- Struct (30)
モジュール
- Enumerable (163)
キーワード
- << (12)
- == (12)
- bytes (24)
- chain (7)
- chars (12)
- chunk (12)
-
chunk
_ while (12) - codepoints (12)
- combination (24)
- deconstruct (6)
- delete (12)
-
delete
_ if (24) - each (48)
-
each
_ codepoint (12) -
each
_ grapheme _ cluster (8) - entries (19)
- force (12)
-
grapheme
_ clusters (8) - keys (12)
- match (24)
-
max
_ by (48) - permutation (12)
-
repeated
_ combination (24) - sample (24)
-
slice
_ after (24) -
slice
_ before (24) -
slice
_ when (12) - tap (12)
-
to
_ ary (24) - values (24)
-
values
_ at (12)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # to _ a -> Array (47232.0) -
self の情報を 14 要素の配列にして返します。
...:local_size: ローカル変数の総数 + 1。
:stack_max: スタックの深さ。(SystemStackError を検出するために使用)
: #label
メソッド名、クラス名、モジュール名などで構成される命令シーケンスのラ
ベル。トップレベルでは "<ma......合は "<compiled>"。
: #absolute_path
命令シーケンスの絶対パス。文字列から作成していた場合は nil。
: #first_lineno
命令シーケンスの 1 行目の行番号。
: type
命令シーケンスの種別。
:top、:method、:block、:class、:rescue、:ensur......数名からなる Symbol の配列。
: args
引数の指定が必須のメソッド、ブロックの引数の個数。あるいは以下のよう
な配列。
[required_argc, [optional_arg_labels, ...],
splat_index, post_splat_argc, post_splat_index,
block_index, simple]... -
REXML
:: Attributes # to _ a -> [Attribute] (21320.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']
//}... -
Object
# to _ a -> Array (21232.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... -
CSV
:: Table # to _ a -> [Array] (21220.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"... -
Enumerable
# to _ a(*args) -> [object] (18338.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 #=> [2, 3, 5, 7]
//}... -
Struct
# to _ a -> [object] (18320.0) -
構造体のメンバの値を配列にいれて返します。
...構造体のメンバの値を配列にいれて返します。
//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345).to_a
# => ["Joe Smith", "123 Maple, Anytown NC", 12345]
//}
[注意] 本メソッドの記述は Struct の下... -
REXML
:: Elements # to _ a(xpath = nil) -> [REXML :: Element] (18250.0) -
すべての子要素の配列を返します。
...//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/>]
REXML::XPath.match(doc.root, "child::node()") # => ["sean", <b/>, "elliott",... -
Rake
:: FileList # to _ a -> Array (18232.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
//}... -
Struct
# to _ a -> [object] (15320.0) -
構造体のメンバの値を配列にいれて返します。
...構造体のメンバの値を配列にいれて返します。
//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345).to_a
# => ["Joe Smith", "123 Maple, Anytown NC", 12345]
//}
[注意] 本メソッドの記述は Struct の下......位クラスのインスタンスに対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してください。
@see d:spec/pattern_matching#matching_non_primitive_objects... -
Range
# to _ a -> Array (15274.0) -
self を配列に変換します。
...][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 # R...