Class: SimpleBackup::Source::Dir
- Defined in:
- lib/simple_backup/source/dir.rb
Instance Method Summary collapse
- #configure(options = {}) ⇒ Object
-
#initialize ⇒ Dir
constructor
A new instance of Dir.
Methods inherited from Abstract
#backends=, #backup_file, #cleanup, #desc, #get, #keep_last, #keep_last=, #name, #name=, #supports, #tmp_base_path=, #type
Constructor Details
#initialize ⇒ Dir
4 5 6 |
# File 'lib/simple_backup/source/dir.rb', line 4 def initialize @strategy = :bare end |
Instance Method Details
#configure(options = {}) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/simple_backup/source/dir.rb', line 8 def configure( = {}) raise "Must provide :path parameter" unless [:path] @path = [:path] raise "#{@path} is a file - use File source instead of Dir" unless !::File.exist?(@path) or ::File.directory?(@path) @strategy = [:strategy] if [:strategy] end |