Sha256: 7203fffaf81d8debe73de795f2993119cf1aceaca963d6ec9d1a4f361ec0c0f4

Contents?: true

Size: 691 Bytes

Versions: 41

Compression:

Stored size: 691 Bytes

Contents

require 'glimmer/dsl/static_expression'
require 'glimmer/dsl/parent_expression'
require 'glimmer/dsl/top_level_expression'
require 'glimmer/swt/shell_proxy'

module Glimmer
  module DSL
    module SWT
      class ShellExpression < StaticExpression
        include TopLevelExpression
        include ParentExpression

        def can_interpret?(parent, keyword, *args, &block)
          keyword == 'shell' and
            (parent.nil? or parent.is_a?(Glimmer::SWT::ShellProxy))
        end
  
        def interpret(parent, keyword, *args, &block)
          args = [parent] + args unless parent.nil?
          Glimmer::SWT::ShellProxy.send(:new, *args)
        end
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
glimmer-dsl-swt-0.6.9 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.6.8 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.6.7 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.6.6 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.6.5 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.6.4 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.6.3 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.6.2 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.6.1 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.6.0 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.5.6 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.5.5 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.5.4 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.5.3 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.5.2 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.5.1 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.5.0 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.4.1 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.4.0 lib/glimmer/dsl/swt/shell_expression.rb
glimmer-dsl-swt-0.3.1 lib/glimmer/dsl/swt/shell_expression.rb