るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle type_ssize_t

ライブラリ

モジュール

キーワード

検索結果

<< < 1 2 >>

REXML::Element#add_namespace(uri) (9139.0)

名前空間を要素に追加します。

...ォルトの namespace の uri を指定します。

既に同じ prefix が存在する場合はそれが上書きされます。

@param prefix 名前空間の prefix
@param uri 名前空間の uri

//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new("a")
a.add_namespace("xmlns:foo"...
..., "bar" )
a.add_namespace("foo", "bar") # 上と同じ意味
a.add_namespace("twiddle")
a.to_s # => "<a xmlns:foo='bar' xmlns='twiddle'/>"
a.add_namespace("foo", "baz")
a.to_s # => "<a xmlns:foo='baz' xmlns='twiddle'/>"
//}...

Rake::TaskManager#in_namespace(name) {|name_space| ... } -> Array (9120.0)

与えられた名前の名前空間でブロックを評価します。

...ます。

@param name 名前を指定します。

//emlist[][ruby]{
# Rakefile での記載例とする

t
ask default: :test_rake_app

namespace
:sample do
def hoge
puts "hoge"
end
end

t
ask :test_rake_app do
t
ask.application.in_namespace("sample") do
hoge # => "hoge"
end
end
//}...

Rake::NameSpace#tasks -> Array (9113.0)

タスクのリストを返します。

...タスクのリストを返します。

//emlist[][ruby]{
# Rakefile での記載例とする

namespace
:ns do |ns|
t
ask :ts1 do
end
t
ask :ts2 do
end

ns.tasks # => [<Rake::Task ns:ts1 => []>, <Rake::Task ns:ts2 => []>]
end
//}...

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

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

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

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

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

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

Rake::NameSpace#[](name) -> Rake::Task (3113.0)

与えられた名前のタスクを返します。

...のタスクを返します。

@param name タスクの名前を指定します。

//emlist[][ruby]{
# Rakefile での記載例とする

namespace
:ns do |ns|
t
ask :ts1 do
end
t
ask :ts2 do
end

ns[:ts1] # => <Rake::Task ns:ts1 => []>
ns[:ts2] # => <Rake::Task ns:ts2 => []>
end
//}...

絞り込み条件を変える

REXML::Attributes#each {|name, value| ... } -> () (3013.0)

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

...:Namespace#exapnded_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...
...a.attributes.each do |name, value|
p [name, value]
end

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