Class: TabKeeper::LoginShell
- Inherits:
-
Object
- Object
- TabKeeper::LoginShell
- Defined in:
- lib/tab_keeper/login_shell.rb
Instance Method Summary collapse
-
#initialize(previous, job: nil, code_directory: nil, **_options) ⇒ LoginShell
constructor
A new instance of LoginShell.
- #to_s ⇒ Object
Constructor Details
#initialize(previous, job: nil, code_directory: nil, **_options) ⇒ LoginShell
Returns a new instance of LoginShell.
3 4 5 6 7 8 |
# File 'lib/tab_keeper/login_shell.rb', line 3 def initialize(previous, job: nil, code_directory: nil, **) @command = previous || job @code_directory = code_directory return if code_directory raise ArgumentError, "code `directory` must be configured for LoginShell" end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/tab_keeper/login_shell.rb', line 10 def to_s "/bin/bash -l -c 'cd #{escaped_path} && #{escaped_command}'" end |