Class: Glimmer::DSL::SWT::MenuExpression
- Inherits:
-
StaticExpression
- Object
- StaticExpression
- Glimmer::DSL::SWT::MenuExpression
- Includes:
- ParentExpression
- Defined in:
- lib/glimmer/dsl/swt/menu_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
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/glimmer/dsl/swt/menu_expression.rb', line 14 def can_interpret?(parent, keyword, *args, &block) initial_condition = (keyword == 'menu') if initial_condition if parent.respond_to?(:swt_widget) return true else raise Glimmer::Error, "menu may only be nested under a widget (like shell or another menu)!" end end false end |