Class: SimpleSession::Base::OptionHash
- Inherits:
-
Object
- Object
- SimpleSession::Base::OptionHash
- Defined in:
- lib/simple_session/base.rb
Constant Summary collapse
- SANITATION =
[:key, :secret, :options_key]
Instance Method Summary collapse
-
#initialize(args) ⇒ OptionHash
constructor
A new instance of OptionHash.
- #opts ⇒ Object
- #p_time ⇒ Object
- #process_request_options ⇒ Object
- #sanitize_opts ⇒ Object
Constructor Details
#initialize(args) ⇒ OptionHash
Returns a new instance of OptionHash.
189 190 191 192 193 |
# File 'lib/simple_session/base.rb', line 189 def initialize args @opts = args sanitize_opts end |
Instance Method Details
#opts ⇒ Object
195 196 197 |
# File 'lib/simple_session/base.rb', line 195 def opts @opts end |
#p_time ⇒ Object
211 212 213 214 |
# File 'lib/simple_session/base.rb', line 211 def p_time time = Time.now + @opts[:max_age].to_i @opts[:expires] = time if @opts[:max_age] end |
#process_request_options ⇒ Object
203 204 205 206 207 208 209 |
# File 'lib/simple_session/base.rb', line 203 def begin p_time rescue => e puts e. end end |
#sanitize_opts ⇒ Object
199 200 201 |
# File 'lib/simple_session/base.rb', line 199 def sanitize_opts @opts = sanitize @opts end |