Class: VagrantPlugins::VagrantDummyCommunicator::Communicator
- Inherits:
-
Object
- Object
- VagrantPlugins::VagrantDummyCommunicator::Communicator
- Defined in:
- lib/communicator.rb
Instance Method Summary collapse
- #execute(command, opts = nil) ⇒ Object
-
#initialize(machine) ⇒ Communicator
constructor
A new instance of Communicator.
- #ready? ⇒ Boolean
- #sudo(command, opts = nil) ⇒ Object
- #test(command, opts = nil) ⇒ Object
- #wait_for_ready(duration) ⇒ Object
Constructor Details
#initialize(machine) ⇒ Communicator
Returns a new instance of Communicator.
5 6 7 |
# File 'lib/communicator.rb', line 5 def initialize(machine) @env = machine.env end |
Instance Method Details
#execute(command, opts = nil) ⇒ Object
19 20 21 |
# File 'lib/communicator.rb', line 19 def execute(command, opts=nil) 0 end |
#ready? ⇒ Boolean
9 10 11 12 |
# File 'lib/communicator.rb', line 9 def ready? sleep 2 true end |
#sudo(command, opts = nil) ⇒ Object
23 24 25 |
# File 'lib/communicator.rb', line 23 def sudo(command, opts=nil) execute(command, opts) end |
#test(command, opts = nil) ⇒ Object
27 28 29 |
# File 'lib/communicator.rb', line 27 def test(command, opts=nil) execute(command, opts) end |
#wait_for_ready(duration) ⇒ Object
14 15 16 17 |
# File 'lib/communicator.rb', line 14 def wait_for_ready(duration) sleep 2 return true end |