Class: UzuUzu::RackSession::Cookie
- Defined in:
- lib/uzuuzu-core/rack_session/cookie.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
Instance Method Summary collapse
- #app(app) ⇒ Object
-
#initialize(env = nil) ⇒ Cookie
constructor
A new instance of Cookie.
Constructor Details
#initialize(env = nil) ⇒ Cookie
Returns a new instance of Cookie.
12 13 14 15 16 17 18 |
# File 'lib/uzuuzu-core/rack_session/cookie.rb', line 12 def initialize(env=nil) @adapter = :cookie @secret = 'uzuuzu' if env @secret = env['secret'] || @secret end end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
7 8 9 |
# File 'lib/uzuuzu-core/rack_session/cookie.rb', line 7 def adapter @adapter end |
Instance Method Details
#app(app) ⇒ Object
20 21 22 |
# File 'lib/uzuuzu-core/rack_session/cookie.rb', line 20 def app(app) Rack::Session::Cookie.new(app, :secret => @secret) end |