Class: Firebug::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/firebug/configuration.rb

Overview

A configuration object.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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

#keyString

The encryption key used to encrypt and decrypt cookies.

Returns:

  • (String)

    the current value of key



21
22
23
# File 'lib/firebug/configuration.rb', line 21

def key
  @key
end

#match_ip_addressProc

Use the remote ip address in addition to the session ID.

Returns:

  • (Proc)

    the current value of match_ip_address



21
22
23
# File 'lib/firebug/configuration.rb', line 21

def match_ip_address
  @match_ip_address
end

#match_user_agentProc

Use the user-agent in addition to the session ID.

Returns:

  • (Proc)

    the current value of match_user_agent



21
22
23
# File 'lib/firebug/configuration.rb', line 21

def match_user_agent
  @match_user_agent
end

#session_filterProc

Return true if this request should have it’s session written.

Returns:

  • (Proc)

    the current value of session_filter

See Also:



21
22
23
# File 'lib/firebug/configuration.rb', line 21

def session_filter
  @session_filter
end

#silence_loggerBoolean

Silence ActiveRecord logs.

Returns:

  • (Boolean)

    the current value of silence_logger



21
22
23
# File 'lib/firebug/configuration.rb', line 21

def silence_logger
  @silence_logger
end

#table_nameString

The name of the sessions table.

Returns:

  • (String)

    the current value of table_name



21
22
23
# File 'lib/firebug/configuration.rb', line 21

def table_name
  @table_name
end

#truncate_user_agentBoolean

Truncate the user-agent to 120 characters.

Returns:

  • (Boolean)

    the current value of truncate_user_agent



21
22
23
# File 'lib/firebug/configuration.rb', line 21

def truncate_user_agent
  @truncate_user_agent
end