class Lookbook::CustomTag
def initialize(tag_name, text = nil, *args)
def initialize(tag_name, text = nil, *args) tag_definition = Engine.tags.get_tag(tag_name) unless tag_definition raise ParserError.new "Unknown custom tag type '#{tag_name}'" end super(tag_name, text.to_s, *args) @custom_attributes = Store.new @arg_names = tag_definition.options.fetch(:named_args, []) @after_parse = tag_definition.options.fetch(:after_parse, nil) validate_arg_names @tag_args = parse_tag @after_parse.call(self) if @after_parse.respond_to?(:call) end