Class: Pincers::Http::Cookie
- Inherits:
-
Object
- Object
- Pincers::Http::Cookie
- Defined in:
- lib/pincers/http/cookie.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#expires ⇒ Object
readonly
Returns the value of attribute expires.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#secure ⇒ Object
readonly
Returns the value of attribute secure.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(_name, _value, _domain, _path = nil, _expires = nil, _secure = nil) ⇒ Cookie
constructor
A new instance of Cookie.
Constructor Details
#initialize(_name, _value, _domain, _path = nil, _expires = nil, _secure = nil) ⇒ Cookie
Returns a new instance of Cookie.
6 7 8 9 10 11 12 13 |
# File 'lib/pincers/http/cookie.rb', line 6 def initialize(_name, _value, _domain, _path=nil, _expires=nil, _secure=nil) @name = _name @value = _value @domain = _domain.gsub(/^\./,'').downcase # RFC 6265 5.2.3 @path = valid_path?(_path) ? _path.downcase : '/' @expires = _expires @secure = _secure end |
Instance Attribute Details
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
4 5 6 |
# File 'lib/pincers/http/cookie.rb', line 4 def domain @domain end |
#expires ⇒ Object (readonly)
Returns the value of attribute expires.
4 5 6 |
# File 'lib/pincers/http/cookie.rb', line 4 def expires @expires end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/pincers/http/cookie.rb', line 4 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/pincers/http/cookie.rb', line 4 def path @path end |
#secure ⇒ Object (readonly)
Returns the value of attribute secure.
4 5 6 |
# File 'lib/pincers/http/cookie.rb', line 4 def secure @secure end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/pincers/http/cookie.rb', line 4 def value @value end |