class Liquid::Echo

@liquid_public_docs @liquid_type tag @liquid_category syntax @liquid_name echo @liquid_summary

Outputs an expression.

@liquid_description

Using the `echo` tag is the same as wrapping an expression in curly brackets (`{{` and `}}`). However, unlike the curly
bracket method, you can use the `echo` tag inside [`liquid` tags](/docs/api/liquid/tags/liquid).

> Tip:
> You can use [filters](/docs/api/liquid/filters) on expressions inside `echo` tags.

@liquid_syntax

{% liquid
  echo expression
%}

@liquid_syntax_keyword expression The expression to be output.

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 24
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 29
def render(context)
  @variable.render_to_output_buffer(context, +'')
end