Module: Focus::Formatter
- Defined in:
- lib/focus/formatter.rb
Class Method Summary collapse
- .blue(string) ⇒ Object
- .error(error) ⇒ Object
- .ok ⇒ Object
- .pastel ⇒ Object
- .red(string) ⇒ Object
- .step(step) ⇒ Object
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 |
.ok ⇒ Object
23 24 25 |
# File 'lib/focus/formatter.rb', line 23 def ok " " + Paint["OK", :green] end |
.pastel ⇒ Object
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 |