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.
- #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 19 |
# 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) && defined?(::Rails.env) && ::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 |
#subdirectory ⇒ Object
21 22 23 |
# File 'lib/logster/configuration.rb', line 21 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 |