Module: Rango::RenderMixin

Extended by:
RenderMixin
Included in:
ExplicitRendering, GV::Scaffolding, ImplicitRendering, MiniRender, RenderMixin
Defined in:
lib/rango/mixins/render.rb

Instance Method Summary collapse

Instance Method Details

#render(path, scope = Object.new, context = Hash.new) ⇒ Object

Since:

  • 0.0.2



11
12
13
14
15
16
# File 'lib/rango/mixins/render.rb', line 11

def render(path, scope = Object.new, context = Hash.new)
  scope, context = Object.new, scope if context.empty? && scope.is_a?(Hash)
  #Rango.logger.inspect(context: context)
  template = Rango::Template.new(path, scope)
  return template.render(context)
end