Class: ActiveUsage::Configuration
- Inherits:
-
Object
- Object
- ActiveUsage::Configuration
- Defined in:
- lib/active_usage/configuration.rb
Overview
Holds configuration options for the ActiveUsage gem.
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
- #logger ⇒ Object
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#window_size ⇒ Object
Returns the value of attribute window_size.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 |
# File 'lib/active_usage/configuration.rb', line 9 def initialize @tags = {} @window_size = 300 end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
6 7 8 |
# File 'lib/active_usage/configuration.rb', line 6 def adapter @adapter end |
#logger ⇒ Object
14 15 16 |
# File 'lib/active_usage/configuration.rb', line 14 def logger @logger || (defined?(Rails.logger) && Rails.logger) || Logger.new($stderr) end |
#tags ⇒ Object
Returns the value of attribute tags.
6 7 8 |
# File 'lib/active_usage/configuration.rb', line 6 def @tags end |
#window_size ⇒ Object
Returns the value of attribute window_size.
6 7 8 |
# File 'lib/active_usage/configuration.rb', line 6 def window_size @window_size end |