Class: Markaby::ActionViewTemplateHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/gems/markaby-0.5/lib/markaby/rails.rb

Instance Method Summary collapse

Constructor Details

#initialize(action_view) ⇒ ActionViewTemplateHandler

Returns a new instance of ActionViewTemplateHandler.



15
16
17
# File 'lib/gems/markaby-0.5/lib/markaby/rails.rb', line 15

def initialize(action_view)
  @action_view = action_view
end

Instance Method Details

#render(template, local_assigns = {}) ⇒ Object



18
19
20
# File 'lib/gems/markaby-0.5/lib/markaby/rails.rb', line 18

def render(template, local_assigns = {})
  Template.new(template).render(@action_view.assigns.merge(local_assigns), @action_view)
end