179件ヒット
[1-100件を表示]
(0.104秒)
種類
- インスタンスメソッド (87)
- 関数 (44)
- 文書 (26)
- 特異メソッド (11)
- モジュール (11)
ライブラリ
- ビルトイン (43)
- monitor (11)
-
rexml
/ document (55)
クラス
- Hash (32)
-
REXML
:: Attribute (11) -
REXML
:: CData (22) -
REXML
:: Text (22) - Range (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - MonitorMixin (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (4) -
avalue
_ to _ svalue (11) -
mvalue
_ to _ svalue (11) - new (11)
-
proc
_ to _ s (11) -
rb
_ mod _ to _ s (11) -
to
_ string (11) -
transform
_ values (16) -
transform
_ values! (16) - value (22)
検索結果
先頭5件
-
static VALUE avalue
_ to _ svalue(VALUE v) (18600.0) -
-
static VALUE mvalue
_ to _ svalue(VALUE v) (18600.0) -
-
REXML
:: CData # to _ s -> String (18220.0) -
テキスト文字列を返します。
...テキスト文字列を返します。
@see REXML::Text#value, REXML::Text#to_s
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root><![CDATA[foobar baz]]></root>
EOS
doc.root[0].class # => REXML::CData
doc.root[0].value # => "foobar baz"
//}... -
REXML
:: Text # to _ s -> String (18219.0) -
テキストの内容を正規化(すべての実体をエスケープ)された状態で返します。
...トとして妥当です。
結果は REXML::Text.new で指定した entity_filter を反映しています。
@see REXML::Text#value
//emlist[][ruby]{
require 'rexml/document'
t = REXML::Text.new("< & foobar", false, nil, false)
t.to_s # => "< & foobar"
t.value # => "< & foobar"
//}... -
REXML
:: Attribute # to _ string -> String (12316.0) -
"name='value'" という形式の文字列を返します。
..."name='value'" という形式の文字列を返します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").to_string # => "ns:r='rval'"
//}... -
static VALUE proc
_ to _ s(VALUE self , VALUE other) (6500.0) -
-
static VALUE rb
_ mod _ to _ s(VALUE klass) (6400.0) -
-
REXML
:: CData # value -> String (6220.0) -
テキスト文字列を返します。
...テキスト文字列を返します。
@see REXML::Text#value, REXML::Text#to_s
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root><![CDATA[foobar baz]]></root>
EOS
doc.root[0].class # => REXML::CData
doc.root[0].value # => "foobar baz"
//}... -
Hash
# transform _ values {|value| . . . } -> Hash (6219.0) -
すべての値に対してブロックを呼び出した結果で置き換えたハッシュを返します。 キーは変化しません。
...クトを
返します。
//emlist[例][ruby]{
h = { a: 1, b: 2, c: 3 }
h.transform_values {|v| v * v + 1 } #=> { a: 2, b: 5, c: 10 }
h.transform_values(&:to_s) #=> { a: "1", b: "2", c: "3" }
h.transform_values.with_index {|v, i| "#{v}.#{i}" }......#=> { a: "1.0", b: "2.1", c: "3.2" }
//}
@see Hash#transform_values!......#=> { a: "1.0", b: "2.1", c: "3.2" }
//}
@see Hash#transform_values!
@see Hash#transform_keys
@see Hash#transform_keys!... -
Hash
# transform _ values! {|value| . . . } -> self (6219.0) -
すべての値に対してブロックを呼び出した結果でハッシュの値を変更します。 キーは変化しません。
...rm_values! は常に self を返します。
ブロックが与えられなかった場合は、Enumerator オブジェクトを
返します。
//emlist[例][ruby]{
h = { a: 1, b: 2, c: 3 }
h.transform_values! {|v| v * v + 1 } #=> { a: 2, b: 5, c: 10 }
h.transform_values!(&:to_s)......#=> { a: "2", b: "5", c: "10" }
h.transform_values!.with_index {|v, i| "#{v}.#{i}" }
#=> { a: "2.0", b: "5.1", c: "10.2" }
//}
@see Hash#transform_values......#=> { a: "2", b: "5", c: "10" }
h.transform_values!.with_index {|v, i| "#{v}.#{i}" }
#=> { a: "2.0", b: "5.1", c: "10.2" }
//}
@see Hash#transform_values
@see Hash#transform_keys
@see Hash#transform_keys!...