Class: Props::Handler
- Inherits:
-
Object
- Object
- Props::Handler
- Defined in:
- lib/props_template/handler.rb
Class Method Summary collapse
Class Method Details
.call(template, source = nil) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/props_template/handler.rb', line 8 def self.call(template, source = nil) source ||= template.source # this juggling is required to keep line numbers right in the error %{ __finalize = @__json.nil?; @__json ||= Props::Template.new(self); json = @__json; #{source}; if __finalize; result = json.result!; @__json = nil; result; end } end |