397件ヒット
[1-100件を表示]
(0.230秒)
ライブラリ
- ビルトイン (193)
-
cgi
/ html (36) -
rexml
/ document (60) -
rubygems
/ package / tar _ header (12) - scanf (36)
- socket (60)
クラス
-
ARGF
. class (24) - Binding (7)
-
Gem
:: Package :: TarHeader (12) - IO (12)
- MatchData (4)
- Module (144)
-
REXML
:: Attribute (12) -
REXML
:: Attributes (12) -
REXML
:: Element (24) - Socket (24)
- String (20)
- Symbol (6)
- UDPSocket (36)
モジュール
-
CGI
:: HtmlExtension (36) - Kernel (12)
-
REXML
:: Namespace (12)
キーワード
-
alias
_ method (12) - base (12)
- bind (12)
- captures (2)
- connect (12)
- deconstruct (2)
-
deprecate
_ constant (12) -
inplace
_ mode (12) - namespace (12)
- prefix (36)
- prefixes (24)
- private (48)
- protected (36)
- public (36)
- putc (12)
- scanf (36)
- send (36)
-
source
_ location (7) -
start
_ with? (14)
検索結果
先頭5件
-
CGI
:: HtmlExtension # a(href = "") -> String (18357.0) -
a 要素を生成します。
...
a 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。
@param href 文字列を指定します。属性をハッシュで指定することもできます。
例:
a("http://www.example.com") { "Example" }
# => "<A HRE......F=\"http://www.example.com\">Example</A>"
a("HREF" => "http://www.example.com", "TARGET" => "_top") { "Example" }
# => "<A HREF=\"http://www.example.com\" TARGET=\"_top\">Example</A>"... -
CGI
:: HtmlExtension # a(href = "") { . . . } -> String (18357.0) -
a 要素を生成します。
...
a 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。
@param href 文字列を指定します。属性をハッシュで指定することもできます。
例:
a("http://www.example.com") { "Example" }
# => "<A HRE......F=\"http://www.example.com\">Example</A>"
a("HREF" => "http://www.example.com", "TARGET" => "_top") { "Example" }
# => "<A HREF=\"http://www.example.com\" TARGET=\"_top\">Example</A>"... -
String
# start _ with?(*prefixes) -> bool (15249.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...先頭が 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
"string".start_with?(/\d/) # => false
//}
@see String#end_with?
@see String#delete_prefix, String#delete_prefix!... -
String
# scanf(format) -> Array (15191.0) -
ブロックを指定しない場合、見つかった文字列を format に従って変 換し、そのオブジェクトの配列を返します。 format で指定した文字列が見つからない場合は空の配列を 生成して返します。
...字列を format に従って変
換し、そのオブジェクトの配列を返します。
format で指定した文字列が見つからない場合は空の配列を
生成して返します。
require 'scanf'
str = "123 abc 456 def 789 ghi"
p str.scanf("%d%s") #=> [123, "abc"]
ブロ......scanf を継続して実行し、順次
見つかった文字列を変換したオブジェクトの配列を引数に、ブロックを
実行します。このとき、ブロックの実行結果を要素とする配列を返します。
require 'scanf'
str = "123 0x45 678 0x90"
p str.scanf......4]]
formatに完全にマッチしていなくても、部分的にマッチしていれば、
ブロックは実行されます。
require 'scanf'
str = "123 abc 456 def"
ret = str.scanf("%s%d") { |s, n| [s, n] }
p ret #=> [["123", nil], ["abc", 456], ["def", nil]]
@param format スキ... -
String
# scanf(format) {|*ary| . . . } -> Array (15191.0) -
ブロックを指定しない場合、見つかった文字列を format に従って変 換し、そのオブジェクトの配列を返します。 format で指定した文字列が見つからない場合は空の配列を 生成して返します。
...字列を format に従って変
換し、そのオブジェクトの配列を返します。
format で指定した文字列が見つからない場合は空の配列を
生成して返します。
require 'scanf'
str = "123 abc 456 def 789 ghi"
p str.scanf("%d%s") #=> [123, "abc"]
ブロ......scanf を継続して実行し、順次
見つかった文字列を変換したオブジェクトの配列を引数に、ブロックを
実行します。このとき、ブロックの実行結果を要素とする配列を返します。
require 'scanf'
str = "123 0x45 678 0x90"
p str.scanf......4]]
formatに完全にマッチしていなくても、部分的にマッチしていれば、
ブロックは実行されます。
require 'scanf'
str = "123 abc 456 def"
ret = str.scanf("%s%d") { |s, n| [s, n] }
p ret #=> [["123", nil], ["abc", 456], ["def", nil]]
@param format スキ... -
MatchData
# captures -> [String] (9227.0) -
$1, $2, ... を格納した配列を返します。
...す。
MatchData#to_a と異なり $& を要素に含みません。
グループにマッチした部分文字列がなければ対応する要素は nil になります。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.to_a # => ["foobar", "foo", "bar", nil]
p $~.captures #......=> ["foo", "bar", nil]
//}
@see MatchData#to_a, MatchData#named_captures, d:spec/pattern_matching#matching_non_primitive_objects... -
REXML
:: Attribute # prefix -> String (9226.0) -
属性の名前空間を返します。
...XML::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.new( "x", "y" )
p a.prefix #... -
REXML
:: Attributes # prefixes -> [String] (9226.0) -
self の中で宣言されている prefix の集合を 文字列の配列で返します。
...prefix の集合を
文字列の配列で返します。
self が属する要素より上位の要素で定義されているものは含みません。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://exa......mple.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
p doc.root.attributes.prefixes # => ["foo", "bar"]
p a.attributes.prefixes # => []
//}... -
Gem
:: Package :: TarHeader # prefix -> String (9202.0) -
tar のヘッダに含まれる prefix を返します。
...tar のヘッダに含まれる prefix を返します。... -
REXML
:: Namespace # prefix -> String (9202.0) -
prefix (前置修飾子) を返します。
...prefix (前置修飾子) を返します。
@see REXML::Namespace#prefix=... -
REXML
:: Element # namespace(prefix=nil) -> String (6314.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"
b.namespace("y") # => "2"
b.namespace("z") # => nil
d = doc.elements['//y:d']
d.namespace # => "2"
//}...