class Tilt::YajlTemplate
def decorate(json)
options - The option Hash to customize the behavior.
json - The json String to decorate.
Decorates the +json+ input according to given +options+.
def decorate(json) callback, variable = options[:callback], options[:variable] if callback && variable "var #{variable} = #{json}; #{callback}(#{variable});" elsif variable "var #{variable} = #{json};" elsif callback "#{callback}(#{json});" else json end end