Class: Logster::Configuration
- Inherits:
-
Object
- Object
- Logster::Configuration
- Defined in:
- lib/logster/configuration.rb
Instance Attribute Summary collapse
-
#allow_grouping ⇒ Object
Returns the value of attribute allow_grouping.
-
#application_version ⇒ Object
Returns the value of attribute application_version.
-
#current_context ⇒ Object
Returns the value of attribute current_context.
-
#environments ⇒ Object
Returns the value of attribute environments.
-
#redis_prefix ⇒ Object
Returns the value of attribute redis_prefix.
-
#redis_raw_connection ⇒ Object
Returns the value of attribute redis_raw_connection.
- #subdirectory ⇒ Object
-
#web_title ⇒ Object
Returns the value of attribute web_title.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/logster/configuration.rb', line 8 def initialize # lambda |env,block| @current_context = lambda{ |_, &block| block.call } @environments = [:development, :production] @subdirectory = nil @allow_grouping = false if defined?(::Rails) && ::Rails.env.production? @allow_grouping = true end end |
Instance Attribute Details
#allow_grouping ⇒ Object
Returns the value of attribute allow_grouping.
3 4 5 |
# File 'lib/logster/configuration.rb', line 3 def allow_grouping @allow_grouping end |
#application_version ⇒ Object
Returns the value of attribute application_version.
3 4 5 |
# File 'lib/logster/configuration.rb', line 3 def application_version @application_version end |
#current_context ⇒ Object
Returns the value of attribute current_context.
3 4 5 |
# File 'lib/logster/configuration.rb', line 3 def current_context @current_context end |
#environments ⇒ Object
Returns the value of attribute environments.
3 4 5 |
# File 'lib/logster/configuration.rb', line 3 def environments @environments end |
#redis_prefix ⇒ Object
Returns the value of attribute redis_prefix.
3 4 5 |
# File 'lib/logster/configuration.rb', line 3 def redis_prefix @redis_prefix end |
#redis_raw_connection ⇒ Object
Returns the value of attribute redis_raw_connection.
3 4 5 |
# File 'lib/logster/configuration.rb', line 3 def redis_raw_connection @redis_raw_connection end |
#subdirectory ⇒ Object
20 21 22 |
# File 'lib/logster/configuration.rb', line 20 def subdirectory @subdirectory || '/logs' end |
#web_title ⇒ Object
Returns the value of attribute web_title.
3 4 5 |
# File 'lib/logster/configuration.rb', line 3 def web_title @web_title end |