るりまサーチ

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

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

検索結果

<< 1 2 3 > >>

WEBrick::HTTPResponse#http_version -> WEBrick::HTTPVersion (21235.0)

レスポンスの HTTP のバージョンを表す WEBrick::HTTPVersion オブジェクトを返します。

... HTTP のバージョンを表す WEBrick::HTTPVersion オブジェクトを返します。

require 'webrick'
res = WEBrick::HTTPResponse.new( { :HTTPVersion => "1.1" } )
p res.http_version.class #=> WEBrick::HTTPVersion
p res.http_version.to_s...

WEBrick::HTTPResponse#to_s -> String (21113.0)

実際にクライアントに送られるデータを文字列として返します。

...るデータを文字列として返します。

require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
print res.to_s

#=> 出力結果
HTTP
/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 08:58:49 GMT
Server:
Content-...

WEBrick::HTTPVersion#to_s -> String (21107.0)

自身を文字列に変換して返します。

...自身を文字列に変換して返します。

require 'webrick'
v = WEBrick::HTTPVersion.new('1.1')
p v.to_s #=> "1.1"...

WEBrick::HTTPRequest#to_s -> String (21101.0)

リクエストのヘッダとボディをまとめて文字列として返します。

リクエストのヘッダとボディをまとめて文字列として返します。

WEBrick::HTTPUtils::FormData#to_s -> String (21101.0)

自身が表すフォームデータのうちのひとつを文字列として返します。

自身が表すフォームデータのうちのひとつを文字列として返します。

絞り込み条件を変える

URI::Generic#to_s -> String (18119.0)

自身が表す URI を文字列として返します。

...自身が表す URI を文字列として返します。

例:
require 'uri'
p URI.parse('http://example.com/').to_s #=> "http://example.com/"...

Module#to_s -> String (15119.0)

モジュールやクラスの名前を文字列で返します。

...るモジュールすべてを
「::」を使って表示した名前のことです。
クラスパスの例としては「CGI::Session」「Net::HTTP」が挙げられます。

@return 名前のないモジュール / クラスに対しては、name は nil を、それ以外はオブジェクト...
...lass C
end
end

p A.name #=> "A"
p A::B.name #=> "A::B"
p A::C.name #=> "A::C"

# 名前のないモジュール / クラス
p Module.new.name #=> nil
p Class.new.name #=> nil
p Module.new.to_s #=> "#<Module:0x00007f90b09112c8>"
p Class.new.to_s #=> "#<Class:0x00007fa5c40b41b0>"
//}...

WEBrick::HTTPResponse#chunked=(flag) (3018.0)

真に設定するとクライアントに返す内容(エンティティボディ)を chunk に分けるようになります。

...rick::HTTPResponse#request_http_version が 1.0 以下である場合、この値は無視されます。

@param flag true を指定した場合、レスポンスを chunk に分けてクライアントに返します。

require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersio...
...n => "1.1" } )
res.body = 'hoge'
res.chunked = true
print res.to_s

#=> 出力結果
HTTP
/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 09:04:28 GMT
Server:
Transfer-Encoding: chunked

4
hoge
0

#...

WEBrick::HTTPResponse#body=(val) (3012.0)

クライアントに返す内容(エンティティボディ)をセットします。

...ク形式エンコーディングされます。

require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
print res.to_s

#=> 出力結果
HTTP
/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 08:58:49 GMT
Server:
Content-...

WEBrick::HTTPResponse#content_length -> Integer | nil (3012.0)

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

...とは出来ません。

require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
f = File.new('testfile')
res.body = f
res.content_length = 2
print res.to_s

#=> 出力結果
HTTP
/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 12:04:32...

絞り込み条件を変える

<< 1 2 3 > >>