るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle align_size_t

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

UncaughtThrowError#value -> object (21242.0)

Kernel.#throw に指定した value を返します。

...Kernel.#throw に指定した value を返します。

//emlist[例][ruby]{
def do_complicated_things
t
hrow :uncaught_label, "uncaught_value"
end

begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.value # => "uncaught_value"
end
//}...

REXML::Text#value -> String (21232.0)

テキストの内容を非正規化(すべての実体をアンエスケープ)された状態で返します。

...

このメソッドの返り値では raw モードや entity_filter は無視されます。

@see REXML::Text#raw, REXML::Text#to_s

//emlist[][ruby]{
require 'rexml/document'
t
= REXML::Text.new("< & foobar", false, nil, false)
t
.to_s # => "&lt; &amp; foobar"
t
.value # => "< & foobar"
//}...

WIN32OLE_VARIANT#value -> object (21230.0)

値に対応するRubyオブジェクトを取得します。

...値に対応するRubyオブジェクトを取得します。

@return 値に対応するRubyのオブジェクトを返します。

obj = WIN32OLE_VARIANT.new(1, WIN32OLE::VARIANT::VT_BSTR)
obj.value # => "1" (VT_BSTRを指定して生成したので、Stringオブジェクトとなる)...

OpenSSL::ASN1::ASN1Data#value -> object (21224.0)

ASN.1 値に対応するRubyのオブジェクトを返します。

...ASN.1 値に対応するRubyのオブジェクトを返します。

@see OpenSSL::ASN1::ASN1Data#value=...

Net::HTTPResponse#value -> nil (21126.0)

レスポンスが 2xx(成功)でなかった場合に、対応する 例外を発生させます。

...ます。

@raise HTTPError レスポンスが 1xx であるか、 net/http が知らない
種類のレスポンスである場合に発生します。
@raise HTTPRetriableError レスポンスが 3xx である場合に発生します。
@raise HTTPServerException レスポンス...
...
@raise HTTPFatalError レスポンスが 5xx である場合に発生します。

//emlist[例 レスポンスが 2xx(成功)][ruby]{
require 'net/http'

uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.value # => nil
//}

//emlist[例 レス...
...ポンスが 2xx以外][ruby]{
require 'net/http'

uri = "http://www.example.com/invalid.html"
response = Net::HTTP.get_response(URI.parse(uri))
begin
response.value
rescue => e
e.class # => Net::HTTPServerException
e.message # => 404 "Not Found"
end
//}...

絞り込み条件を変える

REXML::CData#value -> 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"
//}...

Hash#transform_values {|value| ... } -> Hash (12308.0)

すべての値に対してブロックを呼び出した結果で置き換えたハッシュを返します。 キーは変化しません。

...eturn 置き換えたハッシュを返します。
ブロックが与えられなかった場合は、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(&:t...
...o_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!...
...o_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!
@see Hash#transform_keys
@see Hash#transform_keys!...

Hash#transform_values! {|value| ... } -> self (12308.0)

すべての値に対してブロックを呼び出した結果でハッシュの値を変更します。 キーは変化しません。

...@return transform_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...
..._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
@see Hash#transform_keys
@see Hash#transform_keys!...

Fiddle::Pointer#to_value -> object (12224.0)

自身はヒープに確保された Ruby のオブジェクトを指すポインタであると仮定して、 自身が指すオブジェクトを返します。

...自身はヒープに確保された Ruby のオブジェクトを指すポインタであると仮定して、
自身が指すオブジェクトを返します。

例:

require 'fiddle'

s = 'abc'
i = Fiddle.dlwrap(s)
cptr = Fiddle::Pointer.new(i)
p cptr.to_value #=> "abc"...
<< 1 2 3 ... > >>