Class: WorkOn::AbstractTerminal::Window

Inherits:
Object
  • Object
show all
Defined in:
lib/work_on/terminal.rb,
lib/work_on/terminal.rb

Overview

Below here, no more abstract methods #

Instance Method Summary collapse

Instance Method Details

#execute(cmd) ⇒ Object

executes @cmd in the selected tab



79
80
81
# File 'lib/work_on/terminal.rb', line 79

def execute(cmd)
  selected_tab.execute(cmd)
end

#new_tabObject

Create a new Tab and return the reference to it



24
25
26
# File 'lib/work_on/terminal.rb', line 24

def new_tab
  not_implemented
end

#selected?Boolean

is this window currently selected?

Returns:

  • (Boolean)


29
30
31
# File 'lib/work_on/terminal.rb', line 29

def selected?
  not_implemented
end

#selected_tabObject

returns the selected tab in this window NOTE: it is better to overwrite Terminal#selected_tab if you need the speed boost



35
36
37
# File 'lib/work_on/terminal.rb', line 35

def selected_tab
  tabs.find {|tab| tab.selected? }
end

#tabsObject

should return an Array of Tab objects



19
20
21
# File 'lib/work_on/terminal.rb', line 19

def tabs
  not_implemented
end