48件ヒット
[1-48件を表示]
(0.128秒)
ライブラリ
- ビルトイン (12)
- date (12)
- time (12)
-
webrick
/ httpresponse (12)
クラス
- Date (12)
- Time (12)
- UnboundMethod (12)
-
WEBrick
:: HTTPResponse (12)
キーワード
- []= (12)
-
source
_ location (12)
検索結果
先頭4件
-
Date
# httpdate -> String (27202.0) -
2616 (1123) で定められた書式の文字列を返します。
2616 (1123) で定められた書式の文字列を返します。 -
Time
# httpdate -> String (24208.0) -
2616 で定義されている HTTP-date の rfc1123-date 形式の文字列を 返します。
...2616 で定義されている HTTP-date の rfc1123-date 形式の文字列を
返します。
@return 以下の形式の文字列を返します。
//emlist{
day-of-week, DD month-name CCYY hh:mm:ss GMT
//}
注意: 結果はいつも UTC (GMT) です。
使用例
require 'time'
is......o8601_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 (3007.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_location... -
WEBrick
:: HTTPResponse # []=(field , val) (107.0) -
レスポンスの該当するヘッダに val を設定します。
...d ヘッダ名を文字列で指定します。大文字と小文字を区別しません。
@param val ヘッダの値を指定します。to_s メソッドによって文字列に変換されます。
require 'time'
res['last-modified'] = Time.now.httpdate
@see WEBrick::HTTPResponse#chunked...