Class: Clerq::Services::RenderErb
- Defined in:
- lib/clerq/services/render_erb.rb
Overview
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(erb:, object:) ⇒ RenderErb
constructor
A new instance of RenderErb.
Methods inherited from Service
Constructor Details
#initialize(erb:, object:) ⇒ RenderErb
Returns a new instance of RenderErb.
22 23 24 25 |
# File 'lib/clerq/services/render_erb.rb', line 22 def initialize(erb: , object: ) @erb = erb @object = object end |
Instance Method Details
#call ⇒ Object
17 18 19 20 |
# File 'lib/clerq/services/render_erb.rb', line 17 def call tt = ERB.new(@erb, nil, "-") tt.result(binding) end |