Class: Liquid::BlockBody

Inherits:
Object
  • Object
show all
Defined in:
lib/liquidum/liquid/liquid_template_extensions.rb

Instance Method Summary collapse

Instance Method Details

#parse(tokenizer, parse_context, &block) ⇒ Object



19
20
21
22
# File 'lib/liquidum/liquid/liquid_template_extensions.rb', line 19

def parse(tokenizer, parse_context, &block)
  @parse_context = parse_context
  parse_without_setting_parse_context(tokenizer, parse_context, &block)
end

#parse_without_setting_parse_contextObject



17
# File 'lib/liquidum/liquid/liquid_template_extensions.rb', line 17

alias parse_without_setting_parse_context parse

#registered_tagsObject



24
25
26
27
28
29
30
31
32
# File 'lib/liquidum/liquid/liquid_template_extensions.rb', line 24

def registered_tags
  allowed_tags = Template.tags.dup
  if @parse_context.block_tags.present?
    @parse_context.block_tags.each do |tag|
      allowed_tags.delete(tag)
    end
  end
  allowed_tags
end