Class: Ruboclean::Logger
- Inherits:
-
Object
- Object
- Ruboclean::Logger
- Defined in:
- lib/ruboclean/logger.rb
Overview
Logger for clean management of log levels
Instance Method Summary collapse
-
#initialize(log_level = :verbose) ⇒ Logger
constructor
A new instance of Logger.
- #verbose(message) ⇒ Object
Constructor Details
#initialize(log_level = :verbose) ⇒ Logger
Returns a new instance of Logger.
6 7 8 9 10 |
# File 'lib/ruboclean/logger.rb', line 6 def initialize(log_level = :verbose) raise ArgumentError, "Invalid log level" unless %i[verbose none].include?(log_level) @log_level = log_level end |
Instance Method Details
#verbose(message) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/ruboclean/logger.rb', line 12 def verbose() case @log_level when :verbose print end end |