Class: Rdm::Support::Render

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/rdm/support/render.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.render(template, locals) ⇒ Object



8
9
10
# File 'lib/rdm/support/render.rb', line 8

def self.render(template, locals)
  new(locals).render(template)
end

Instance Method Details

#render(template) ⇒ Object



12
13
14
# File 'lib/rdm/support/render.rb', line 12

def render(template)
  ERB.new(template).result(binding)
end