Class: FlakyTestTracker::Rendering
- Inherits:
-
Object
- Object
- FlakyTestTracker::Rendering
- Defined in:
- lib/flaky_test_tracker/rendering.rb
Overview
ERB template rendering.
Instance Attribute Summary collapse
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(template:) ⇒ Rendering
constructor
A new instance of Rendering.
-
#output(**locals) ⇒ Object
Create a ERB template from #template and return the result bind with the locales.
Constructor Details
#initialize(template:) ⇒ Rendering
Returns a new instance of Rendering.
10 11 12 |
# File 'lib/flaky_test_tracker/rendering.rb', line 10 def initialize(template:) @template = template end |
Instance Attribute Details
#template ⇒ Object (readonly)
Returns the value of attribute template.
8 9 10 |
# File 'lib/flaky_test_tracker/rendering.rb', line 8 def template @template end |
Instance Method Details
#output(**locals) ⇒ Object
Create a ERB template from #template and return the result bind with the locales.
17 18 19 |
# File 'lib/flaky_test_tracker/rendering.rb', line 17 def output(**locals) ERB.new(template).result_with_hash(locals) end |