Module: Fate::Formatter
- Defined in:
- lib/fate/formatter.rb
Instance Method Summary collapse
Instance Method Details
#colorize(name, string) ⇒ Object
13 14 15 |
# File 'lib/fate/formatter.rb', line 13 def colorize(name, string) [Term::ANSIColor.send(name), string, Term::ANSIColor.reset].join end |
#format_line(identifier, line) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/fate/formatter.rb', line 4 def format_line(identifier, line) if identifier == @last_identifier "%-#{@command_width}s - %s" % [nil, line] else @last_identifier = identifier "%-#{@command_width}s - %s" % [identifier, line] end end |