Class: Backup::Syncer::RSync::Local
- Defined in:
- lib/backup/syncer/rsync/local.rb
Constant Summary
Constants included from CLI::Helpers
Instance Attribute Summary
Attributes inherited from Base
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(&block) ⇒ Local
constructor
Instantiates a new RSync::Local Syncer.
-
#perform! ⇒ Object
Performs the RSync::Local operation debug options: -vhP.
Methods inherited from Base
Methods included from Configuration::Helpers
Constructor Details
#initialize(&block) ⇒ Local
Instantiates a new RSync::Local Syncer.
Pre-configured defaults specified in Configuration::Syncer::RSync::Local are set via a super() call to RSync::Base, which in turn will invoke Syncer::Base.
Once pre-configured defaults and RSync specific defaults are set, the block from the user’s configuration file is evaluated.
18 19 20 21 22 |
# File 'lib/backup/syncer/rsync/local.rb', line 18 def initialize(&block) super instance_eval(&block) if block_given? end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Backup::Configuration::Helpers
Instance Method Details
#perform! ⇒ Object
Performs the RSync::Local operation debug options: -vhP
27 28 29 30 31 32 33 34 |
# File 'lib/backup/syncer/rsync/local.rb', line 27 def perform! Logger.( "#{ syncer_name } started syncing the following directories:\n\s\s" + @directories.join("\n\s\s") ) run("#{ utility(:rsync) } #{ } " + "#{ directories_option } '#{ dest_path }'") end |