451件ヒット
[401-451件を表示]
(0.061秒)
ライブラリ
- ビルトイン (43)
-
cgi
/ core (12) - csv (24)
- date (192)
-
json
/ add / date (12) -
json
/ add / date _ time (12) - logger (24)
-
net
/ imap (24) - openssl (12)
- time (36)
-
webrick
/ httpresponse (48)
クラス
- Array (12)
- CGI (12)
-
CSV
:: FieldInfo (12) - Date (144)
- DateTime (72)
- Logger (12)
-
Logger
:: Formatter (12) - Module (12)
-
Net
:: IMAP :: ContentDisposition (12) -
Net
:: IMAP :: Envelope (12) -
OpenSSL
:: Cipher (12) - Range (19)
- Time (48)
-
WEBrick
:: HTTPResponse (48)
モジュール
キーワード
- [] (12)
- asctime (12)
- autoload? (12)
-
content
_ length (12) -
content
_ length= (12) - cover? (19)
- ctime (12)
-
datetime
_ format (24) - header (24)
- httpdate (24)
-
install
_ update _ defaults _ str (12) - iso8601 (24)
- jisx0301 (24)
- param (12)
- rfc2822 (24)
- rfc3339 (24)
- rfc822 (24)
- strftime (24)
-
to
_ csv (12) -
to
_ json (24) -
to
_ s (24) - update (12)
- xmlschema (24)
- zone (12)
検索結果
先頭5件
-
WEBrick
:: HTTPResponse # to _ s -> String (209.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-Length: 4
hoge... -
Range
# cover?(obj) -> bool (85.0) -
obj が範囲内に含まれている時に true を返します。
...emlist[String の例][ruby]{
('b'..'d').include?('d') # => true
('b'..'d').include?('ba') # => false
('b'..'d').cover?('d') # => true
('b'..'d').cover?('ba') # => true
//}
//emlist[Date, DateTime の例][ruby]{
require 'date'
(Date.today - 365 .. Date.today + 365).include?(Date.today)......#=> true
(Date.today - 365 .. Date.today + 365).include?(DateTime.now) #=> false
(Date.today - 365 .. Date.today + 365).cover?(Date.today) #=> true
(Date.today - 365 .. Date.today + 365).cover?(DateTime.now) #=> true
//}
@see Range#include?, Range#===......#=> true
(Date.today - 365 .. Date.today + 365).include?(DateTime.now) #=> false
(Date.today - 365 .. Date.today + 365).cover?(Date.today) #=> true
(Date.today - 365 .. Date.today + 365).cover?(DateTime.now) #=> true
//}... -
WEBrick
:: HTTPResponse # content _ length -> Integer | nil (19.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実......'
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 GMT
Server:
Content-Length: 2
ho... -
WEBrick
:: HTTPResponse # content _ length=(len) (19.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実......'
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 GMT
Server:
Content-Length: 2
ho... -
Range
# cover?(range) -> bool (15.0) -
2.6 以降の cover? は、Range#include? や Range#=== と異なり、 引数に Range オブジェクトを指定して比較できます。
2.6 以降の cover? は、Range#include? や Range#=== と異なり、
引数に Range オブジェクトを指定して比較できます。
引数が Range オブジェクトの場合、引数の範囲が self の範囲に含まれる時に true を返します。
@param range 比較対象の Range クラスのインスタンスを指定します。
//emlist[引数が Range の例][ruby]{
(1..5).cover?(2..3) #=> true
(1..5).cover?(0..6) #=> false
(1..5).cover?(1...6) ...