るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

モジュール

検索結果

Matrix#each(which = :all) -> Enumerator (18145.0)

行列の各要素を引数としてブロックを呼び出します。

...emlist[例][ruby]{
require
'matrix'
Matrix[ [1,2], [3,4] ].each { |e| puts e }
# => prints the numbers 1 to 4
Matrix[ [1,2], [3,4] ].each(:strict_lower).to_a # => [3]
//}

@param which どの要素に対してブロックを呼び出すのかを Symbol で指定します
@see Matrix#each_with_index,...

Matrix#each(which = :all) {|e| ... } -> self (18145.0)

行列の各要素を引数としてブロックを呼び出します。

...emlist[例][ruby]{
require
'matrix'
Matrix[ [1,2], [3,4] ].each { |e| puts e }
# => prints the numbers 1 to 4
Matrix[ [1,2], [3,4] ].each(:strict_lower).to_a # => [3]
//}

@param which どの要素に対してブロックを呼び出すのかを Symbol で指定します
@see Matrix#each_with_index,...

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

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

...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/>]
//}...

Enumerable#to_a(*args) -> [object] (15138.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...

Enumerable#entries(*args) -> [object] (38.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...

絞り込み条件を変える