Sha256: 02c3cbc5e3d3d76ff3866bc3748bf784308b116409744e84f5d2965f5720e3d7

Contents?: true

Size: 650 Bytes

Versions: 7

Compression:

Stored size: 650 Bytes

Contents

require 'glimmer/dsl/static_expression'
require 'glimmer-cw-cdatetime-nebula/ext/glimmer/swt/cdt_proxy'

module Glimmer
  module DSL
    module SWT
      # 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
      class CdtExpression < StaticExpression
        def can_interpret?(parent, keyword, *args, &block)
          block.nil? &&
            args.size > 0
        end
  
        def interpret(parent, keyword, *args, &block)
          Glimmer::SWT::CDTProxy[*args]
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
glimmer-cw-cdatetime-nebula-1.5.0.3.0 lib/glimmer-cw-cdatetime-nebula/ext/glimmer/dsl/swt/cdt_expression.rb
glimmer-cw-cdatetime-nebula-1.5.0.2.0 lib/glimmer-cw-cdatetime-nebula/ext/glimmer/dsl/swt/cdt_expression.rb
glimmer-cw-cdatetime-nebula-1.5.0.1.0 lib/glimmer-cw-cdatetime-nebula/ext/glimmer/dsl/swt/cdt_expression.rb
glimmer-cw-cdatetime-nebula-1.5.0.0.1 lib/glimmer-cw-cdatetime-nebula/ext/glimmer/dsl/swt/cdt_expression.rb
glimmer-cw-cdatetime-nebula-1.5.0.0.0 lib/glimmer-cw-cdatetime-nebula/ext/glimmer/dsl/swt/cdt_expression.rb
glimmer-cw-cdatetime-nebula-1.4.0.2.1 lib/glimmer-cw-cdatetime-nebula/ext/glimmer/dsl/swt/cdt_expression.rb
glimmer-cw-cdatetime-nebula-1.4.0.2.0 lib/glimmer-cw-cdatetime-nebula/ext/glimmer/dsl/swt/cdt_expression.rb