Class: Terminal::Window
- Inherits:
-
Object
- Object
- Terminal::Window
- Defined in:
- lib/terminal-multiplexer/window.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name = 'tab', command = 'zsh') ⇒ Window
constructor
Create a tmux window.
-
#plain ⇒ Object
Return the tmux string for the window.
Constructor Details
#initialize(name = 'tab', command = 'zsh') ⇒ Window
Create a tmux window
9 10 11 12 13 14 15 16 17 |
# File 'lib/terminal-multiplexer/window.rb', line 9 def initialize(name = 'tab', command = 'zsh') name = 'tab' if name == nil or name == '' command = 'zsh' if command == nil or command == '' @name = name @command = command @options = [] end |
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command.
3 4 5 |
# File 'lib/terminal-multiplexer/window.rb', line 3 def command @command end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/terminal-multiplexer/window.rb', line 3 def name @name end |
Instance Method Details
#plain ⇒ Object
Return the tmux string for the window
21 22 23 24 |
# File 'lib/terminal-multiplexer/window.rb', line 21 def plain @options.push "-n #{name}" "new-window #{@options.join(' ')} #{command}\\;" end |