るりまサーチ

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

別のキーワード

  1. module attr
  2. net/imap attr
  3. _builtin attr
  4. rdoc attr_modifiers
  5. etc sc_thread_attr_stackaddr

検索結果

REXML::Attributes#each {|name, value| ... } -> () (21108.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| ... } -> () (15332.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", "<"]
//}...

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

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

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

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

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

...t.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_with_attrib...

WIN32OLE_EVENT#handler=(obj) -> () (13.0)

イベント処理を実行するオブジェクトを登録します。

...を指定します。

class IeHandler
def initialize
@completed = false
end
attr
_reader :completed
def onDocumentComplete(disp, uri)
disp.document.getElementsByTagName('a').each do |e|
puts "#{e.innerHTML}=#{e.href}"
end
@completed = true
end...

絞り込み条件を変える

WIN32OLE_TYPE#default_event_sources -> [WIN32OLE_TYPE] (13.0)

型が持つソースインターフェイスを取得します。

....new(type.progid)
source = type.default_event_sources[0]
class WebEvent
def initialize
@completed = false
end
attr
_reader :completed
end
source.ole_methods.each do |m|
WebEvent.module_eval do
define_method("on#{m.name}") do |*arg|
if arg[0] == "ページが表示さ...