るりまサーチ

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

別のキーワード

  1. time parse
  2. parser parse
  3. csv parse
  4. ripper parse
  5. psych parse_stream

ライブラリ

モジュール

キーワード

検索結果

<< < 1 2 3 >>

Net::HTTPHeader#each {|name, val| .... } -> () (19.0)

保持しているヘッダ名とその値をそれぞれ ブロックに渡して呼びだします。

...ックに渡されます。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_header { |key,value| puts "#{key} = #{value}" }

# => accept-encoding = gzip;q=1.0,deflate;q=0.6,identity;q=0.3
# => accept =...

Net::HTTPHeader#each_header {|name, val| .... } -> () (19.0)

保持しているヘッダ名とその値をそれぞれ ブロックに渡して呼びだします。

...ックに渡されます。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_header { |key,value| puts "#{key} = #{value}" }

# => accept-encoding = gzip;q=1.0,deflate;q=0.6,identity;q=0.3
# => accept =...

Psych::Nodes::Node#tag -> String | nil (19.0)

ノードに付加されたタグを返します。

...されていない場合は nil を返します。

ast = Psych.parse(<<EOS)
---
- !!str a
- b
EOS

p ast.root.children[0].value # => "a"
p ast.root.children[0].tag # => "tag:yaml.org,2002:str"

p ast.root.children[1].value # => "b"
p ast.root.children[1].tag # => nil...

Net::HTTPExceptions#response -> Net::HTTPResponse (13.0)

例外の原因となったレスポンスオブジェクトを返します。

...レスポンスオブジェクトを返します。

//emlist[例][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.response # => #<Net::HTTPNotFound 404 Not Found readbody=true>
end
//}...
<< < 1 2 3 >>