Class: RCS::Backdoor::Sync

Inherits:
Object
  • Object
show all
Includes:
Tracer
Defined in:
lib/rcs-backdoor/sync.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(protocol, backdoor) ⇒ Sync

Returns a new instance of Sync.



19
20
21
22
# File 'lib/rcs-backdoor/sync.rb', line 19

def initialize(protocol, backdoor)
  @protocol = Protocol.new(protocol, self)  
  @backdoor = backdoor
end

Instance Attribute Details

#backdoorObject

Returns the value of attribute backdoor.



17
18
19
# File 'lib/rcs-backdoor/sync.rb', line 17

def backdoor
  @backdoor
end

Instance Method Details

#perform(host) ⇒ Object

for now the sync is a mere wrapper to protocol in the future it could contain other actions



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/rcs-backdoor/sync.rb', line 26

def perform(host)
  trace :info, "Synching with " << host
  
  # setup the parameters
  @protocol.sync = self
  
  # execute the sync protocol
  @protocol.perform host
  
  trace :info, "Sync ended"
end