Class: Sidewalk::TemplateHandlers::RxhpHandler

Inherits:
Base
  • Object
show all
Defined in:
lib/sidewalk/template_handlers/rxhp_handler.rb

Defined Under Namespace

Classes: Delegate

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ RxhpHandler

Returns a new instance of RxhpHandler.



10
11
12
13
# File 'lib/sidewalk/template_handlers/rxhp_handler.rb', line 10

def initialize path
  @path = path
  @template = File.read(path)
end

Instance Method Details

#render(controller) ⇒ Object



15
16
17
# File 'lib/sidewalk/template_handlers/rxhp_handler.rb', line 15

def render controller
  Delegate.new(@path, @template, controller).render
end