Class: Coco::IndexContext
- Inherits:
-
Object
- Object
- Coco::IndexContext
- Defined in:
- lib/coco/formatter/index_context.rb
Overview
Contextual information for ERB template, representing index.html.
Instance Method Summary collapse
-
#initialize(title, all, uncovered, summary, threshold) ⇒ IndexContext
constructor
Public: Initialize an IndexContext for the index file in the HTML report.
-
#variables ⇒ Object
Public: Get the object’s binding.
Constructor Details
#initialize(title, all, uncovered, summary, threshold) ⇒ IndexContext
Public: Initialize an IndexContext for the index file in the HTML report.
title - The String title for the report. all - Array of subarrays. Each subarray is:
[
Fixnum coverage percentage,
String formatted filename (HTML ready),
String real filename
]
uncovered - Array of String filenames. The filenames are already
formatted, ready to be display in an HTML file.
summary - A Summary object. threshold - Fixnum.
22 23 24 25 26 27 |
# File 'lib/coco/formatter/index_context.rb', line 22 def initialize(title, all, uncovered, summary, threshold) @title = title @covered, @greens = all.partition { |file| file.first < threshold } @uncovered = uncovered @summary = summary end |
Instance Method Details
#variables ⇒ Object
Public: Get the object’s binding.
Returns Binding.
33 34 35 |
# File 'lib/coco/formatter/index_context.rb', line 33 def variables binding end |