Sha256: 7a21e9d309c973977492a5b983e1b6fa8146a77d7359a9ccbcf88949e0e4cb15

Contents?: true

Size: 650 Bytes

Versions: 4

Compression:

Stored size: 650 Bytes

Contents

require "colored"

module VsClean
  class Console
    def self.log_step(message)
      print_arrow
      puts message.bold.green + "\r"
    end
    
    def self.log_substep(message)
      print_arrow
      puts message.blue + "\r"
    end
    
    def self.log_info(message)
      print_arrow
      puts message.white + "\r"
    end
    
    def self.log_warning(message)
      print_arrow
      puts message.yellow + "\r"
    end
    
    def self.log_error(message)
      print_arrow
      puts message.red + "\r"
    end
    
    def self.print_arrow
      print $stdout.isatty ? "> ".white : ""
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vsclean-1.0.8 lib/console.rb
vsclean-1.0.6 lib/console.rb
vsclean-1.0.5 lib/console.rb
vsclean-1.0.4 lib/console.rb