るりまサーチ

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

別のキーワード

  1. util u
  2. matrix u
  3. _builtin koi8_u
  4. erb u
  5. encoding koi8_u

ライブラリ

検索結果

REXML::Attributes#each_attribute {|attribute| ... } -> () (24638.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 foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_ele...
...ments("/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::Attributes#each {|name, value| ... } -> () (24314.0)

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

...t[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<EOS)
<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]
e...
...nd

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

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

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

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

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

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

...呼び出します。

key で指定した属性名の属性を持つ要素のみを対象とします。
value を指定すると、keyで指定した属性名を持つ属性の値がvalueである
もののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max...
...lue 属性値(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a><b id='1'/><c id='2'/><d id='1'/><e/></a>")
doc.root.each_element_with_attribute('id'){|e| p e }
# >>...
...d='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_attribute('id', '1', 0, 'd'){|e| p e }
# >> <d id='1'/>
//}...

WIN32OLE_TYPE#default_event_sources -> [WIN32OLE_TYPE] (6213.0)

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

...す。

default_event_sourcesメソッドは、selfがCoClass(コンポーネントクラス)
の場合、そのクラスがサポートするデフォルトのソースインターフェイス(イ
ベントの通知元となるインターフェイス)を返します。

@return デフォ...
...合は空配列を返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
tobj.default_event_sources.map {|intf| intf.name} #=> ["DocEvents"]

WIN32OLE_EVENT.newでインターフェイス名を指定しない場合は、ここで
返されたインター...
...ベントのStatusTextChangeイベントのメッセージについては既
知としています。

# coding : cp932
require 'win32ole'

type = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'InternetExplorer')
ctl = WIN32OLE.new(type.progid)
source = type.default_event_sources[0]
class...

絞り込み条件を変える