Class: PigCI::Decorator::ReportTerminalDecorator
- Inherits:
-
PigCI::Decorator
- Object
- PigCI::Decorator
- PigCI::Decorator::ReportTerminalDecorator
- Defined in:
- lib/pig_ci/decorator/report_terminal_decorator.rb
Instance Attribute Summary
Attributes inherited from PigCI::Decorator
Instance Method Summary collapse
Methods inherited from PigCI::Decorator
Constructor Details
This class inherits a constructor from PigCI::Decorator
Instance Method Details
#max_change_percentage ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/pig_ci/decorator/report_terminal_decorator.rb', line 10 def max_change_percentage if @object[:max_change_percentage].start_with?("-") ColorizedString[@object[:max_change_percentage]].colorize(:green) elsif @object[:max_change_percentage].start_with?("0.0") @object[:max_change_percentage] else ColorizedString[@object[:max_change_percentage]].colorize(:red) end end |