るりまサーチ

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

別のキーワード

  1. attribute new
  2. attribute value
  3. element add_attribute
  4. rexml/document attribute
  5. rexml/document add_attribute

検索結果

REXML::Attributes#each {|name, value| ... } -> () (21107.0)

各属性の名前と値に対しブロックを呼び出します。

...root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

a.attributes.each do |name, value|
p [name, value]
end

# => ["foo:att", "1"]
# => ["bar:att", "2"]
# => ["att", "<"]
//}...

REXML::Attributes#each_attribute {|attribute| ... } -> () (15321.0)

各属性に対しブロックを呼び出します。

...各属性に対しブロックを呼び出します。

個々の属性は REXML::Attribute オブジェクトで渡されます。

//emlist[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a fo...
...o:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

a.attributes.each_attribute do |attr|
p [attr.namespace, attr.name, attr.value]
end
# => ["http://example.org/foo", "att", "1"]
# => ["http://example.org/bar", "att", "2"]
# => ["", "att", "<"]
//}...

REXML::Element#each_element_with_attribute(key, value = nil, max = 0, name = nil) {|element| ... } -> () (12250.0)

特定の属性を持つすべての子要素を引数としてブロックを呼び出します。

...)
doc.root.each_element_with_attribute('id'){|e| p e }
# >> <b id='1'/>
# >> <c id='2'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1'){|e| p e }
# >> <b id='1'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1', 1){|e| p e }
# >> <b id='1'/>
doc.root.each_element_wi...

RDoc::Context#each_attribute {|a| ... } -> [RDoc::Attr] (12202.0)

追加された RDoc::Attr に対してブロックを評価します。

追加された RDoc::Attr に対してブロックを評価します。

NEWS for Ruby 2.4.0 (30.0)

NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ためにオプションキーワード引数 buffer: を取るようになりました。
* Array#sum 12217
Enumerable#sum と違って each メソッドに依存しません。

* Comparable
* Comparable#clamp を追加 10594

* Dir
* Dir.empty? を追加 10121

* Enumerabl...
...ました。
half には :even, :up, :down が指定可能です。 12548 12958 12953

* IO
* IO#gets, IO#readline, IO#each_line, IO#readlines, IO.foreach
chomp というキーワード引数を受け付けるようになりました。12553

* Kernel
* Kernel#clone は f...
...ing_detection_proc, Readline.quoting_detection_proc= を追加
12659

* rexml
* REXML::Element#[] : If String or Symbol is specified, attribute
value is returned. Otherwise, Nth child is returned. This is
backward compatible change.

* set
* Set#compare_by_identity, Set...

絞り込み条件を変える

NEWS for Ruby 2.6.0 (30.0)

NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ist{
ary[1..] # ary[1..-1] と同じ
(1...).each {|index| block } # index が 1 から始まる無限ループ
ary.zip(1..) {|elem, index| block } # ary.each.with_index(1) { }
//}
* キーワード引数のハッシュに Symbol 以外の...
...め 4352、
この新しいメソッドを用いることが今後は推奨されます。

* Dir
* 新規メソッド
* Dir#each_child と Dir#children 追加 13969

* Enumerable
* 新規メソッド
* Enumerable#chain はレシーバと引数のそれぞれの要...
...題: 1個以上の空白が "-" の前に必要でした
* "/child::node()" の問題
* "#{FUNCTION}()/#{PATH}" の問題
* "@#{ATTRIBUTE}/parent::" の問題
* "name(#{NODE_SET})" の問題

* RSS
* 新規オプション
* RSS::Parser.parse が Hash としてオ...