Class: Glimmer::DSL::SWT::LayoutExpression
- Inherits:
-
Expression
- Object
- Expression
- Glimmer::DSL::SWT::LayoutExpression
- Includes:
- ParentExpression
- Defined in:
- lib/glimmer/dsl/swt/layout_expression.rb
Instance Method Summary collapse
- #can_interpret?(parent, keyword, *args, &block) ⇒ Boolean
- #interpret(parent, keyword, *args, &block) ⇒ Object
Instance Method Details
#can_interpret?(parent, keyword, *args, &block) ⇒ Boolean
37 38 39 40 41 42 |
# File 'lib/glimmer/dsl/swt/layout_expression.rb', line 37 def can_interpret?(parent, keyword, *args, &block) keyword.to_s.end_with?('_layout') and parent.respond_to?(:swt_widget) and parent..is_a?(Composite) and Glimmer::SWT::LayoutProxy.layout_exists?(keyword.to_s) end |
#interpret(parent, keyword, *args, &block) ⇒ Object
44 45 46 |
# File 'lib/glimmer/dsl/swt/layout_expression.rb', line 44 def interpret(parent, keyword, *args, &block) Glimmer::SWT::LayoutProxy.new(keyword, parent, args) end |