Class: Backup::Syncer::RSync::Base

Inherits:
Base
  • Object
show all
Defined in:
lib/backup/syncer/rsync/base.rb

Direct Known Subclasses

Local, Push

Instance Attribute Summary collapse

Attributes inherited from Base

#excludes, #mirror, #path, #syncer_id

Instance Method Summary collapse

Methods inherited from Base

#add, #directories, #exclude

Methods included from Config::Helpers

included

Constructor Details

#initialize(syncer_id = nil, &block) ⇒ Base

Returns a new instance of Base.



13
14
15
16
17
18
19
# File 'lib/backup/syncer/rsync/base.rb', line 13

def initialize(syncer_id = nil, &block)
  super
  instance_eval(&block) if block_given?

  @path ||= '~/backups'
  @archive = @archive.nil? ? true : @archive
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Backup::Config::Helpers

Instance Attribute Details

#additional_rsync_optionsObject

Additional String or Array of options for the rsync cli



10
11
12
# File 'lib/backup/syncer/rsync/base.rb', line 10

def additional_rsync_options
  @additional_rsync_options
end

#archiveObject

Returns the value of attribute archive.



11
12
13
# File 'lib/backup/syncer/rsync/base.rb', line 11

def archive
  @archive
end