Class: GitWakaTime::Log
- Inherits:
-
Object
- Object
- GitWakaTime::Log
- Defined in:
- lib/gitwakatime/log.rb
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.
3 4 5 6 7 |
# File 'lib/gitwakatime/log.rb', line 3 def initialize(msg, color = nil) @color = color @msg = msg end |
Instance Method Details
#print_message ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/gitwakatime/log.rb', line 9 def return if ENV['waka_log'] == 'false' if @color.nil? puts @msg else puts @msg.send(@color) end end |