Module: Focus::Formatter

Defined in:
lib/focus/formatter.rb

Class Method Summary collapse

Class Method Details

.blue(string) ⇒ Object



15
16
17
# File 'lib/focus/formatter.rb', line 15

def blue(string)
  Paint[string, :blue]
end

.error(error) ⇒ Object



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

def error(error)
  " " + red("!!! Error:") + " #{error}"
end

.okObject



23
24
25
# File 'lib/focus/formatter.rb', line 23

def ok
  " " + Paint["OK", :green]
end

.pastelObject



27
28
29
# File 'lib/focus/formatter.rb', line 27

def pastel
  @pastel ||= Pastel.new
end

.red(string) ⇒ Object



19
20
21
# File 'lib/focus/formatter.rb', line 19

def red(string)
  Paint[string, :red, :bright]
end

.step(step) ⇒ Object



7
8
9
# File 'lib/focus/formatter.rb', line 7

def step(step)
  blue("==>") + " #{step}"
end