Class: Authlogic::ControllerAdapters::SinatraAdapter::Cookies
- Inherits:
-
Object
- Object
- Authlogic::ControllerAdapters::SinatraAdapter::Cookies
- Defined in:
- lib/authlogic/controller_adapters/sinatra_adapter.rb
Overview
Cookie management functions
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
- #[]=(key, options) ⇒ Object
- #delete(key, options = {}) ⇒ Object
-
#initialize(request, response) ⇒ Cookies
constructor
A new instance of Cookies.
- #method_missing(meth, *args, &block) ⇒ Object
Constructor Details
#initialize(request, response) ⇒ Cookies
Returns a new instance of Cookies.
11 12 13 14 |
# File 'lib/authlogic/controller_adapters/sinatra_adapter.rb', line 11 def initialize(request, response) @request = request @response = response end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
24 25 26 |
# File 'lib/authlogic/controller_adapters/sinatra_adapter.rb', line 24 def method_missing(meth, *args, &block) @request..send(meth, *args, &block) end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
9 10 11 |
# File 'lib/authlogic/controller_adapters/sinatra_adapter.rb', line 9 def request @request end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
9 10 11 |
# File 'lib/authlogic/controller_adapters/sinatra_adapter.rb', line 9 def response @response end |
Instance Method Details
#[]=(key, options) ⇒ Object
20 21 22 |
# File 'lib/authlogic/controller_adapters/sinatra_adapter.rb', line 20 def []=(key, ) @response.(key, ) end |
#delete(key, options = {}) ⇒ Object
16 17 18 |
# File 'lib/authlogic/controller_adapters/sinatra_adapter.rb', line 16 def delete(key, = {}) @response.(key, ) end |