Class: Arbre::Rails::TemplateHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/arbre/rails/template_handler.rb

Instance Method Summary collapse

Instance Method Details

#call(template, source = nil) ⇒ Object


4
5
6
7
8
9
10
11
12
# File 'lib/arbre/rails/template_handler.rb', line 4

def call(template, source = nil)
  source = template.source unless source

  <<-END
  Arbre::Context.new(assigns, self) {
    #{source}
  }.to_s
  END
end