Class: DroidProj::Logger
- Inherits:
-
Object
- Object
- DroidProj::Logger
- Defined in:
- lib/droidproj/logger.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Returns the value of attribute enabled.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Logger
constructor
A new instance of Logger.
- #log(message) ⇒ Object
Constructor Details
#initialize ⇒ Logger
Returns a new instance of Logger.
15 16 17 |
# File 'lib/droidproj/logger.rb', line 15 def initialize @enabled = true end |
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled.
13 14 15 |
# File 'lib/droidproj/logger.rb', line 13 def enabled @enabled end |
Class Method Details
.log(message) ⇒ Object
4 5 6 |
# File 'lib/droidproj/logger.rb', line 4 def log() logger.log() end |
.logger ⇒ Object
8 9 10 |
# File 'lib/droidproj/logger.rb', line 8 def logger @logger ||= new end |
Instance Method Details
#log(message) ⇒ Object
19 20 21 |
# File 'lib/droidproj/logger.rb', line 19 def log() puts .green if self.enabled end |