Class: Zonesync::Sync
- Inherits:
-
Struct
- Object
- Struct
- Zonesync::Sync
- Defined in:
- lib/zonesync.rb
Instance Attribute Summary collapse
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
Instance Attribute Details
#destination ⇒ Object
Returns the value of attribute destination
32 33 34 |
# File 'lib/zonesync.rb', line 32 def destination @destination end |
#source ⇒ Object
Returns the value of attribute source
32 33 34 |
# File 'lib/zonesync.rb', line 32 def source @source end |
Instance Method Details
#call(dry_run: false) ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/zonesync.rb', line 33 def call dry_run: false source = Provider.from(self.source) destination = Provider.from(self.destination) operations = Diff.call(from: destination, to: source) operations.each do |method, args| Logger.log(method, args, dry_run: dry_run) destination.send(method, *args) unless dry_run end end |