Sha256: 71b028e7c30fa0ab4226ef4935e72e13fef902169ca5716451d934507e995c98

Contents?: true

Size: 367 Bytes

Versions: 4

Compression:

Stored size: 367 Bytes

Contents

module GitWakaTime
  ##
  # Pretty output, and ability to silence in testing
  class Log
    def initialize(msg, color = nil)
      @color = color
      @msg = msg
      print_message
    end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gitwakatime-0.4.0 lib/gitwakatime/log.rb
gitwakatime-0.2.2 lib/gitwakatime/log.rb
gitwakatime-0.2.1 lib/gitwakatime/log.rb
gitwakatime-0.2.0 lib/gitwakatime/log.rb