class Liquid::Echo
Echo
outputs an expression
{% echo monkey %} {% echo user.name %}
This is identical to variable output syntax, like {{ foo }}, but works inside {% liquid %} tags. The full syntax is supported, including filters:
{% echo user | link %}
Attributes
variable[R]
Public Class Methods
new(tag_name, markup, parse_context)
click to toggle source
Calls superclass method
Liquid::Tag::new
# File lib/liquid/tags/echo.rb, line 17 def initialize(tag_name, markup, parse_context) super @variable = Variable.new(markup, parse_context) end
Public Instance Methods
render(context)
click to toggle source
# File lib/liquid/tags/echo.rb, line 22 def render(context) @variable.render_to_output_buffer(context, +'') end