Module: Log

Defined in:
lib/log.rb

Overview

Sends a message to the terminal

Class Method Summary collapse

Class Method Details

.error(text) ⇒ Object

Sends a decorated message to standard error



11
12
13
# File 'lib/log.rb', line 11

def self.error(text)
  warn "ERR: \e[0;31m#{text}\e[0m"
end

.info(text) ⇒ Object

Sends a decorated message to standard output in blue



16
17
18
# File 'lib/log.rb', line 16

def self.info(text)
  $stdout.puts "INFO: \e[0m#{text}\e[0m"
end

.success(text) ⇒ Object

Sends a decorated message to standard output in red



6
7
8
# File 'lib/log.rb', line 6

def self.success(text)
  $stdout.puts "SUCCESS: \e[0;32m#{text}\e[0m"
end