Class: Kissable::SinatraCookieAdapter
- Inherits:
-
Object
- Object
- Kissable::SinatraCookieAdapter
- Defined in:
- lib/kissable/sinatra_cookie_adapter.rb
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #[](cookie_name) ⇒ Object
- #[]=(cookie_name, cookie_data) ⇒ Object
-
#initialize(request, response) ⇒ SinatraCookieAdapter
constructor
A new instance of SinatraCookieAdapter.
Constructor Details
#initialize(request, response) ⇒ SinatraCookieAdapter
Returns a new instance of SinatraCookieAdapter.
5 6 7 8 |
# File 'lib/kissable/sinatra_cookie_adapter.rb', line 5 def initialize(request, response) @request = request @response = response end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
3 4 5 |
# File 'lib/kissable/sinatra_cookie_adapter.rb', line 3 def request @request end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/kissable/sinatra_cookie_adapter.rb', line 3 def response @response end |
Instance Method Details
#[](cookie_name) ⇒ Object
10 11 12 |
# File 'lib/kissable/sinatra_cookie_adapter.rb', line 10 def []() request.[] end |
#[]=(cookie_name, cookie_data) ⇒ Object
14 15 16 |
# File 'lib/kissable/sinatra_cookie_adapter.rb', line 14 def []=(, ) response.(, ) end |