Class: Glimmer::DSL::SWT::ShapeExpression

Inherits:
Expression
  • Object
show all
Includes:
ParentExpression
Defined in:
lib/glimmer/dsl/swt/shape_expression.rb

Instance Method Summary collapse

Instance Method Details

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



43
44
45
46
# File 'lib/glimmer/dsl/swt/shape_expression.rb', line 43

def add_content(parent, keyword, *args, &block)
  super
  parent.post_add_content
end

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

Returns:

  • (Boolean)


34
35
36
37
# File 'lib/glimmer/dsl/swt/shape_expression.rb', line 34

def can_interpret?(parent, keyword, *args, &block)
  (parent.is_a?(Glimmer::SWT::Custom::Drawable) or parent.is_a?(Glimmer::SWT::Custom::Shape)) and
    Glimmer::SWT::Custom::Shape.valid?(parent, keyword, *args, &block)
end

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



39
40
41
# File 'lib/glimmer/dsl/swt/shape_expression.rb', line 39

def interpret(parent, keyword, *args, &block)
  Glimmer::SWT::Custom::Shape.create(parent, keyword, *args, &block)
end