Class: Swagcov::Formatter::Console
- Inherits:
-
Object
- Object
- Swagcov::Formatter::Console
- Defined in:
- lib/swagcov/formatter/console.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(data: ::Swagcov::Coverage.new.collect) ⇒ Console
constructor
A new instance of Console.
- #run ⇒ Object
Constructor Details
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
6 7 8 |
# File 'lib/swagcov/formatter/console.rb', line 6 def data @data end |
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/swagcov/formatter/console.rb', line 12 def run min_path_width routes_output(data[:covered], "green") routes_output(data[:ignored], "yellow") routes_output(data[:uncovered], "red") final_output data[:uncovered_count].zero? ? ::Swagcov::STATUS_SUCCESS : ::Swagcov::STATUS_OFFENSES end |