ライブラリ
- ビルトイン (8)
- bigdecimal (1)
- ipaddr (2)
- mkmf (2)
-
rexml
/ document (7) -
rexml
/ sax2listener (2)
クラス
- BigDecimal (1)
- IPAddr (2)
-
REXML
:: Attribute (1) -
REXML
:: Attributes (1) -
REXML
:: Element (3) - Regexp (1)
- String (5)
- Symbol (2)
モジュール
- Kernel (2)
-
REXML
:: Namespace (2) -
REXML
:: SAX2Listener (2)
キーワード
-
add
_ namespace (1) -
create
_ makefile (1) -
delete
_ prefix (1) -
delete
_ prefix! (1) -
delete
_ suffix (1) -
delete
_ suffix! (1) -
end
_ prefix _ mapping (1) -
end
_ with? (1) -
fixed
_ encoding? (1) -
install
_ files (1) - mask (1)
- namespace (1)
- prefix (2)
- prefix= (2)
- prefixes (2)
-
start
_ prefix _ mapping (1) -
start
_ with? (2)
検索結果
先頭5件
-
BigDecimal
# fix -> BigDecimal (63607.0) -
self の整数部分を新しい BigDecimal オブジェクトにして返します。
self の整数部分を新しい BigDecimal オブジェクトにして返します。 -
String
# delete _ prefix!(prefix) -> self | nil (36904.0) -
self の先頭から破壊的に prefix を削除します。
self の先頭から破壊的に prefix を削除します。
@param prefix 先頭から削除する文字列を指定します。
@return 削除した場合は self、変化しなかった場合は nil
//emlist[][ruby]{
"hello".delete_prefix!("hel") # => "lo"
"hello".delete_prefix!("llo") # => nil
//}
@see String#delete_prefix
@see String#delete_suffix!
@see String#start_with? -
String
# delete _ prefix(prefix) -> String (36904.0) -
文字列の先頭から prefix を削除した文字列のコピーを返します。
文字列の先頭から prefix を削除した文字列のコピーを返します。
@param prefix 先頭から削除する文字列を指定します。
@return 文字列の先頭から prefix を削除した文字列のコピー
//emlist[][ruby]{
"hello".delete_prefix("hel") # => "lo"
"hello".delete_prefix("llo") # => "hello"
//}
@see String#delete_prefix!
@see String#delete_suffix
@see String#start_with? -
String
# delete _ suffix!(suffix) -> self | nil (36904.0) -
self の末尾から破壊的に suffix を削除します。
self の末尾から破壊的に suffix を削除します。
@param suffix 末尾から削除する文字列を指定します。
@return 削除した場合は self、変化しなかった場合は nil
//emlist[][ruby]{
"hello".delete_suffix!("llo") # => "he"
"hello".delete_suffix!("hel") # => nil
//}
@see String#chomp!
@see String#chop!
@see String#delete_prefix!
@see String#delete_suffix
@see S... -
String
# delete _ suffix(suffix) -> String (36904.0) -
文字列の末尾から suffix を削除した文字列のコピーを返します。
文字列の末尾から suffix を削除した文字列のコピーを返します。
@param suffix 末尾から削除する文字列を指定します。
@return 文字列の末尾から suffix を削除した文字列のコピー
//emlist[][ruby]{
"hello".delete_suffix("llo") # => "he"
"hello".delete_suffix("hel") # => "hello"
//}
@see String#chomp
@see String#chop
@see String#delete_prefix
@see String#delete_suffix!
... -
REXML
:: Namespace # prefix=(value) (27604.0) -
prefix (前置修飾子) を設定します。
prefix (前置修飾子) を設定します。
@param value prefix文字列
@see REXML::Namespace#prefix -
REXML
:: SAX2Listener # end _ prefix _ mapping(prefix) -> () (27604.0) -
名前空間の接頭辞(prefix)の適用範囲が終了したときに 呼び出されるコールバックメソッドです。
名前空間の接頭辞(prefix)の適用範囲が終了したときに
呼び出されるコールバックメソッドです。
@param prefix 接頭辞の文字列が渡されます -
REXML
:: SAX2Listener # start _ prefix _ mapping(prefix , uri) -> () (27604.0) -
名前空間の接頭辞(prefix)が導入されたときに呼び出される コールバックメソッドです。
名前空間の接頭辞(prefix)が導入されたときに呼び出される
コールバックメソッドです。
以下のようなXMLを処理
<a xmlns:foo="http://foo.example.org/">
<foo:b />
</a>
すると
start_prefix_mapping("foo", "http://foo.example.org/")
start_element(nil, "a", "a", {"xmlns:foo" => "http://foo.example.org/"})
:
end_element(nil, "a", "a")
end_... -
REXML
:: Attribute # prefix -> String (27304.0) -
属性の名前空間を返します。
属性の名前空間を返します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new( "elns:myelement" )
e.add_attribute( "nsa:a", "aval" )
e.add_attribute( "b", "bval" )
p e.attributes.get_attribute( "a" ).prefix # -> "nsa"
p e.attributes.get_attribute( "b" ).prefix # -> "elns"
a = REXML::Attribute... -
REXML
:: Attributes # prefixes -> [String] (27304.0) -
self の中で宣言されている prefix の集合を 文字列の配列で返します。
self の中で宣言されている prefix の集合を
文字列の配列で返します。
self が属する要素より上位の要素で定義されているものは含みません。
//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='<'/>
</root>
EOS
a = doc... -
REXML
:: Element # prefixes -> [String] (27304.0) -
self の文脈で定義されている prefix を文字列の配列を返します。
self の文脈で定義されている prefix を文字列の配列を返します。
対象の要素とその外側の要素で定義されている 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'].prefixes # => ["x", "y"]
//} -
REXML
:: Namespace # prefix -> String (27304.0) -
prefix (前置修飾子) を返します。
prefix (前置修飾子) を返します。
@see REXML::Namespace#prefix= -
IPAddr
# prefix=(prefixlen) (18904.0) -
プリフィックス長を prefixlen に設定します。
プリフィックス長を prefixlen に設定します。
@param prefixlen 設定したいプリフィックス長をビット数で指定します。
@raise IPAddr::InvalidPrefixError 引数 prefixlen に整数以外のオブジェクトを指定した場合に発生します。 -
Kernel
# create _ makefile(target , srcprefix = nil) -> true (18604.0) -
@todo
@todo
Kernel#have_library などの各種検査の結果を元に、拡張ライブラリを
ビルドするための Makefile を生成します。
extconf.rb は普通このメソッドの呼び出しで終ります。
@param target ターゲットとなる拡張ライブラリの名前を指定します。
例えば、拡張ライブラリで "Init_foo" という関数を定義して
いる場合は、"foo" を指定します。
'/' を含む場合は、最後のスラッシュ以降のみをターゲット名
として使用します... -
Kernel
# install _ files(mfile , ifiles , map = nil , srcprefix = nil) -> [] (18604.0) -
このメソッドは create_makefile, install_rb が使用します。 内部用のメソッドです。
このメソッドは create_makefile, install_rb が使用します。
内部用のメソッドです。
@param mfile Makefile を表す File のインスタンスです。
@param ifiles インストールするファイルのリストを指定します。
@param map ???
@param srcprefix ソースディレクトリを指定します。 -
Regexp
# fixed _ encoding? -> bool (18604.0) -
正規表現が任意の ASCII 互換エンコーディングとマッチ可能な時に false を返します。
正規表現が任意の ASCII 互換エンコーディングとマッチ可能な時に false を返します。
//emlist[例][ruby]{
# -*- coding:utf-8 -*-
r = /a/
r.fixed_encoding? # => false
r.encoding # => #<Encoding:US-ASCII>
r =~ "\u{6666} a" # => 2
r =~ "\xa1\... -
REXML
:: Element # add _ namespace(prefix , uri) -> self (9604.0) -
名前空間を要素に追加します。
名前空間を要素に追加します。
引数が2個の場合は prefix と uri を指定します。
引数が1個の場合はデフォルトの 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",... -
REXML
:: Element # namespace(prefix=nil) -> String (9604.0) -
self の文脈で prefix が指している名前空間の URI を返します。
self の文脈で prefix が指している名前空間の URI を返します。
prefix を省略すると、デフォルトの名前空間の URI を返します。
prefix で指示される名前空間の宣言が存在しない場合は nil を返します。
//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"
... -
Symbol
# end _ with?(*suffixes) -> bool (9604.0) -
self の末尾が suffixes のいずれかであるとき true を返します。
self の末尾が suffixes のいずれかであるとき true を返します。
(self.to_s.end_with?と同じです。)
@param suffixes パターンを表す文字列 (のリスト)
@see Symbol#start_with?
@see String#end_with?
//emlist[][ruby]{
:hello.end_with?("ello") #=> true
# returns true if one of the +suffixes+ matches.
:hello.end_with?("heaven", "... -
Symbol
# start _ with?(*prefixes) -> bool (9604.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
self の先頭が prefixes のいずれかであるとき true を返します。
(self.to_s.start_with?と同じです。)
@param prefixes パターンを表す文字列または正規表現 (のリスト)
@see Symbol#end_with?
@see String#start_with?
//emlist[][ruby]{
:hello.start_with?("hell") #=> true
:hello.start_with?(/H/i) #=> true
# returns true i... -
IPAddr
# mask(prefixlen) -> IPAddr (604.0) -
マスクされた新しい IPAddr オブジェクトを返します。 引数にはプリフィックス長とマスクの両方を受け付けます (e.g. 8, 64, "255.255.255.0")。
マスクされた新しい IPAddr オブジェクトを返します。
引数にはプリフィックス長とマスクの両方を受け付けます
(e.g. 8, 64, "255.255.255.0")。
@param prefixlen プリフィックス長またはマスクを表す数値か文字列。 -
String
# start _ with?(*prefixes) -> bool (604.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
self の先頭が prefixes のいずれかであるとき true を返します。
@param prefixes パターンを表す文字列または正規表現 (のリスト)
//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?("ing", "str") # => true
"string".start_with?(/\w/) # => true
"strin...