Class: Glimmer::DSL::Opal::ShapeExpression
- Inherits:
-
Expression
- Object
- Expression
- Glimmer::DSL::Opal::ShapeExpression
- Includes:
- ParentExpression
- Defined in:
- lib/glimmer/dsl/opal/shape_expression.rb
Instance Method Summary collapse
- #add_content(parent, keyword, *args, &block) ⇒ Object
- #can_interpret?(parent, keyword, *args, &block) ⇒ Boolean
- #interpret(parent, keyword, *args, &block) ⇒ Object
Instance Method Details
#add_content(parent, keyword, *args, &block) ⇒ Object
45 46 47 48 |
# File 'lib/glimmer/dsl/opal/shape_expression.rb', line 45 def add_content(parent, keyword, *args, &block) super(parent, keyword, *args, &block) parent.post_add_content end |
#can_interpret?(parent, keyword, *args, &block) ⇒ Boolean
34 35 36 37 38 39 |
# File 'lib/glimmer/dsl/opal/shape_expression.rb', line 34 def can_interpret?(parent, keyword, *args, &block) # TODO consider parent as WidgetProxy too just like SWT (parent.is_a?(Glimmer::SWT::CanvasProxy) or parent.is_a?(Glimmer::SWT::Custom::Shape)) and Glimmer::SWT::Custom::Shape.valid?(parent, keyword, args, &block) and ((keyword != 'text' && keyword != 'image') || args.size >= 3 || (args.empty? && block_given?)) end |