Class: Vop::Shell
- Inherits:
-
Object
- Object
- Vop::Shell
- Defined in:
- lib/vop/shell.rb
Constant Summary collapse
- USAGE =
<<DOCOPT virtualop Usage: vop [options] Options: -h --help show this help screen -v --verbose enable debug output -e --execute=<command> to run a command directly DOCOPT
Instance Attribute Summary collapse
-
#op ⇒ Object
readonly
Returns the value of attribute op.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
- #execute(string) ⇒ Object
-
#initialize(vop = nil, options = {}) ⇒ Shell
constructor
A new instance of Shell.
- #run_cli ⇒ Object
Constructor Details
Instance Attribute Details
#op ⇒ Object (readonly)
Returns the value of attribute op.
26 27 28 |
# File 'lib/vop/shell.rb', line 26 def op @op end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
25 26 27 |
# File 'lib/vop/shell.rb', line 25 def @options end |
Class Method Details
Instance Method Details
#execute(string) ⇒ Object
36 37 38 |
# File 'lib/vop/shell.rb', line 36 def execute(string) @base_shell.backend.process_input(string) end |
#run_cli ⇒ Object
40 41 42 |
# File 'lib/vop/shell.rb', line 40 def run_cli @base_shell.run end |