Class: Backup::Syncer::Base

Inherits:
Object
  • Object
show all
Includes:
CLI::Helpers, Configuration::Helpers
Defined in:
lib/backup/syncer/base.rb

Direct Known Subclasses

Cloud, RSync::Base

Constant Summary

Constants included from CLI::Helpers

CLI::Helpers::UTILITY

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Configuration::Helpers

#clear_defaults!, #load_defaults!

Methods included from CLI::Helpers

#command_name, #raise_if_command_failed!, #run, #utility

Instance Attribute Details

#directories(&block) ⇒ Object

Syntactical suger for the DSL for adding directories



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

def directories
  @directories
end

#mirrorObject

Flag for mirroring the files/directories



19
20
21
# File 'lib/backup/syncer/base.rb', line 19

def mirror
  @mirror
end

#pathObject

Path to store the synced files/directories to



15
16
17
# File 'lib/backup/syncer/base.rb', line 15

def path
  @path
end

Instance Method Details

#add(path) ⇒ Object

Adds a path to the @directories array



30
31
32
# File 'lib/backup/syncer/base.rb', line 30

def add(path)
  @directories << path
end