Class: DataMapper::Resource::State::Deleted
Overview
a persisted/deleted resource
Instance Attribute Summary
#resource
Instance Method Summary
collapse
Methods inherited from Persisted
#get
#get, #initialize, #rollback
Methods included from Equalizer
#equalize
Instance Method Details
#commit ⇒ Object
15
16
17
18
19
|
# File 'lib/dm-core/resource/state/deleted.rb', line 15
def commit
delete_resource
remove_from_identity_map
Immutable.new(resource)
end
|
#delete ⇒ Object
11
12
13
|
# File 'lib/dm-core/resource/state/deleted.rb', line 11
def delete
self
end
|
#set(subject, value) ⇒ Object
7
8
9
|
# File 'lib/dm-core/resource/state/deleted.rb', line 7
def set(subject, value)
raise ImmutableDeletedError, 'Deleted resource cannot be modified'
end
|