Class: WorkOn::AbstractTerminal
- Inherits:
-
Object
- Object
- WorkOn::AbstractTerminal
- Includes:
- Singleton
- Defined in:
- lib/work_on/terminal.rb
Overview
Base class for Terminals only tabs allow for command execution So the idea is that you only call execute on a tab
This means that every window should have at least 1 tab (even though it will not be visible gui-wise)
Direct Known Subclasses
Defined Under Namespace
Instance Method Summary collapse
- #execute(cmd) ⇒ Object
- #new_window ⇒ Object
-
#selected_tab ⇒ Object
it is possible to overwrite this method if you feel the speed boost is necessary.
-
#selected_window ⇒ Object
it is possible to overwrite this method if you feel the speed boost is necessary.
- #windows ⇒ Object
Instance Method Details
#execute(cmd) ⇒ Object
85 86 87 |
# File 'lib/work_on/terminal.rb', line 85 def execute(cmd) selected_tab.execute(cmd) end |
#new_window ⇒ Object
54 55 56 |
# File 'lib/work_on/terminal.rb', line 54 def new_window not_implemented end |
#selected_tab ⇒ Object
it is possible to overwrite this method if you feel the speed boost is necessary
68 69 70 |
# File 'lib/work_on/terminal.rb', line 68 def selected_tab selected_window.selected_tab end |
#selected_window ⇒ Object
it is possible to overwrite this method if you feel the speed boost is necessary
63 64 65 |
# File 'lib/work_on/terminal.rb', line 63 def selected_window windows.find {|w| w.selected?} end |
#windows ⇒ Object
58 59 60 |
# File 'lib/work_on/terminal.rb', line 58 def windows not_implemented end |