Class: GitMulticast::OutputFormatter
- Inherits:
-
Object
- Object
- GitMulticast::OutputFormatter
- Defined in:
- lib/git_multicast/output_formatter.rb
Instance Method Summary collapse
-
#initialize(start_time = nil) ⇒ OutputFormatter
constructor
A new instance of OutputFormatter.
- #single_format(task_result) ⇒ Object
Constructor Details
#initialize(start_time = nil) ⇒ OutputFormatter
5 6 7 |
# File 'lib/git_multicast/output_formatter.rb', line 5 def initialize(start_time = nil) @start_time = start_time end |
Instance Method Details
#single_format(task_result) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/git_multicast/output_formatter.rb', line 9 def single_format(task_result) case task_result.exit_status when 0 '[Success]'.green + " #{task_result.name} #{time_report}" else "\#{'[Error]'.red} \#{task_result.name}\n\#{task_result.result}\n\#{'-' * 25}\n" end end |