Class: Glimmer::DSL::SWT::BlockPropertyExpression

Inherits:
Expression
  • Object
show all
Defined in:
lib/glimmer/dsl/swt/block_property_expression.rb

Instance Method Summary collapse

Instance Method Details

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

Returns:

  • (Boolean)


28
29
30
31
32
# File 'lib/glimmer/dsl/swt/block_property_expression.rb', line 28

def can_interpret?(parent, keyword, *args, &block)
  block_given? and
    args.size == 0 and
    parent.respond_to?("#{keyword}_block=")
end

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



34
35
36
37
# File 'lib/glimmer/dsl/swt/block_property_expression.rb', line 34

def interpret(parent, keyword, *args, &block)
  parent.send("#{keyword}_block=", block)
  nil
end