るりまサーチ

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

別のキーワード

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

ライブラリ

キーワード

検索結果

<< < 1 2 3 4 5 ... > >>

OpenSSL::X509::Request#attributes=(attrs) (6200.0)

CSR の attribute をクリアして新しい attribute を設定します。

...CSR の attribute をクリアして新しい attribute を設定します。


@param attrs 新たに設定する attribute(OpenSSL::X509::Attribute の
インスタンス)の配列
@see OpenSSL::X509::Request#attribute
OpenSSL::X509::Request#add_attribute...

RDoc::Markup#attribute_manager -> RDoc::AttributeManager (6200.0)

自身の RDoc::AttributeManager オブジェクトを返します。

...自身の RDoc::AttributeManager オブジェクトを返します。...

REXML::DocType#attribute_of(element, attribute) -> String | nil (6200.0)

DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。

...スト宣言で、 element という名前の要素の attribute という
名前の属性のデフォルト値を返します。

elementという名前の要素の属性値は宣言されていない、
elementという名前の要素にはattributeという名前の属性が宣言されていな...
...くはデフォルト値が宣言されていない、のいずれかの場合は nil を返します。

@param element 要素名(文字列)
@param attribute 属性名(文字列)

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

doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT bo...
...title CDATA #REQUIRED
publisher CDATA "foobar publisher">
]>
EOS

p doctype.attribute_of("book", "publisher") # => "foobar publisher"
p doctype.attribute_of("bar", "foo") # => nil
p doctype.attribute_of("book", "baz") # => nil
p doctype.attribute_of("book", "title") # => nil
//}...

REXML::DocType#attributes_of(element) -> [REXML::Attribute] (6200.0)

DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている 属性の名前とデフォルト値を REXML::Attribute の配列で返します。

...し宣言されている
属性の名前とデフォルト値を REXML::Attribute の配列で返します。

名前とデフォルト値のペアは、各 Attribute オブジェクトの
REXML::Attribute#name と
REXML::Attribute#value で表現されます。

//emlist[][ruby]{
require 'rexml/doc...
...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) -> () (6200.0)

要素の属性を複数追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。

...

attr
s には Hash もしくは Array を指定できます。
Hash の場合は、
{ "name1" => "value1", "name2" => "value2", ... }
という形で、配列の場合は
[ ["name1", "value1"], ["name2", "value2"], ... }
という形で追加/更新する属性を指定します。

@param attr...
...属性の属性名と属性値の対の集合(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#attribute(name, namespace = nil) -> REXML::Attribute | nil (6200.0)

name で指定される属性を返します。

...name で指定される属性を返します。

属性は REXML::Attribute オブジェクトの形で返します。

name は "foo:bar" のように prefix を指定することができます。

namespace で名前空間の URI を指定することで、その名前空間内で
name という...
...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.attribute("att") # => att='&lt;'
a.attribute("att", "http://example.org/bar") # => bar:att='2'
a.attribute("bar:att") # => bar:att='2'
a.attribute("baz") # => nil
//}...

REXML::Element#attributes -> REXML::Attributes (6200.0)

要素が保持している属性の集合を返します。

要素が保持している属性の集合を返します。

REXML::Element#delete_attribute(key) -> REXML::Attribute | nil (6200.0)

要素から key という属性名の属性を削除します。

...要素(文字列(属性名) or REXML::Attributeオブジェクト)

//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("E")
e.add_attribute("x", "foo"); e # => <E x='foo'/>
e.add_attribute("y:x", "bar"); e # => <E x='foo' y:x='bar'/>
e.delete_attribute("x"); e # => <E y:x='bar'/>
//}...

Module#attr_accessor(*name) -> [Symbol] (6113.0)

インスタンス変数 name に対する読み取りメソッドと書き込みメソッドの両方を 定義します。

...ソッドと書き込みメソッドの両方を
定義します。

//emlist[例][ruby]{
class User
attr
_accessor :name # => [:name, :name=]
# 複数の名前を渡すこともできる
attr
_accessor :id, :age # => [:id, :id=, :age, :age=]
end
//}

このメソッドで定義されるメソ...

Module#attr_reader(*name) -> [Symbol] (6113.0)

インスタンス変数 name の読み取りメソッドを定義します。

...スタンス変数 name の読み取りメソッドを定義します。

//emlist[例][ruby]{
class User
attr
_reader :name # => [:name]
# 複数の名前を渡すこともできる
attr
_reader :id, :age # => [:id, :age]
end
//}

このメソッドで定義されるメソッドの定義は以...

絞り込み条件を変える

Module#attr_writer(*name) -> [Symbol] (6113.0)

インスタンス変数 name への書き込みメソッド (name=) を定義します。

...変数 name への書き込みメソッド (name=) を定義します。

//emlist[例][ruby]{
class User
attr
_writer :name # => [:name=]
# 複数の名前を渡すこともできる
attr
_writer :id, :age # => [:id=, :age=]
end
//}

このメソッドで定義されるメソッドの定義は...
<< < 1 2 3 4 5 ... > >>