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

- (RxhpHandler) initialize(path)

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

- (Object) render(controller)



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

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