class SimpleCov::Sublime::OutputMessage
Generates a nicely formatted string about generated coverage
@author Mikael Henriksson <mikael@mhenrixon.se>
Attributes
output_filepath[R]
result[R]
Public Class Methods
new(result, output_filepath)
click to toggle source
Initialize a new OutputMessage
@param [SimplCov::Result] result the final simplecov result @param [String] output_filepath
path to the filename
# File lib/simple_cov/sublime/output_message.rb, line 17 def initialize(result, output_filepath) @result = result @output_filepath = output_filepath end
Public Instance Methods
to_s()
click to toggle source
Returns a nicely formatted string about the generated coverage data
@return [String]
# File lib/simple_cov/sublime/output_message.rb, line 28 def to_s 'Coverage report generated' \ " for #{command_name}" \ " to #{output_filepath}." \ " #{covered_lines} / #{total_lines} LOC (#{covered_percent.round(2)}%) covered." end
Also aliased as: inspect
Private Instance Methods
command_name()
click to toggle source
# File lib/simple_cov/sublime/output_message.rb, line 40 def command_name result.command_name end
covered_lines()
click to toggle source
# File lib/simple_cov/sublime/output_message.rb, line 44 def covered_lines result.total_lines end
covered_percent()
click to toggle source
# File lib/simple_cov/sublime/output_message.rb, line 52 def covered_percent result.covered_percent end
total_lines()
click to toggle source
# File lib/simple_cov/sublime/output_message.rb, line 48 def total_lines result.total_lines end