1028件ヒット
[1-100件を表示]
(0.201秒)
別のキーワード
クラス
- Array (144)
- CSV (24)
-
CSV
:: FieldInfo (12) -
CSV
:: Table (48) - Enumerator (67)
-
Enumerator
:: Lazy (12) - Hash (12)
- MatchData (110)
- Matrix (36)
- NilClass (12)
- Object (24)
- OptionParser (12)
-
REXML
:: Attributes (12) -
REXML
:: Elements (12) -
Rake
:: FileList (36) - Range (14)
- Regexp (24)
-
RubyVM
:: InstructionSequence (12) - Set (12)
- String (176)
- Struct (30)
- Time (12)
- Vector (12)
モジュール
- Enumerable (163)
キーワード
- + (7)
- << (12)
- == (12)
- [] (48)
- bytes (24)
- captures (12)
- chain (7)
- chars (24)
- chunk (12)
-
chunk
_ while (12) - codepoints (24)
-
col
_ sep (12) - combination (24)
- deconstruct (8)
- delete (12)
-
delete
_ if (12) - each (72)
-
each
_ codepoint (24) -
each
_ grapheme _ cluster (16) -
each
_ line (24) - entries (19)
- force (12)
-
grapheme
_ clusters (16) -
header
_ converters (12) - length (12)
- line (12)
- lines (24)
- match (24)
-
max
_ by (48) - permutation (24)
-
repeated
_ combination (24) -
repeated
_ permutation (24) - sample (24)
- size (24)
-
slice
_ after (24) -
slice
_ before (24) -
slice
_ when (12) -
to
_ ary (36) - values (12)
-
values
_ at (12)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # to _ a -> Array (36332.0) -
self の情報を 14 要素の配列にして返します。
...ォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。
: major_version
命令シーケンスのメジャーバージョン。
: minor_version
命令シーケンスのマイナーバージョン。
: format_type
データフォーマットを示す数......構成される Hash オブジェクト。
:arg_size: メソッド、ブロックが取る引数の総数(1 つもない場合は 0)。
:local_size: ローカル変数の総数 + 1。
:stack_max: スタックの深さ。(SystemStackError を検出するために使用)
: #label......: #path
命令シーケンスの相対パス。文字列から作成していた場合は "<compiled>"。
: #absolute_path
命令シーケンスの絶対パス。文字列から作成していた場合は nil。
: #first_lineno
命令シーケンスの 1 行目の行番号。
: type... -
Vector
# to _ a -> Array (30320.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]
//}... -
Struct
# to _ a -> [object] (30220.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... -
Array
# to _ a -> Array (27338.0) -
self を返します。ただし、Array のサブクラスのインスタンスに対して呼ばれた時は、 自身を Array に変換したものを返します。
...し、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... -
REXML
:: Elements # to _ a(xpath = nil) -> [REXML :: Element] (27326.0) -
すべての子要素の配列を返します。
...xpath を指定した場合は、その XPath 文字列に
マッチする要素の配列を返します。
REXML::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/>]
REXML::XPath.match(doc.root, "child::node()") # => ["sean", <b/>, "elliott", <c/>]
//}... -
Matrix
# to _ a -> Array (27320.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] (27320.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, --update\n", " -h, --help\n"]
//}... -
REXML
:: Attributes # to _ a -> [Attribute] (27320.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']
//}... -
Rake
:: FileList # to _ a -> Array (27320.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
//}...