Class: Fronde::Sync::Rsync
- Inherits:
-
Object
- Object
- Fronde::Sync::Rsync
- Defined in:
- lib/fronde/sync/rsync.rb
Overview
Everything needed to push or pull data with rsync
Instance Method Summary collapse
-
#initialize(remote_path, local_path, verbose: false) ⇒ Rsync
constructor
A new instance of Rsync.
- #pull(test: false) ⇒ Object
- #push(test: false) ⇒ Object
Constructor Details
#initialize(remote_path, local_path, verbose: false) ⇒ Rsync
Returns a new instance of Rsync.
9 10 11 12 13 |
# File 'lib/fronde/sync/rsync.rb', line 9 def initialize(remote_path, local_path, verbose: false) @verbose = verbose @remote_path = remote_path @local_path = "#{local_path}/" end |
Instance Method Details
#pull(test: false) ⇒ Object
15 16 17 |
# File 'lib/fronde/sync/rsync.rb', line 15 def pull(test: false) run command(test:) + [@remote_path, @local_path] end |
#push(test: false) ⇒ Object
19 20 21 |
# File 'lib/fronde/sync/rsync.rb', line 19 def push(test: false) run command(test:) + [@local_path, @remote_path] end |