749件ヒット
[1-100件を表示]
(0.193秒)
別のキーワード
ライブラリ
クラス
- Array (42)
-
CSV
:: Table (24) - Data (3)
-
Fiddle
:: Pointer (12) - Hash (181)
-
JSON
:: Parser (12) - MatchData (16)
- Object (12)
- OpenStruct (14)
- OptionParser (144)
-
REXML
:: Attribute (12) -
REXML
:: Attributes (36) -
REXML
:: DocType (12) -
REXML
:: Element (72) -
Rake
:: TaskArguments (12) - String (12)
- Struct (55)
- Thread (24)
- TracePoint (12)
- UncaughtThrowError (11)
-
WIN32OLE
_ VARIANT (12)
モジュール
- Enumerable (19)
キーワード
- [] (24)
- []= (36)
-
add
_ attribute (24) -
add
_ attributes (12) -
attributes
_ of (12) - bytebegin (2)
- byteend (2)
- each (24)
-
each
_ attribute (12) -
each
_ element _ with _ attribute (12) -
each
_ key (12) -
each
_ pair (24) -
each
_ value (12) -
fetch
_ values (2) - filter (14)
- filter! (14)
-
get
_ text (12) -
instance
_ variable _ set (12) -
keep
_ if (19) - on (144)
- pack (21)
- parse (12)
-
return
_ value (12) - select (19)
- select! (19)
- store (12)
- text (12)
-
thread
_ variable _ set (12) -
to
_ h (50) -
to
_ string (12) -
to
_ value (12) -
transform
_ values (18) -
transform
_ values! (18) - unpack (12)
- values (12)
-
values
_ at (48)
検索結果
先頭5件
-
UncaughtThrowError
# value -> object (27342.0) -
Kernel.#throw に指定した value を返します。
...Kernel.#throw に指定した value を返します。
//emlist[例][ruby]{
def do_complicated_things
throw :uncaught_label, "uncaught_value"
end
begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.value # => "uncaught_value"
end
//}... -
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (24613.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='<'/>
</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", "<"]
//}... -
Thread
# thread _ variable _ set(key , value) (24430.0) -
引数 key で指定した名前のスレッドローカル変数に引数 value をセットしま す。
... value をセットしま
す。
[注意]: Thread#[] でセットしたローカル変数(Fiber ローカル変数)と
異なり、セットした変数は Fiber を切り替えても共通で使える事に注意してく
ださい。
//emlist[例][ruby]{
thr = Thread.new do
Thread.current.thr......ead_variable_set(:cat, 'meow')
Thread.current.thread_variable_set("dog", 'woof')
end
thr.join # => #<Thread:0x401b3f10 dead>
thr.thread_variables # => [:dog, :cat]
//}
@see Thread#thread_variable_get, Thread#[]... -
WIN32OLE
_ VARIANT # value -> object (24330.0) -
値に対応するRubyオブジェクトを取得します。
...値に対応するRubyオブジェクトを取得します。
@return 値に対応するRubyのオブジェクトを返します。
obj = WIN32OLE_VARIANT.new(1, WIN32OLE::VARIANT::VT_BSTR)
obj.value # => "1" (VT_BSTRを指定して生成したので、Stringオブジェクトとなる)... -
REXML
:: DocType # attributes _ of(element) -> [REXML :: Attribute] (18619.0) -
DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている 属性の名前とデフォルト値を REXML::Attribute の配列で返します。
...TD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている
属性の名前とデフォルト値を REXML::Attribute の配列で返します。
名前とデフォルト値のペアは、各 Attribute オブジェクトの
REXML::Attribute#name と
REXML::Att......ribute#value で表現されます。
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
publisher......CDATA "foobar publisher">
]>
EOS
p doctype.attributes_of("book")
# => [author='', title='', publisher='foobar publisher']
p doctype.attributes_of("book")[0].name # => "author"
p doctype.attributes_of("book")[0].value # => ""
//}... -
REXML
:: Element # add _ attributes(attrs) -> () (18455.0) -
要素の属性を複数追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...attrs には Hash もしくは Array を指定できます。
Hash の場合は、
{ "name1" => "value1", "name2" => "value2", ... }
という形で、配列の場合は
[ ["name1", "value1"], ["name2", "value2"], ... }
という形で追加/更新する属性を指定します。
@param attrs......属性の属性名と属性値の対の集合(Array or Hash)
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("e")
e.add_attributes({"a" => "b", "c" => "d"})
e # => <e a='b' c='d'/>
e = REXML::Element.new("e")
e.add_attributes([["a", "b"], ["c", "d"]])
e # => <e a='b' c='d'/>
//}... -
REXML
:: Element # add _ attribute(attr) -> () (18450.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...す方法と REXML::Attribute オブジェクトを
渡す方法です。
文字列2つで指定する場合、属性値は unnormalized な文字列を渡す必要があります。
@param key 属性名(文字列)
@param value 属性値(文字列)
@param attr 属性(REXML::Attribute オブジェ......//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<e/>")
doc.root.add_attribute("a", "b"); doc.root # => <e a='b'/>
doc.root.add_attribute("x:a", "c"); doc.root # => <e a='b' x:a='c'/>
doc.root.add_attribute(REXML::Attribute.new("b", "d"))
doc.root # => <e a='b' x:a='c' b='d'/>... -
REXML
:: Element # add _ attribute(key , value) -> () (18450.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...す方法と REXML::Attribute オブジェクトを
渡す方法です。
文字列2つで指定する場合、属性値は unnormalized な文字列を渡す必要があります。
@param key 属性名(文字列)
@param value 属性値(文字列)
@param attr 属性(REXML::Attribute オブジェ......//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<e/>")
doc.root.add_attribute("a", "b"); doc.root # => <e a='b'/>
doc.root.add_attribute("x:a", "c"); doc.root # => <e a='b' x:a='c'/>
doc.root.add_attribute(REXML::Attribute.new("b", "d"))
doc.root # => <e a='b' x:a='c' b='d'/>... -
REXML
:: Element # each _ element _ with _ attribute(key , value = nil , max = 0 , name = nil) {|element| . . . } -> () (18450.0) -
特定の属性を持つすべての子要素を引数としてブロックを呼び出します。
...とします。
value を指定すると、keyで指定した属性名を持つ属性の値がvalueである
もののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max 個のみが対象となります。
name を指定すると、それは xpath 文字列と......@param key 属性名(文字列)
@param value 属性値(文字列)
@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_e......lement_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_attribute('id'...