Method: Liquid::Case#initialize

Defined in:
lib/liquid/tags/case.rb

#initialize(tag_name, markup, options) ⇒ Case

Returns a new instance of Case.



31
32
33
34
35
36
37
38
39
40
# File 'lib/liquid/tags/case.rb', line 31

def initialize(tag_name, markup, options)
  super
  @blocks = []

  if markup =~ Syntax
    @left = parse_expression(Regexp.last_match(1))
  else
    raise SyntaxError, options[:locale].t("errors.syntax.case")
  end
end