Class: Glimmer::DSL::SWT::CdtExpression

Inherits:
StaticExpression
  • Object
show all
Defined in:
lib/glimmer-cw-cdatetime-nebula/ext/glimmer/dsl/swt/cdt_expression.rb

Overview

Extends Glimmer DSL to easily build CDT constant values with ‘cdt(arg)`

Named CdtExpression (not CDTExpression) 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)


12
13
14
15
# File 'lib/glimmer-cw-cdatetime-nebula/ext/glimmer/dsl/swt/cdt_expression.rb', line 12

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

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



17
18
19
# File 'lib/glimmer-cw-cdatetime-nebula/ext/glimmer/dsl/swt/cdt_expression.rb', line 17

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