Class: XbuilderHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/xbuilder_template.rb

Class Method Summary collapse

Class Method Details

.call(template) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/xbuilder_template.rb', line 36

def self.call(template)
  %[
    if defined?(xml)
      #{template.source}
    else
      XbuilderTemplate.encode(self) do |xml|
        #{template.source}
      end
    end
  ]
end