Class: Coco::IndexContext

Inherits:
Object
  • Object
show all
Defined in:
lib/coco/formatter/context.rb

Overview

Contextual information for ERB template, representing index.html.

Instance Method Summary collapse

Constructor Details

#initialize(title, covered, uncovered) ⇒ IndexContext

Public: Initialize an IndexContext for the index file in the HTML report.

title - The String title for the report. covered - Array of subarrays. Each subarray is:

[
  Fixnum coverage percentage,
  String formatted filename (HTML ready),
  String real filename
]
FIXME Need a class to handle subarrays.

uncovered - Array of String filenames. The filenames are already

formatted, ready to be display in an HTML file.

43
44
45
46
47
# File 'lib/coco/formatter/context.rb', line 43

def initialize(title, covered, uncovered)
  @title = title
    @covered = covered
    @uncovered = uncovered
end

Instance Method Details

#get_bindingObject

Public: Get the object's binding.

Returns Binding.


52
53
54
# File 'lib/coco/formatter/context.rb', line 52

def get_binding
  binding
end