# lib/rails_tmux/pane_manager.rb module Junction class PaneManager def initialize @panes = {} end def create_pane(name, command = "bash") @panes[name] = Session.new(name, command) end def list_panes @panes.keys end def write_to_pane(name, input) @panes[name]&.write(input) end def read_from_pane(name) @panes[name]&.read end def close_pane(name) @panes[name]&.close @panes.delete(name) end end end