るりまサーチ

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

別のキーワード

  1. _builtin name
  2. resolv each_name
  3. net/imap name
  4. openssl name
  5. win32ole name

検索結果

<< 1 2 > >>

Rake::NameSpace.new(task_manager, scope_list) (24131.0)

自身を初期化します。

...@param scope_list 名前空間のリストを指定します。

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

task default: :test_rake_app
task :test_rake_app do
name
_space = Rake::NameSpace.new(Rake.application, Rake::Scope.new("sample"))
name
_space.scope # => LL("sample")
end
//}...

REXML::Element#delete_namespace(namespace = "xmlns") -> self (12426.0)

名前空間を要素から削除します。

...を削除します。

@param namespace 削除する名前空間の prefix

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new "<a xmlns:foo='bar' xmlns='twiddle'/>"
doc.root.delete_namespace
doc.to_s # => "<a xmlns:foo='bar'/>"
doc.root.delete_namespace 'foo'
doc.to_s # => "<a/>"...

REXML::Element#add_namespace(prefix, uri) -> self (12238.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'/>"
//}...

REXML::Element#add_namespace(uri) (12238.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'/>"
//}...

REXML::Element#namespace(prefix=nil) -> String (12231.0)

self の文脈で prefix が指している名前空間の URI を返します。

...ます。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns='1' xmlns:y='2'><b/><c xmlns:z='3'/><y:d /></a>")
b = doc.elements['//b']
b.namespace # => "1"
b.namespace("y") # => "2"
b.namespace("z") # => nil
d = doc.elements['//y:d']
d.namespace # => "2"
//}...

絞り込み条件を変える

REXML::Attribute#namespace(arg = nil) -> String | nil (12213.0)

属性の名前空間の URI を返します。

...//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("xmlns:ns", "http://www.example.com/ns")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").prefix # => "ns"
p e.attributes.get_attribute("r").namespace # => "http://www.example.com/ns"
//}...

REXML::Attributes#namespaces -> { String => String } (12206.0)

self の中で宣言されている名前空間の集合を返します。

...'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.namespaces
# => {"foo"=>"http://example.org/foo",...
..."bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}...

REXML::Element#namespaces -> {String => String} (12206.0)

self の文脈で定義されている名前空間の情報を返します。

...義されている名前空間を、{ prefix => 識別子 }
というハッシュテーブルで返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns:x='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
doc.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"}
//}...

ruby 1.8.4 feature (3186.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...ruby]: ruby インタプリタの変更
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* on...
...g]>))
* ((<ruby 1.8.4 feature/File.identical? [new]>))
* ((<ruby 1.8.4 feature/FileTest.identical? [new]>))
* ((<ruby 1.8.4 feature/File.split [change]>))
* ((<ruby 1.8.4 feature/File.basename [change]>))
* ((<ruby 1.8.4 feature/File.dirname [change]>))
* ((<ruby 1.8.4 feature/Dir.glob (...
...きませんので,ご注意ください。

# * ext/tk/lib/tk.rb: bug fix on handling of Tcl's namespaces.
#
# * ext/tk/lib/tk/namespace.rb: ditto.
#

Tcl/Tk 上の namespace の扱いが正常に行えないというバグを修正しました.

#Wed Nov 2 20:14:53 2005 Hidet...

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

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

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

namespace
で名前空間を、 name で prefix を含まない属性名を
指定します。

指定された属性が存在しない場合は nil を返します。

XML プロセッサが prefix を置き換えてしまった場合...
...使うことで属性を正しく指定することができます。

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

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

doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://examp...

絞り込み条件を変える

<< 1 2 > >>