Class: Wordmove::Logger

Inherits:
Logger
  • Object
show all
Defined in:
lib/wordmove/logger.rb

Constant Summary collapse

MAX_LINE =
70

Instance Method Summary collapse

Instance Method Details

#debug(message) ⇒ Object



25
26
27
# File 'lib/wordmove/logger.rb', line 25

def debug(message)
  puts "    debug".magenta + " | ".black + message.to_s
end

#error(message) ⇒ Object



21
22
23
# File 'lib/wordmove/logger.rb', line 21

def error(message)
  puts "    error".red + " | ".black + message.to_s
end

#task(title) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/wordmove/logger.rb', line 5

def task(title)
  prefix = "" * 2
  title = "#{title} "
  padding = "" * padding_length(title)

  puts "\n" + prefix + title.green + padding
end

#task_step(local_step, title) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/wordmove/logger.rb', line 13

def task_step(local_step, title)
  if local_step
    puts "    local".cyan + " | ".black + title.to_s
  else
    puts "   remote".yellow + " | ".black + title.to_s
  end
end