Class/Module Index [+]

Quicksearch

Backup::Config

Constants

DEFAULTS

Attributes

cache_path[R]
config_file[R]
data_path[R]
log_path[R]
root_path[R]
tmp_path[R]
user[R]

Public Class Methods

load_config!() click to toggle source

Tries to find and load the configuration file

# File lib/backup/config.rb, line 29
def load_config!
  unless File.exist?(@config_file)
    raise Errors::Config::NotFoundError,
        "Could not find configuration file: '#{@config_file}'."
  end

  module_eval(File.read(@config_file), @config_file)
end
update(options = {}) click to toggle source

Setup required paths based on the given options

# File lib/backup/config.rb, line 18
def update(options = {})
  root_path = options[:root_path].to_s.strip
  new_root = root_path.empty? ? false : set_root_path(root_path)

  DEFAULTS.each do |name, ending|
    set_path_variable(name, options[name], ending, new_root)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.