Class: Glimmer::DSL::SWT::SwtExpression

Inherits:
Glimmer::DSL::StaticExpression show all
Defined in:
lib/glimmer/dsl/swt/swt_expression.rb

Overview

Responsible for returning SWT constant values

Named SwtExpression (not SWTExpression) so that the DSL engine discovers quickly by convention

Instance Method Summary collapse

Methods inherited from Glimmer::DSL::StaticExpression

inherited, keyword

Methods inherited from Expression

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

Instance Method Details

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

Returns:

  • (Boolean)


14
15
16
17
# File 'lib/glimmer/dsl/swt/swt_expression.rb', line 14

def can_interpret?(parent, keyword, *args, &block)
  block.nil? &&
    args.size > 0
end

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



19
20
21
# File 'lib/glimmer/dsl/swt/swt_expression.rb', line 19

def interpret(parent, keyword, *args, &block)
  Glimmer::SWT::SWTProxy[*args]
end