Class: R19Cov::Report::HTML::IndexPage

Inherits:
Object
  • Object
show all
Includes:
Page
Defined in:
lib/r19cov/report/html/index_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(summary, options) ⇒ IndexPage

Returns a new instance of IndexPage.



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

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

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

#summaryObject (readonly)

Returns the value of attribute summary.



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

def summary
  @summary
end

Instance Method Details

#outputObject



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

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