class RhetButler::Web::AssetsApp::AssetsContext

Public Class Methods

new(template_handler) click to toggle source
# File lib/rhet-butler/web/assets-app.rb, line 11
def initialize(template_handler)
  @template_handler = template_handler
end

Public Instance Methods

render(path, locals = nil) click to toggle source
# File lib/rhet-butler/web/assets-app.rb, line 15
def render(path, locals = nil)
  template = @template_handler.find(path).contents
  if template.respond_to? :render
    template.render(self, locals)
  else
    template
  end
end