るりまサーチ

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

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. float >
  4. module >
  5. complex >

キーワード

検索結果

<< 1 2 3 ... > >>

Module#attr(name, true) -> [Symbol] (21316.0)

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

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

このメソッドで定義されるアクセスメソッドの定義は次の通りです。

//emlist[例][ruby]{
def name
@name
end
//}

第 2 引数 が true...
...
その定義は次の通りです。

//emlist[例][ruby]{
def name=(val)
@name = val
end
//}

第 2 引数 に true か false を指定する方法は非推奨です。

@param name String または Symbol で指定します。
@return 定義されたメソッド名を Symbol の配列で返...

Module#attr(name, true) -> nil (21304.0)

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

...ist[例][ruby]{
def name
@name
end
//}

第 2 引数 が true で指定された場合には、属性の書き込み用メソッド name= も同時に定義されます。
その定義は次の通りです。

//emlist[例][ruby]{
def name=(val)
@name = val
end
//}

第 2 引数 に true か fal...

Net::IMAP::StatusData#attr -> { String => Integer } (21302.0)

STATUS 応答の内容をハッシュで返します。

...STATUS 応答の内容をハッシュで返します。

ハッシュのキーは
"MESSAGES", "RECENT", "UIDNEXT", "UIDVALIDITY", "UNSEEN"
などが使われます。

詳しくは 2060 の 6.3.10、7.2.4 を見てください。...

Module#attr(*name) -> [Symbol] (21216.0)

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

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

このメソッドで定義されるアクセスメソッドの定義は次の通りです。

//emlist[例][ruby]{
def name
@name
end
//}

第 2 引数 が true...
...
その定義は次の通りです。

//emlist[例][ruby]{
def name=(val)
@name = val
end
//}

第 2 引数 に true か false を指定する方法は非推奨です。

@param name String または Symbol で指定します。
@return 定義されたメソッド名を Symbol の配列で返...

Module#attr(name, false) -> [Symbol] (21216.0)

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

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

このメソッドで定義されるアクセスメソッドの定義は次の通りです。

//emlist[例][ruby]{
def name
@name
end
//}

第 2 引数 が true...
...
その定義は次の通りです。

//emlist[例][ruby]{
def name=(val)
@name = val
end
//}

第 2 引数 に true か false を指定する方法は非推奨です。

@param name String または Symbol で指定します。
@return 定義されたメソッド名を Symbol の配列で返...

絞り込み条件を変える

Module#attr(*name) -> nil (21204.0)

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

...ist[例][ruby]{
def name
@name
end
//}

第 2 引数 が true で指定された場合には、属性の書き込み用メソッド name= も同時に定義されます。
その定義は次の通りです。

//emlist[例][ruby]{
def name=(val)
@name = val
end
//}

第 2 引数 に true か fal...

Module#attr(name, false) -> nil (21204.0)

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

...ist[例][ruby]{
def name
@name
end
//}

第 2 引数 が true で指定された場合には、属性の書き込み用メソッド name= も同時に定義されます。
その定義は次の通りです。

//emlist[例][ruby]{
def name=(val)
@name = val
end
//}

第 2 引数 に true か fal...

REXML::Attributes#each_attribute {|attribute| ... } -> () (18531.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#get_attribute(name) -> Attribute | nil (18507.0)

name という名前の属性を取得します。

...L::Attributes#[]

//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_elements("/root/a").first

a.attributes.get_attribute(...
..."att") # => att='&lt;'
a.attributes.get_attribute("foo:att") # => foo:att='1'
//}...

REXML::Attributes#get_attribute_ns(namespace, name) -> REXML::Attribute | nil (18507.0)

namespace と name で特定される属性を返します。

...espace 名前空間(URI, 文字列)
@param name 属性名(文字列)

//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...
...ot/a").first

a.attributes.get_attribute_ns("", "att") # => att='&lt;'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt") # => nil
//}...

絞り込み条件を変える

OpenSSL::X509::Request#add_attribute(attr) -> OpenSSL::X509::Attribute (12608.0)

新たな attribute を CSR に追加します。

...新たな attribute を CSR に追加します。

@param attr 追加する attribute(OpenSSL::X509::Attribute の
インスタンス)
@return 渡した attribute オブジェクトを返します
@see OpenSSL::X509::Request#attribute,
OpenSSL::X509::Request#attribute=...

RDoc::Context#add_attribute(an_attribute) -> () (12523.0)

引数で指定した RDoc::Attr オブジェクトを追加します。

...引数で指定した RDoc::Attr オブジェクトを追加します。

@param an_attribute RDoc::Attr オブジェクトを指定します。...

REXML::Element#attribute(name, namespace = nil) -> REXML::Attribute | nil (12507.0)

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

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

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

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

namespace で名前空間の URI を指定することで、その名前空間内で
name という...
...URI(文字列)
//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_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
//}...
<< 1 2 3 ... > >>