Ruby 1.8.7 リファレンスマニュアル > ライブラリ一覧 > webrick/cookieライブラリ > WEBrick::Cookieクラス

class WEBrick::Cookie

クラスの継承リスト: WEBrick::Cookie < Object < Kernel

要約

Cookie を表すクラスです。[RFC2109] に準拠しています。 RFC2109 は [RFC2965] により破棄されましたが、WEBrick::Cookie クラスは RFC2965 に対応していません。

特異メソッド

定義 説明
new(name, value) -> WEBrick::Cookie

新しい WEBrick::Cookie オブジェクトを生成して返します。 name にクッキーの名前を、value にクッキーで保持する値を与える。

parse(str) -> [WEBrick::Cookie]

ユーザーエージェントから送られてきた Cookie ヘッダの値 str をパースし、 新しく WEBrick::Cookie オブジェクトを生成しその配列を返します。 各属性の形式が仕様に準拠しているかを確認しません。

parse_set_cookie(str) -> WEBrick::Cookie

サーバから送られてくる Set-Cookie ヘッダの値 str をパースし、 新しく WEBrick::Cookie オブジェクトを生成し返します。

parse_set_cookies(str) -> [WEBrick::Cookie]

サーバから送られてくる Set-Cookie ヘッダの値 str をパースし、 新しく WEBrick::Cookie オブジェクトの配列を生成し返します。

インスタンスメソッド

定義 説明
comment -> String
comment=(value)

コメントを文字列で表すアクセサです。

domain -> String
domain=(value)

ドメイン名を文字列で表すアクセサです。

expires -> Time
expires=(value)

有効期限を Timeオブジェクトで表すアクセサです。

max_age -> Integer
max_age=(value)

クッキーの寿命を整数(単位は秒)で表すアクセサです。

name -> String

Cookie の名前を文字列で返します。

path -> String
path=(value)

パス名を文字列で表すアクセサです。

secure -> bool
secure=(value)

クッキーのSecure属性を真偽値で表すアクセサです。

to_s -> String

クッキーを文字列にして返します。

value -> String
value=(str)

クッキーの値を文字列で表すアクセサです。

version -> Integer
version=(value)

Cookie のバージョン番号を整数で表すアクセサです。

継承したメソッド

== === =~ __id__ __send__ _dump class clone dclone display enum_for eql? equal? extend freeze frozen? hash initialize initialize_copy inspect instance_eval instance_exec instance_of? instance_variable_defined? instance_variable_get instance_variable_set instance_variables is_a? marshal_dump marshal_load method method_missing methods nil? pretty_inspect pretty_print pretty_print_cycle pretty_print_inspect pretty_print_instance_variables private_methods protected_methods public_methods remove_instance_variable respond_to? singleton_method_added singleton_method_removed singleton_method_undefined singleton_methods taint tainted? tap to_a to_ary to_hash to_int to_io to_proc to_regexp to_str to_yaml to_yaml_properties to_yaml_style untaint