Class: Pansophy::Synchronizer
- Inherits:
-
Object
- Object
- Pansophy::Synchronizer
- Defined in:
- lib/pansophy/synchronizer.rb
Instance Method Summary collapse
-
#initialize(bucket_name, remote_directory, local_directory) ⇒ Synchronizer
constructor
A new instance of Synchronizer.
- #merge(options = {}) ⇒ Object
- #pull(options = {}) ⇒ Object
- #push(options = {}) ⇒ Object
Constructor Details
#initialize(bucket_name, remote_directory, local_directory) ⇒ Synchronizer
Returns a new instance of Synchronizer.
3 4 5 6 |
# File 'lib/pansophy/synchronizer.rb', line 3 def initialize(bucket_name, remote_directory, local_directory) @remote_dir = Remote::Directory.new(bucket_name, remote_directory) @local_dir = Local::Directory.new(local_directory) end |
Instance Method Details
#merge(options = {}) ⇒ Object
16 17 18 |
# File 'lib/pansophy/synchronizer.rb', line 16 def merge( = {}) synchronize(@remote_dir, @local_dir, .merge(merge: true)) end |
#pull(options = {}) ⇒ Object
8 9 10 |
# File 'lib/pansophy/synchronizer.rb', line 8 def pull( = {}) synchronize(@remote_dir, @local_dir, ) end |
#push(options = {}) ⇒ Object
12 13 14 |
# File 'lib/pansophy/synchronizer.rb', line 12 def push( = {}) synchronize(@local_dir, @remote_dir, ) end |