Class: Glimmer::DSL::XML::XmlNodeExpression

Inherits:
Expression
  • Object
show all
Includes:
NodeParentExpression
Defined in:
lib/glimmer/dsl/xml/xml_node_expression.rb

Instance Method Summary collapse

Methods included from NodeParentExpression

#add_content

Instance Method Details

#can_interpret?(parent, keyword, *args, &block) ⇒ Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/glimmer/dsl/xml/xml_node_expression.rb', line 32

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

#interpret(parent, keyword, *args, &block) ⇒ Object



36
37
38
# File 'lib/glimmer/dsl/xml/xml_node_expression.rb', line 36

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