Class: Firebug::Configuration
- Inherits:
-
Object
- Object
- Firebug::Configuration
- Defined in:
- lib/firebug/configuration.rb
Overview
A configuration object.
Instance Attribute Summary collapse
-
#key ⇒ String
The encryption key used to encrypt and decrypt cookies.
-
#match_ip_address ⇒ Proc
Use the remote ip address in addition to the session ID.
-
#match_user_agent ⇒ Proc
Use the user-agent in addition to the session ID.
-
#session_filter ⇒ Proc
Return true if this request should have it’s session written.
-
#silence_logger ⇒ Boolean
Silence ActiveRecord logs.
-
#table_name ⇒ String
The name of the sessions table.
-
#truncate_user_agent ⇒ Boolean
Truncate the user-agent to 120 characters.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
31 32 33 34 35 36 37 38 |
# File 'lib/firebug/configuration.rb', line 31 def initialize self.truncate_user_agent = false self.match_user_agent = false self.match_ip_address = false self.silence_logger = true # default to always writing the session self.session_filter = ->(_) { true } end |
Instance Attribute Details
#key ⇒ String
The encryption key used to encrypt and decrypt cookies.
21 22 23 |
# File 'lib/firebug/configuration.rb', line 21 def key @key end |
#match_ip_address ⇒ Proc
Use the remote ip address in addition to the session ID.
21 22 23 |
# File 'lib/firebug/configuration.rb', line 21 def match_ip_address @match_ip_address end |
#match_user_agent ⇒ Proc
Use the user-agent in addition to the session ID.
21 22 23 |
# File 'lib/firebug/configuration.rb', line 21 def match_user_agent @match_user_agent end |
#session_filter ⇒ Proc
Return true if this request should have it’s session written.
21 22 23 |
# File 'lib/firebug/configuration.rb', line 21 def session_filter @session_filter end |
#silence_logger ⇒ Boolean
Silence ActiveRecord logs.
21 22 23 |
# File 'lib/firebug/configuration.rb', line 21 def silence_logger @silence_logger end |
#table_name ⇒ String
The name of the sessions table.
21 22 23 |
# File 'lib/firebug/configuration.rb', line 21 def table_name @table_name end |
#truncate_user_agent ⇒ Boolean
Truncate the user-agent to 120 characters.
21 22 23 |
# File 'lib/firebug/configuration.rb', line 21 def truncate_user_agent @truncate_user_agent end |