Method: Backup::Storage::Base#initialize
- Defined in:
- lib/backup/storage/base.rb
#initialize(model, storage_id = nil, &block) ⇒ Base
storage_id is a user-defined string used to uniquely identify multiple storages of the same type. If multiple storages of the same type are added to a single backup model, this identifier must be set. This will be appended to the YAML storage file used for cycling backups.
34 35 36 37 38 39 40 41 |
# File 'lib/backup/storage/base.rb', line 34 def initialize(model, storage_id = nil, &block) @model = model @package = model.package @storage_id = storage_id.to_s.gsub(/\W/, '_') if storage_id load_defaults! instance_eval(&block) if block_given? end |