Class: R19Cov::Report::HTML::DetailPage

Inherits:
Object
  • Object
show all
Includes:
Page
Defined in:
lib/r19cov/report/html/detail_page.rb

Constant Summary

Constants included from Page

Page::MAX_FILENAME_SIZE, Page::PERCENTAGE_FORMAT_DIGIT, Page::PERCENTAGE_RATE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Page

#coverage_class, #filename_format, #generated_on, #get_binding, #html, #html_file, #html_path, #line_format, #output_dir, #percentage_bar, #percentage_format, #raw_options, #targets, #template

Constructor Details

#initialize(coverage, options) ⇒ DetailPage

Returns a new instance of DetailPage.



9
10
11
12
# File 'lib/r19cov/report/html/detail_page.rb', line 9

def initialize(coverage, options)
  @coverage = coverage
  @options = options
end

Instance Attribute Details

#coverageObject

Returns the value of attribute coverage.



14
15
16
# File 'lib/r19cov/report/html/detail_page.rb', line 14

def coverage
  @coverage
end

#optionsObject

Returns the value of attribute options.



14
15
16
# File 'lib/r19cov/report/html/detail_page.rb', line 14

def options
  @options
end

Instance Method Details

#outputObject



16
17
18
19
20
# File 'lib/r19cov/report/html/detail_page.rb', line 16

def output
  File.open(html_file(@coverage.filename), 'w') do |file|
    file.puts html('detail')
  end
end