Class: RosettAi::Backup::UnsupportedDestination

Inherits:
Destination
  • Object
show all
Defined in:
lib/rosett_ai/backup/destination.rb

Overview

Placeholder for unsupported destination schemes

Constant Summary

Constants inherited from Destination

Destination::SUPPORTED_SCHEMES

Instance Attribute Summary collapse

Attributes inherited from Destination

#uri

Instance Method Summary collapse

Methods inherited from Destination

for, parse_scheme

Constructor Details

#initialize(scheme, path) ⇒ UnsupportedDestination

Returns a new instance of UnsupportedDestination.



80
81
82
83
# File 'lib/rosett_ai/backup/destination.rb', line 80

def initialize(scheme, path)
  super("#{scheme}://#{path}")
  @scheme = scheme
end

Instance Attribute Details

#schemeObject (readonly)

Returns the value of attribute scheme.



78
79
80
# File 'lib/rosett_ai/backup/destination.rb', line 78

def scheme
  @scheme
end

Instance Method Details

#write(_archive_path) ⇒ Object



85
86
87
88
# File 'lib/rosett_ai/backup/destination.rb', line 85

def write(_archive_path)
  raise RosettAi::BackupError,
        "Destination scheme '#{@scheme}' is not yet supported. Supported: file://"
end