Class: VagrantPlugins::VagrantDummyCommunicator::Communicator

Inherits:
Object
  • Object
show all
Defined in:
lib/communicator.rb

Instance Method Summary collapse

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

Returns:

  • (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