Class: Warden::CookieSession::Configuration
- Inherits:
-
Object
- Object
- Warden::CookieSession::Configuration
- Defined in:
- lib/warden/cookie_session/configuration.rb
Instance Attribute Summary collapse
-
#cookie ⇒ Object
Returns the value of attribute cookie.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#secret ⇒ Object
Returns the value of attribute secret.
-
#wrapper ⇒ Object
Returns the value of attribute wrapper.
Instance Method Summary collapse
- #fetch_record(key) ⇒ Object
-
#initialize(cookie = 'cookie_session', secret = nil) ⇒ Configuration
constructor
Override defaults for configuration.
- #serialize_record(record) ⇒ Object
- #validate_record(record, salt) ⇒ Object
Constructor Details
#initialize(cookie = 'cookie_session', secret = nil) ⇒ Configuration
Override defaults for configuration
12 13 14 15 16 |
# File 'lib/warden/cookie_session/configuration.rb', line 12 def initialize( = 'cookie_session', secret = nil) @cookie = @secret = secret @logger = Logger.new(STDOUT, level: Logger::INFO, progname: 'CookieSession') end |
Instance Attribute Details
#cookie ⇒ Object
Returns the value of attribute cookie.
7 8 9 |
# File 'lib/warden/cookie_session/configuration.rb', line 7 def @cookie end |
#logger ⇒ Object
Returns the value of attribute logger.
7 8 9 |
# File 'lib/warden/cookie_session/configuration.rb', line 7 def logger @logger end |
#secret ⇒ Object
Returns the value of attribute secret.
7 8 9 |
# File 'lib/warden/cookie_session/configuration.rb', line 7 def secret @secret end |
#wrapper ⇒ Object
Returns the value of attribute wrapper.
7 8 9 |
# File 'lib/warden/cookie_session/configuration.rb', line 7 def wrapper @wrapper end |
Instance Method Details
#fetch_record(key) ⇒ Object
22 23 24 |
# File 'lib/warden/cookie_session/configuration.rb', line 22 def fetch_record(key) @wrapper&.fetch_record(key) end |
#serialize_record(record) ⇒ Object
18 19 20 |
# File 'lib/warden/cookie_session/configuration.rb', line 18 def serialize_record(record) @wrapper&.serialize_record(record) end |
#validate_record(record, salt) ⇒ Object
26 27 28 |
# File 'lib/warden/cookie_session/configuration.rb', line 26 def validate_record(record, salt) @wrapper&.validate_record(record, salt) end |