Class: SimpleCov::Formatter::ShadowbqBadgeFormatter
- Inherits:
-
Object
- Object
- SimpleCov::Formatter::ShadowbqBadgeFormatter
- Defined in:
- lib/shadowbq-simplecov-badge/version.rb,
lib/shadowbq-simplecov-badge/formatter.rb
Constant Summary collapse
- VERSION =
"2.0.4"
Instance Method Summary collapse
- #format(result) ⇒ Object
-
#initialize(output = nil) ⇒ ShadowbqBadgeFormatter
constructor
A new instance of ShadowbqBadgeFormatter.
Constructor Details
#initialize(output = nil) ⇒ ShadowbqBadgeFormatter
Returns a new instance of ShadowbqBadgeFormatter.
24 25 26 |
# File 'lib/shadowbq-simplecov-badge/formatter.rb', line 24 def initialize(output = nil) @output = output || STDOUT end |
Instance Method Details
#format(result) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/shadowbq-simplecov-badge/formatter.rb', line 28 def format(result) begin check_imagemagick generate_header_badge(result) generate_group_badges(result) if @@generate_groups if @@timestamp @output.puts (result) rescue ImageMagickError => e @output.puts e. @output.puts "Simplecov-Badge was unable to generate a badge for #{result.command_name}." end end |