30件ヒット
[1-30件を表示]
(0.094秒)
ライブラリ
- ビルトイン (10)
- time (10)
-
webrick
/ httpresponse (10)
クラス
- Time (10)
- UnboundMethod (10)
-
WEBrick
:: HTTPResponse (10)
キーワード
- []= (10)
-
source
_ location (10)
検索結果
先頭3件
-
Time
# httpdate -> String (35132.0) -
2616 で定義されている HTTP-date の rfc1123-date 形式の文字列を 返します。
...を返します。
//emlist{
day-of-week, DD month-name CCYY hh:mm:ss GMT
//}
注意: 結果はいつも UTC (GMT) です。
使用例
require 'time'
iso8601_time = '2008-08-31T12:34:56+09:00'
t = Time.iso8601(iso8601_time)
p t.httpdate #=> "Sun, 31 Aug 2008 03:34:56 GMT"... -
UnboundMethod
# source _ location -> [String , Integer] | nil (31.0) -
ソースコードのファイル名と行番号を配列で返します。
...合は nil を返します。
//emlist[例][ruby]{
require 'time'
Time.instance_method(:zone).source_location # => nil
Time.instance_method(:httpdate).source_location # => ["/Users/user/.rbenv/versions/2.4.3/lib/ruby/2.4.0/time.rb", 654]
//}
@see Proc#source_location, Method#source_locati... -
WEBrick
:: HTTPResponse # []=(field , val) (19.0) -
レスポンスの該当するヘッダに val を設定します。
...せん。
@param val ヘッダの値を指定します。to_s メソッドによって文字列に変換されます。
require 'time'
res['last-modified'] = Time.now.httpdate
@see WEBrick::HTTPResponse#chunked?, WEBrick::HTTPResponse#content_length,
WEBrick::HTTPResponse#content_type...