Class: WorkOn::MacTerminal::MacTab

Inherits:
Tab
  • Object
show all
Defined in:
lib/work_on/terminals/mac_terminal.rb

Instance Method Summary collapse

Constructor Details

#initialize(terminal, appscript) ⇒ MacTab

Returns a new instance of MacTab.



37
38
39
40
# File 'lib/work_on/terminals/mac_terminal.rb', line 37

def initialize(terminal, appscript)
  @terminal = terminal
  @appscript = appscript
end

Instance Method Details

#execute(cmd) ⇒ Object



46
47
48
# File 'lib/work_on/terminals/mac_terminal.rb', line 46

def execute(cmd)
  Appscript.app("Terminal.app").do_script(cmd, :in => @appscript)
end

#selected?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/work_on/terminals/mac_terminal.rb', line 42

def selected?
  @appscript.selected.get
end