Class: Glimmer::DSL::Opal::MenuExpression
- Inherits:
-
StaticExpression
- Object
- StaticExpression
- Glimmer::DSL::Opal::MenuExpression
- Includes:
- ParentExpression
- Defined in:
- lib/glimmer/dsl/opal/menu_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
50 51 52 53 |
# File 'lib/glimmer/dsl/opal/menu_expression.rb', line 50 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 40 41 42 43 44 |
# File 'lib/glimmer/dsl/opal/menu_expression.rb', line 34 def can_interpret?(parent, keyword, *args, &block) initial_condition = (keyword == 'menu') if initial_condition if parent.is_a?(Glimmer::SWT::WidgetProxy) return true else raise Glimmer::Error, "menu may only be nested under a widget (like shell or another menu)!" end end false end |