Class: Glimmer::DSL::Tk::AttributeExpression

Inherits:
Expression
  • Object
show all
Defined in:
lib/glimmer/dsl/tk/attribute_expression.rb

Instance Method Summary collapse

Instance Method Details

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

Returns:

  • (Boolean)


28
29
30
31
32
33
34
# File 'lib/glimmer/dsl/tk/attribute_expression.rb', line 28

def can_interpret?(parent, keyword, *args, &block)
  block.nil? and
    args.size > 0 and
    parent.respond_to?(:set_attribute) and
    parent.respond_to?(:has_attribute?) and
    parent.has_attribute?(keyword, *args)
end

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



36
37
38
39
# File 'lib/glimmer/dsl/tk/attribute_expression.rb', line 36

def interpret(parent, keyword, *args, &block)
  parent.set_attribute(keyword, *args)
  nil
end