Class: Glimmer::DSL::XML::PExpression

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

Instance Method Summary collapse

Methods included from NodeParentExpression

#add_content

Instance Method Details

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

Returns:

  • (Boolean)


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

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

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



40
41
42
# File 'lib/glimmer/dsl/xml/p_expression.rb', line 40

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