Class: Glimmer::DSL::Opal::SwtExpression

Inherits:
StaticExpression
  • Object
show all
Defined in:
lib/glimmer/dsl/opal/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

Instance Method Details

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

Returns:

  • (Boolean)


35
36
37
38
# File 'lib/glimmer/dsl/opal/swt_expression.rb', line 35

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

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



40
41
42
# File 'lib/glimmer/dsl/opal/swt_expression.rb', line 40

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