るりまサーチ

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

別のキーワード

  1. _builtin []
  2. matrix []
  3. string []
  4. rake []
  5. symbol []

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 > >>

REXML::Attributes#[](name) -> String | nil (21101.0)

属性名nameの属性値を返します。

...

属性値ではなく REXML::Attribute オブジェクトが必要な場合は
REXML::Attributes#get_attribute を使ってください。

nameという属性名の属性がない場合は nil を返します。

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

p a.attributes["att"] # => "<"
p a.attributes["bar:att"] # => "2"
//}...

Net::IMAP::FetchData#attr -> { String => object } (18108.0)

各メッセージのアトリビュートの値をハッシュテーブルで返します。

...String#capitalize でキャピタライズ
されている。
: INTERNALDATE
メッセージの内部日付。文字列。
: RFC822
BODY[] と同じ。文字列。
: RFC822.HEADER
BODY.PEEK[HEADER] と同じ。文字列。
: RFC822.SIZE
メッセージの 822 サイズ。整数...

REXML::Attributes#[]=(name, value) (9101.0)

指定した属性を更新します。

...//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["att"] = "9"
a.attributes["foo:...
...attt"] = "8"
a # => <a foo:att='1' bar:att='2' att='9' foo:attt='8'/>
//}

@see REXML::Attributes#add...

REXML::Attributes#prefixes -> [String] (3007.0)

self の中で宣言されている prefix の集合を 文字列の配列で返します。

...せん。

//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

p doc.root.attributes.prefixes # =>...
...["foo", "bar"]
p a.attributes.prefixes # => []
//}...

WIN32OLE_TYPE#default_event_sources -> [WIN32OLE_TYPE] (19.0)

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

...plorer')
ctl = WIN32OLE.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] ==...
...avigate2 was called
[#<WIN32OLE:0x9d08f0>, "http://www.ruby-lang.org/", 0, "", nil, "", false]
2010-10-06 22:33:54 +0900: DownloadBegin was called
[]

2010-10-06 22:33:54 +0900: PropertyChange was called
["{D0FCA420-D3F5-11CF-B211-00AA004AE837}"]
2010-10-06 22:33:54 +0900: CommandStateChange wa...
...as called
[10000, 10000]
2010-10-06 22:33:54 +0900: ProgressChange was called
[-1, 10000]
2010-10-06 22:33:54 +0900: DownloadComplete was called
[]

2010-10-06 22:33:54 +0900: ProgressChange was called
[10000, 10000]
2010-10-06 22:33:54 +0900: DocumentComplete was called
[#<WIN32OLE:0x438a2f...

絞り込み条件を変える

Forwardable#def_delegator(accessor, method, ali = method) -> () (13.0)

メソッドの委譲先を設定します。

...def_instance_delegator の別名になります。

例:

require 'forwardable'
class MyQueue
extend Forwardable
attr
_reader :queue
def initialize
@queue = []
end

def_delegator :@queue, :push, :mypush
end

q = MyQueue.new
q.mypush 42
q.queue # => [42]
q.pu...

Forwardable#def_instance_delegator(accessor, method, ali = method) -> () (13.0)

メソッドの委譲先を設定します。

...def_instance_delegator の別名になります。

例:

require 'forwardable'
class MyQueue
extend Forwardable
attr
_reader :queue
def initialize
@queue = []
end

def_delegator :@queue, :push, :mypush
end

q = MyQueue.new
q.mypush 42
q.queue # => [42]
q.pu...

String#encode(**options) -> String (13.0)

self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。

...に対する置換文字を設定します。このオプションに与えられるオブジェクトは Hash, Proc, Method のいずれかまたは [] メソッドを持つオブジェクトです。
キーは現在のトランスコーダのソースエンコーディングで未定義の文字...
...文字参照 (大文字16進数) に置き換えます。この出力は HTML の #PCDATA として利用することもできます。
: :xml => :attr
文字列を XML の AttValue として適するように処理します。具体的には、'&'、'<'、'>'、'"'、をそれぞれ '&amp;'、'&l...

String#encode(encoding, **options) -> String (13.0)

self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。

...に対する置換文字を設定します。このオプションに与えられるオブジェクトは Hash, Proc, Method のいずれかまたは [] メソッドを持つオブジェクトです。
キーは現在のトランスコーダのソースエンコーディングで未定義の文字...
...文字参照 (大文字16進数) に置き換えます。この出力は HTML の #PCDATA として利用することもできます。
: :xml => :attr
文字列を XML の AttValue として適するように処理します。具体的には、'&'、'<'、'>'、'"'、をそれぞれ '&amp;'、'&l...

String#encode(encoding, from_encoding, **options) -> String (13.0)

self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。

...に対する置換文字を設定します。このオプションに与えられるオブジェクトは Hash, Proc, Method のいずれかまたは [] メソッドを持つオブジェクトです。
キーは現在のトランスコーダのソースエンコーディングで未定義の文字...
...文字参照 (大文字16進数) に置き換えます。この出力は HTML の #PCDATA として利用することもできます。
: :xml => :attr
文字列を XML の AttValue として適するように処理します。具体的には、'&'、'<'、'>'、'"'、をそれぞれ '&amp;'、'&l...

絞り込み条件を変える

<< 1 2 > >>