Class: Glimmer::DSL::Libui::ControlExpression
- Inherits:
-
Expression
- Object
- Expression
- Glimmer::DSL::Libui::ControlExpression
- Includes:
- ParentExpression
- Defined in:
- lib/glimmer/dsl/libui/control_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
40 41 42 43 44 45 |
# File 'lib/glimmer/dsl/libui/control_expression.rb', line 40 def add_content(parent, keyword, *args, &block) = args.last.is_a?(Hash) ? args.last : {} [:post_add_content] = true if !.include?(:post_add_content) super parent&.post_add_content if [:post_add_content] end |
#can_interpret?(parent, keyword, *args, &block) ⇒ Boolean
31 32 33 |
# File 'lib/glimmer/dsl/libui/control_expression.rb', line 31 def can_interpret?(parent, keyword, *args, &block) Glimmer::LibUI::ControlProxy.exists?(keyword) end |
#interpret(parent, keyword, *args, &block) ⇒ Object
35 36 37 38 |
# File 'lib/glimmer/dsl/libui/control_expression.rb', line 35 def interpret(parent, keyword, *args, &block) keyword = Glimmer::LibUI::ControlProxy::KEYWORD_ALIASES[keyword] || keyword Glimmer::LibUI::ControlProxy.create(keyword, parent, args, &block) end |