Class: Glimmer::DSL::XML::XmlExpression

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

Constant Summary

Constants included from Glimmer

REGEX_METHODS_EXCLUDED

Instance Method Summary collapse

Methods included from NodeParentExpression

#add_content

Methods included from Glimmer

included, #method_missing

Methods included from ParentExpression

#add_content

Methods inherited from Expression

#add_content, dsl, #textual?, #widget?

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Glimmer

Instance Method Details

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

Returns:

  • (Boolean)


11
12
13
# File 'lib/glimmer/dsl/xml/xml_expression.rb', line 11

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

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



15
16
17
# File 'lib/glimmer/dsl/xml/xml_expression.rb', line 15

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