class Arrays::HashCreateTag
Public Instance Methods
parse(tokens)
click to toggle source
Calls superclass method
# File lib/liquid-arrays/hash_create_tag.rb, line 5 def parse(tokens) super catch do parser = AttributeParser.new(@parse_context, 'hash', @markup) @hash_name = parser.consume_required_attribute('hash', :id) @entries = parser.consume_attribute('entries', :hash) parser.finish end end
render(context)
click to toggle source
# File lib/liquid-arrays/hash_create_tag.rb, line 15 def render(context) context.scopes.last[@hash_name] = @entries.nil? ? {} : @entries.render(context) '' end