Class: Spoom::Coverage::Template
- Inherits:
-
Object
- Object
- Spoom::Coverage::Template
- Extended by:
- T::Helpers, T::Sig
- Defined in:
- lib/spoom/coverage/report.rb
Direct Known Subclasses
Instance Method Summary collapse
- #erb ⇒ Object
-
#get_binding ⇒ Object
rubocop:disable Naming/AccessorMethodName.
- #html ⇒ Object
-
#initialize(template:) ⇒ Template
constructor
A new instance of Template.
Constructor Details
#initialize(template:) ⇒ Template
Returns a new instance of Template.
18 19 20 |
# File 'lib/spoom/coverage/report.rb', line 18 def initialize(template:) @template = template end |
Instance Method Details
#erb ⇒ Object
23 24 25 |
# File 'lib/spoom/coverage/report.rb', line 23 def erb File.read(@template) end |
#get_binding ⇒ Object
rubocop:disable Naming/AccessorMethodName
33 34 35 |
# File 'lib/spoom/coverage/report.rb', line 33 def get_binding # rubocop:disable Naming/AccessorMethodName binding end |
#html ⇒ Object
28 29 30 |
# File 'lib/spoom/coverage/report.rb', line 28 def html ERB.new(erb).result(get_binding) end |