Module: Pidly::Logger
- Included in:
- Control
- Defined in:
- lib/pidly/logger.rb
Overview
Logger namespace
Instance Attribute Summary collapse
-
#verbosity ⇒ Object
Returns the value of attribute verbosity.
Class Method Summary collapse
-
.included(receiver) ⇒ Object
Extend and include callback methods.
Instance Method Summary collapse
-
#log(type, message) ⇒ Strign
Log.
-
#verbose? ⇒ true, false
Verbose.
Instance Attribute Details
#verbosity ⇒ Object
Returns the value of attribute verbosity.
7 8 9 |
# File 'lib/pidly/logger.rb', line 7 def verbosity @verbosity end |
Class Method Details
.included(receiver) ⇒ Object
Extend and include callback methods
43 44 45 |
# File 'lib/pidly/logger.rb', line 43 def self.included(receiver) receiver.extend self end |
Instance Method Details
#log(type, message) ⇒ Strign
Log
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/pidly/logger.rb', line 26 def log(type, ) case type.to_sym when :info msg = when :error msg = end @messages << msg puts msg if verbose? end |
#verbose? ⇒ true, false
Verbose
14 15 16 |
# File 'lib/pidly/logger.rb', line 14 def verbose? @verbosity end |