Class: SimpleBackup::Source::File

Inherits:
Abstract
  • Object
show all
Defined in:
lib/simple_backup/source/file.rb

Instance Method Summary collapse

Methods inherited from Abstract

#backends=, #backup_file, #cleanup, #desc, #get, #keep_last, #keep_last=, #name, #name=, #supports, #tmp_base_path=, #type

Instance Method Details

#configure(options = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/simple_backup/source/file.rb', line 4

def configure(options = {})
  raise "Must provide :path parameter" unless options[:path]
  @path = options[:path]

  raise "#{@path} is a directory - use Dir source instead of File" unless !::File.exist?(@path) or ::File.file?(@path)
end