Class: Coco::Context

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

Overview

Contextual information for ERB template, representing each covered files.

Instance Method Summary collapse

Constructor Details

#initialize(filename, lines) ⇒ Context

Public: Initialize a Context for a covered file shown in the HTML report.

filename - A String name of the source file. lines - An Array of lines.



13
14
15
16
# File 'lib/coco/formatter/context.rb', line 13

def initialize(filename, lines)
	@filename = filename
    @lines = lines
end

Instance Method Details

#get_bindingObject

Public: Get the object's binding.

Returns Binding.



21
22
23
# File 'lib/coco/formatter/context.rb', line 21

def get_binding
	binding
end