Class: WorkOn::MacTerminal::MacTab
- Inherits:
-
Tab
- Object
- Tab
- WorkOn::MacTerminal::MacTab
- Defined in:
- lib/work_on/terminals/mac_terminal.rb
Instance Method Summary collapse
- #execute(cmd) ⇒ Object
-
#initialize(terminal, appscript) ⇒ MacTab
constructor
A new instance of MacTab.
- #selected? ⇒ Boolean
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
42 43 44 |
# File 'lib/work_on/terminals/mac_terminal.rb', line 42 def selected? @appscript.selected.get end |