Sha256: 83a635b8f68b06125c97cfa9224ec420ed0424c608b51b4dd9f7f9e9548de920
Contents?: true
Size: 867 Bytes
Versions: 16
Compression:
Stored size: 867 Bytes
Contents
require 'glimmer/dsl/xml/node_parent_expression' require 'glimmer/dsl/xml/xml_expression' require 'glimmer/dsl/static_expression' require 'glimmer/dsl/top_level_expression' require 'glimmer/xml/node' module Glimmer module DSL module XML class TagExpression < StaticExpression include TopLevelExpression include NodeParentExpression def can_interpret?(parent, keyword, *args, &block) (parent == nil or parent.is_a?(Glimmer::XML::Node)) and (keyword.to_s == "tag") and args[0].include?(:_name) end def interpret(parent, keyword, *args, &block) attributes = args[0] if (args.size == 1) tag_name = attributes[:_name] attributes.delete(:_name) Glimmer::XML::Node.new(parent, tag_name, attributes, &block) end end end end end
Version data entries
16 entries across 16 versions & 3 rubygems