Method: Liquid::Variable#render
- Defined in:
- lib/liquid/variable.rb
#render(context) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/liquid/variable.rb', line 38 def render(context) return '' if @name.nil? @filters.inject(context[@name]) do |output, filter| filterargs = filter[1].to_a.collect do |a| context[a] end begin context.invoke(filter[0], output, *filterargs) rescue FilterNotFound raise FilterNotFound, "Error - filter '#{filter[0]}' in '#{@markup.strip}' could not be found." end end end |