Class: Tmuxall::Layouts::Base
- Inherits:
-
Object
- Object
- Tmuxall::Layouts::Base
- Defined in:
- lib/tmuxall/layouts/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(commands, options) ⇒ Base
constructor
A new instance of Base.
- #run ⇒ Object
Constructor Details
#initialize(commands, options) ⇒ Base
Returns a new instance of Base.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/tmuxall/layouts/base.rb', line 5 def initialize(commands, ) @commands = Array(commands) if @commands.empty? raise ArgumentError, "No commands to run" end @options = @panes_count = @commands.size end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 |
# File 'lib/tmuxall/layouts/base.rb', line 16 def run ensure_tmux create_window create_panes run_commands_in_panes end |