Class: Document
- Inherits:
-
Object
- Object
- Document
- Defined in:
- lib/rcov/formatters/base_formatter.rb
Instance Method Summary collapse
-
#initialize(template) ⇒ Document
constructor
A new instance of Document.
- #interpolate(replacements = {}) ⇒ Object
Constructor Details
#initialize(template) ⇒ Document
Returns a new instance of Document.
12 13 14 |
# File 'lib/rcov/formatters/base_formatter.rb', line 12 def initialize(template) @template = ERB.new(template) end |
Instance Method Details
#interpolate(replacements = {}) ⇒ Object
16 17 18 |
# File 'lib/rcov/formatters/base_formatter.rb', line 16 def interpolate(replacements = {}) @template.result(replacements.to_binding) end |