Class: Nova::Remote::Fake::Commands Abstract
- Inherits:
-
Object
- Object
- Nova::Remote::Fake::Commands
- Defined in:
- lib/nova/remote/fake/commands.rb
Overview
This class is abstract.
Manages running commands.
Instance Method Summary collapse
-
#command_exists?(command) ⇒ Boolean
abstract
Checks to see if the command exists.
-
#line(command, arguments = "", options = {}) ⇒ Command::Runner
abstract
Creates a CommandLine with its default runner.
Instance Method Details
#command_exists?(command) ⇒ Boolean
This method is abstract.
Note:
Does nothing. Always returns false since this is the fake remote.
Checks to see if the command exists.
37 38 39 |
# File 'lib/nova/remote/fake/commands.rb', line 37 def command_exists?(command) false end |
#line(command, arguments = "", options = {}) ⇒ Command::Runner
This method is abstract.
Note:
Does nothing. Since we’re a fake remote, we’ll overwrite the backend with a fake one.
Creates a CommandLine with its default runner.
22 23 24 25 26 27 |
# File 'lib/nova/remote/fake/commands.rb', line 22 def line(command, arguments = "", = {}) .merge! :logger => Nova.logger c = Command::Runner.new(command, arguments, ) c.backend = Command::Runner::Backends::Fake.new c end |