Class: Liquid::Echo

Inherits:
Tag
  • Object
show all
Defined in:
lib/liquid/tags/echo.rb

Defined Under Namespace

Classes: ParseTreeVisitor

Instance Attribute Summary collapse

Attributes inherited from Tag

#line_number, #nodelist, #parse_context, #tag_name

Instance Method Summary collapse

Methods inherited from Tag

#blank?, disable_tags, #name, parse, #parse, #raw, #render_to_output_buffer

Methods included from ParserSwitching

#parse_with_selected_parser, #strict_parse_with_error_mode_fallback

Constructor Details

#initialize(tag_name, markup, parse_context) ⇒ Echo

Returns a new instance of Echo.



24
25
26
27
# File 'lib/liquid/tags/echo.rb', line 24

def initialize(tag_name, markup, parse_context)
  super
  @variable = Variable.new(markup, parse_context)
end

Instance Attribute Details

#variableObject (readonly)

Returns the value of attribute variable.



22
23
24
# File 'lib/liquid/tags/echo.rb', line 22

def variable
  @variable
end

Instance Method Details

#render(context) ⇒ Object



29
30
31
# File 'lib/liquid/tags/echo.rb', line 29

def render(context)
  @variable.render_to_output_buffer(context, +'')
end