830件ヒット
[1-100件を表示]
(0.099秒)
別のキーワード
クラス
- Array (120)
- CSV (12)
-
CSV
:: FieldInfo (12) -
CSV
:: Table (36) - Enumerator (19)
-
File
:: Stat (12) - MatchData (110)
- Matrix (36)
- NilClass (12)
- OptionParser (12)
-
REXML
:: Attributes (12) -
REXML
:: Elements (12) -
Rake
:: FileList (36) - Range (14)
- Regexp (24)
-
RubyVM
:: InstructionSequence (12) - String (176)
- Time (12)
モジュール
- Enumerable (151)
キーワード
- + (7)
- == (12)
- [] (48)
- atime (12)
- bytes (24)
- captures (12)
- chain (7)
- chars (24)
-
chunk
_ while (12) - codepoints (24)
-
col
_ sep (12) - combination (24)
- deconstruct (2)
- delete (12)
-
delete
_ if (24) - each (24)
-
each
_ codepoint (24) -
each
_ grapheme _ cluster (16) -
each
_ line (24) - entries (19)
-
grapheme
_ clusters (16) - 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 (12) -
values
_ at (12)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # to _ a -> Array (27132.0) -
self の情報を 14 要素の配列にして返します。
...ンスを以下の情報で表します。
: magic
データフォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。
: major_version
命令シーケンスのメジャーバージョン。
: minor_version
命令シーケンスのマイナーバージ......ータフォーマットを示す数値。常に 1。
: misc
以下の要素から構成される Hash オブジェクト。
:arg_size: メソッド、ブロックが取る引数の総数(1 つもない場合は 0)。
:local_size: ローカル変数の総数 + 1。
:stack_max: ス......in>"。文字列から作成していた場合は
"<compiled>"。
: #path
命令シーケンスの相対パス。文字列から作成していた場合は "<compiled>"。
: #absolute_path
命令シーケンスの絶対パス。文字列から作成していた場合は nil。
: #first_li... -
OptionParser
# to _ a -> [String] (21232.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, --h... -
REXML
:: Attributes # to _ a -> [Attribute] (21220.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']
//}... -
Matrix
# to _ a -> Array (21120.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 (21120.0) -
空配列 [] を返します。
...空配列 [] を返します。
//emlist[例][ruby]{
nil.to_a #=> []
//}... -
Rake
:: FileList # to _ a -> Array (21120.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
//}... -
Time
# to _ a -> Array (21120.0) -
時刻を10要素の配列で返します。
...(整数 0-60) (60はうるう秒)
* min: 分 (整数 0-59)
* hour: 時 (整数 0-23)
* mday: 日 (整数)
* mon: 月 (整数 1-12)
* year: 年 (整数 2000年=2000)
* wday: 曜日 (整数 0-6)
* yday: 年内通算日 (整数 1-366)
* isdst: 夏時間であるかどうか (t......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 構造... -
REXML
:: Elements # to _ a(xpath = nil) -> [REXML :: Element] (18226.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",... -
MatchData
# to _ a -> [String] (18220.0) -
$&, $1, $2,... を格納した配列を返します。
...$&, $1, $2,... を格納した配列を返します。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.to_a # => ["foobar", "foo", "bar", nil]
//}
@see MatchData#captures...