Class: Teaspoon::Formatter::RspecHtml::Template
- Inherits:
-
Object
- Object
- Teaspoon::Formatter::RspecHtml::Template
- Includes:
- ERB::Util
- Defined in:
- lib/teaspoon/formatter/rspec_html.rb
Instance Method Summary collapse
-
#initialize(contents) ⇒ Template
constructor
A new instance of Template.
- #render(obj) ⇒ Object
Constructor Details
#initialize(contents) ⇒ Template
Returns a new instance of Template.
61 62 63 |
# File 'lib/teaspoon/formatter/rspec_html.rb', line 61 def initialize(contents) @template = contents end |
Instance Method Details
#render(obj) ⇒ Object
65 66 67 68 |
# File 'lib/teaspoon/formatter/rspec_html.rb', line 65 def render(obj) @o = obj ERB.new(@template).result binding end |