Class: Hotspots::Configuration
- Inherits:
-
Object
- Object
- Hotspots::Configuration
- Defined in:
- lib/hotspots/configuration.rb
Overview
:nodoc: all
Instance Attribute Summary collapse
-
#cutoff ⇒ Object
Returns the value of attribute cutoff.
-
#exit_strategy ⇒ Object
Returns the value of attribute exit_strategy.
-
#file_filter ⇒ Object
Returns the value of attribute file_filter.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#message_filters ⇒ Object
Returns the value of attribute message_filters.
-
#repository ⇒ Object
Returns the value of attribute repository.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
- #enable_verbosity ⇒ Object
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
- #log_level ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/hotspots/configuration.rb', line 7 def initialize( = {}) @repository = "." @time = 15 @message_filters = [""] @file_filter = "" @cutoff = 0 @info_log_level = [:info_log_level] || ::Logger::INFO @error_log_level = [:error_log_level] || ::Logger::ERROR @logger = [:logger] || default_logger @exit_strategy = Exit::Noop.new @logger.level = @error_log_level end |
Instance Attribute Details
#cutoff ⇒ Object
Returns the value of attribute cutoff.
3 4 5 |
# File 'lib/hotspots/configuration.rb', line 3 def cutoff @cutoff end |
#exit_strategy ⇒ Object
Returns the value of attribute exit_strategy.
5 6 7 |
# File 'lib/hotspots/configuration.rb', line 5 def exit_strategy @exit_strategy end |
#file_filter ⇒ Object
Returns the value of attribute file_filter.
3 4 5 |
# File 'lib/hotspots/configuration.rb', line 3 def file_filter @file_filter end |
#logger ⇒ Object
Returns the value of attribute logger.
4 5 6 |
# File 'lib/hotspots/configuration.rb', line 4 def logger @logger end |
#message_filters ⇒ Object
Returns the value of attribute message_filters.
3 4 5 |
# File 'lib/hotspots/configuration.rb', line 3 def @message_filters end |
#repository ⇒ Object
Returns the value of attribute repository.
3 4 5 |
# File 'lib/hotspots/configuration.rb', line 3 def repository @repository end |
#time ⇒ Object
Returns the value of attribute time.
3 4 5 |
# File 'lib/hotspots/configuration.rb', line 3 def time @time end |
Instance Method Details
#enable_verbosity ⇒ Object
24 25 26 |
# File 'lib/hotspots/configuration.rb', line 24 def enable_verbosity @logger.level = @info_log_level end |
#log_level ⇒ Object
20 21 22 |
# File 'lib/hotspots/configuration.rb', line 20 def log_level @logger.level end |