Class: Ronin::PostEx::CLI::ShellShell
- Inherits:
-
Core::CLI::Shell
- Object
- Core::CLI::Shell
- Ronin::PostEx::CLI::ShellShell
- Defined in:
- lib/ronin/post_ex/cli/shell_shell.rb
Overview
A shell for System::Shell.
Instance Method Summary collapse
-
#exec(command) ⇒ Object
Executes a command and prints it's output.
-
#initialize(shell, **kwargs) ⇒ ShellShell
constructor
Initializes the shell.
Constructor Details
#initialize(shell, **kwargs) ⇒ ShellShell
Initializes the shell.
43 44 45 46 47 |
# File 'lib/ronin/post_ex/cli/shell_shell.rb', line 43 def initialize(shell, **kwargs) super(**kwargs) @shell = shell end |
Instance Method Details
#exec(command) ⇒ Object
Executes a command and prints it's output.
55 56 57 58 59 60 61 |
# File 'lib/ronin/post_ex/cli/shell_shell.rb', line 55 def exec(command) if command == 'exit' exit else puts @shell.run(command) end end |