Sha256: 32903734ec157d4f518ba03d31e9553532f6618ab2d3b59863d275810dffd797

Contents?: true

Size: 508 Bytes

Versions: 16

Compression:

Stored size: 508 Bytes

Contents

require 'glimmer/dsl/xml/node_parent_expression'
require 'glimmer/dsl/expression'
require 'glimmer/xml/node'

module Glimmer
  module DSL
    module XML
      class XmlExpression < Expression
        include NodeParentExpression

        def can_interpret?(parent, keyword, *args, &block)
          parent.is_a?(Glimmer::XML::Node)
        end

        def interpret(parent, keyword, *args, &block)
          Glimmer::XML::Node.new(parent, keyword.to_s, args, &block)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
glimmer-dsl-xml-0.2.0 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-dsl-xml-0.1.0 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-dsl-css-0.1.0 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-0.8.2 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-0.8.1 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-0.8.0 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-0.7.8 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-0.7.7 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-0.7.6 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-0.7.5 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-0.7.4 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-0.7.3 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-0.7.2 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-0.7.1 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-0.7.0 lib/glimmer/dsl/xml/xml_expression.rb
glimmer-0.6.0 lib/glimmer/dsl/xml/xml_expression.rb