Class: GitWakaTime::Log
- Inherits:
-
Object
- Object
- GitWakaTime::Log
- Defined in:
- lib/gitwakatime/log.rb
Overview
Pretty output, and ability to silence in testing
Instance Method Summary collapse
-
#initialize(msg, color = nil) ⇒ Log
constructor
A new instance of Log.
- #print_message ⇒ Object
Constructor Details
#initialize(msg, color = nil) ⇒ Log
Returns a new instance of Log.
5 6 7 8 9 |
# File 'lib/gitwakatime/log.rb', line 5 def initialize(msg, color = nil) @color = color @msg = msg end |
Instance Method Details
#print_message ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/gitwakatime/log.rb', line 11 def return if ENV['waka_log'] == 'false' if @color.nil? puts @msg else puts @msg.send(@color) end end |