Class: ArchivedRemoteObject::Archive::RestoredObject
- Inherits:
-
Object
- Object
- ArchivedRemoteObject::Archive::RestoredObject
- Defined in:
- lib/archived_remote_object/archive/restored_object.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(key:, archived_object: Archive::ArchivedObject.new(key: key)) ⇒ RestoredObject
constructor
A new instance of RestoredObject.
Constructor Details
#initialize(key:, archived_object: Archive::ArchivedObject.new(key: key)) ⇒ RestoredObject
Returns a new instance of RestoredObject.
7 8 9 10 11 12 |
# File 'lib/archived_remote_object/archive/restored_object.rb', line 7 def initialize( key:, archived_object: Archive::ArchivedObject.new(key: key) ) self.archived_object = archived_object end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/archived_remote_object/archive/restored_object.rb', line 14 def call assign_attributes if attributes.status == :archived archived_object.restore attributes.status = :restoration_initiated end attributes end |