Sha256: eb3458d1577cdbef1acfe36158a8020cd7a4ea2d20896b69645660172d7881d7
Contents?: true
Size: 914 Bytes
Versions: 7
Compression:
Stored size: 914 Bytes
Contents
# encoding: utf-8 module Backup module Syncer class Base include Backup::CLI::Helpers include Backup::Configuration::Helpers ## # Path to store the synced files/directories to attr_accessor :path ## # Flag for mirroring the files/directories attr_accessor :mirror def initialize load_defaults! @path ||= 'backups' @mirror ||= false @directories = Array.new end ## # Syntactical suger for the DSL for adding directories def directories(&block) return @directories unless block_given? instance_eval(&block) end ## # Adds a path to the @directories array def add(path) @directories << path end private def syncer_name self.class.to_s.sub('Backup::', '') end end end end
Version data entries
7 entries across 7 versions & 3 rubygems