Class: K3CloudWebapiSdk::Model::Cookie
- Inherits:
-
Object
- Object
- K3CloudWebapiSdk::Model::Cookie
- Defined in:
- lib/k3cloud_webapi_sdk/model/cookie.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#expires ⇒ Object
Returns the value of attribute expires.
-
#http_only ⇒ Object
Returns the value of attribute http_only.
-
#name ⇒ Object
Returns the value of attribute name.
-
#path ⇒ Object
Returns the value of attribute path.
-
#secure ⇒ Object
Returns the value of attribute secure.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(name: '', value: '', domain: '', path: '/', expires: nil, http_only: false, secure: false) ⇒ Cookie
constructor
A new instance of Cookie.
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name: '', value: '', domain: '', path: '/', expires: nil, http_only: false, secure: false) ⇒ Cookie
Returns a new instance of Cookie.
6 7 8 9 10 11 12 13 14 |
# File 'lib/k3cloud_webapi_sdk/model/cookie.rb', line 6 def initialize(name: '', value: '', domain: '', path: '/', expires: nil, http_only: false, secure: false) @name = name @value = value @domain = domain @path = path @expires = expires @http_only = http_only @secure = secure end |
Instance Attribute Details
#domain ⇒ Object
Returns the value of attribute domain.
4 5 6 |
# File 'lib/k3cloud_webapi_sdk/model/cookie.rb', line 4 def domain @domain end |
#expires ⇒ Object
Returns the value of attribute expires.
4 5 6 |
# File 'lib/k3cloud_webapi_sdk/model/cookie.rb', line 4 def expires @expires end |
#http_only ⇒ Object
Returns the value of attribute http_only.
4 5 6 |
# File 'lib/k3cloud_webapi_sdk/model/cookie.rb', line 4 def http_only @http_only end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/k3cloud_webapi_sdk/model/cookie.rb', line 4 def name @name end |
#path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/k3cloud_webapi_sdk/model/cookie.rb', line 4 def path @path end |
#secure ⇒ Object
Returns the value of attribute secure.
4 5 6 |
# File 'lib/k3cloud_webapi_sdk/model/cookie.rb', line 4 def secure @secure end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/k3cloud_webapi_sdk/model/cookie.rb', line 4 def value @value end |
Instance Method Details
#to_h ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/k3cloud_webapi_sdk/model/cookie.rb', line 20 def to_h { name: @name, value: @value, domain: @domain, path: @path, expires: @expires, http_only: @http_only, secure: @secure } end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/k3cloud_webapi_sdk/model/cookie.rb', line 16 def to_s "#{@name}=#{@value}" end |