Class: TabItemCommandHandler
- Inherits:
-
Object
- Object
- TabItemCommandHandler
- Includes:
- CommandHandler, Glimmer
- Defined in:
- lib/command_handlers/tab_item_command_handler.rb
Instance Method Summary collapse
- #can_handle?(parent, command_symbol, *args, &block) ⇒ Boolean
- #do_handle(parent, command_symbol, *args, &block) ⇒ Object
Methods included from Glimmer
#add_contents, add_contents, dsl, #dsl, extended, included, logger, #method_missing, method_missing
Methods included from SwtPackages
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Glimmer
Instance Method Details
#can_handle?(parent, command_symbol, *args, &block) ⇒ Boolean
9 10 11 12 |
# File 'lib/command_handlers/tab_item_command_handler.rb', line 9 def can_handle?(parent, command_symbol, *args, &block) parent.is_a?(RWidget) and command_symbol.to_s == "tab_item" end |
#do_handle(parent, command_symbol, *args, &block) ⇒ Object
14 15 16 17 |
# File 'lib/command_handlers/tab_item_command_handler.rb', line 14 def do_handle(parent, command_symbol, *args, &block) tab_item = RWidget.new(command_symbol.to_s, parent., args) RTabItemComposite.new(tab_item, parent., args) end |