Class: Threeman::Frontends::Tmux
- Inherits:
-
Threeman::Frontend
- Object
- Threeman::Frontend
- Threeman::Frontends::Tmux
- Defined in:
- lib/threeman/frontends/tmux.rb
Instance Attribute Summary collapse
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Attributes inherited from Threeman::Frontend
Instance Method Summary collapse
-
#initialize(options) ⇒ Tmux
constructor
A new instance of Tmux.
- #run_commands(commands) ⇒ Object
Methods inherited from Threeman::Frontend
#bash_script, #paned_command_names, #sort_commands
Constructor Details
#initialize(options) ⇒ Tmux
Returns a new instance of Tmux.
8 9 10 11 |
# File 'lib/threeman/frontends/tmux.rb', line 8 def initialize() @session = "threeman_#{Time.now.to_i}" super end |
Instance Attribute Details
#session ⇒ Object (readonly)
Returns the value of attribute session.
6 7 8 |
# File 'lib/threeman/frontends/tmux.rb', line 6 def session @session end |
Instance Method Details
#run_commands(commands) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/threeman/frontends/tmux.rb', line 13 def run_commands(commands) sort_commands(commands).each_with_index do |command, index| run_command(command, index) end system "tmux attach-session -t #{session}" end |