Class: GitWakaTime::Log

Inherits:
Object
  • Object
show all
Defined in:
lib/gitwakatime/log.rb

Instance Method Summary collapse

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
  print_message
end

Instance Method Details



9
10
11
12
13
14
15
16
# File 'lib/gitwakatime/log.rb', line 9

def print_message
  return if ENV['waka_log'] == 'false'
  if @color.nil?
    puts @msg
  else
    puts @msg.send(@color)
  end
end