るりまサーチ

最速Rubyリファレンスマニュアル検索!
179件ヒット [1-100件を表示] (0.104秒)
トップページ > クエリ:i[x] > クエリ:Value[x] > クエリ:to_s[x]

別のキーワード

  1. openssl value
  2. rss value=
  3. rss value
  4. _builtin each_value
  5. rexml/document value

検索結果

<< 1 2 > >>

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 # => "&lt; &amp; 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!...

絞り込み条件を変える

<< 1 2 > >>