Parent

Class/Module Index [+]

Quicksearch

Backup::Syncer::Base

Attributes

mirror[RW]

Flag for mirroring the files/directories

path[RW]

Path to store the synced files/directories to

Public Class Methods

new() click to toggle source
# File lib/backup/syncer/base.rb, line 16
def initialize
  load_defaults!

  @path               ||= 'backups'
  @mirror             ||= false
  @directories          = Array.new
end

Public Instance Methods

add(path) click to toggle source

Adds a path to the @directories array

# File lib/backup/syncer/base.rb, line 33
def add(path)
  @directories << path
end
directories(&block) click to toggle source

Syntactical suger for the DSL for adding directories

# File lib/backup/syncer/base.rb, line 26
def directories(&block)
  return @directories unless block_given?
  instance_eval(&block)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.