Class: Glimmer::DSL::Swing::OperationExpression

Inherits:
Expression
  • Object
show all
Defined in:
lib/glimmer/dsl/swing/operation_expression.rb

Instance Method Summary collapse

Instance Method Details

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

Returns:

  • (Boolean)


30
31
32
33
34
35
36
37
# File 'lib/glimmer/dsl/swing/operation_expression.rb', line 30

def can_interpret?(parent, keyword, *args, &block)
  (
    parent.is_a?(Glimmer::Swing::ComponentProxy) or
    parent.is_a?(Glimmer::Swing::ShapeProxy)
  ) and
    block.nil? and
    parent.respond_to?(keyword, *args)
end

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



39
40
41
# File 'lib/glimmer/dsl/swing/operation_expression.rb', line 39

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