Class: TXPRails::TXPTemplateHandler

Inherits:
Object
  • Object
show all
Includes:
TXP
Defined in:
lib/txprails/template.rb

Instance Method Summary collapse

Methods included from TXP

#method_missing, #txp_content, #txp_controller, #txp_doc, #txp_eval, #txp_include

Constructor Details

#initialize(view) ⇒ TXPTemplateHandler

Returns a new instance of TXPTemplateHandler.



10
11
12
13
# File 'lib/txprails/template.rb', line 10

def initialize(view)
  @view = view
  @_current_models = []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TXP

Instance Method Details

#compilable?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/txprails/template.rb', line 19

def compilable?
  false
end

#render(template, local_assigns = {}) ⇒ Object



15
16
17
# File 'lib/txprails/template.rb', line 15

def render(template, local_assigns = {})
  parse(template.source)
end