Class: Valkyrie::Persistence::DeleteTrackingBuffer::Persister

Inherits:
Memory::Persister show all
Defined in:
lib/valkyrie/persistence/delete_tracking_buffer.rb

Instance Attribute Summary collapse

Attributes inherited from Memory::Persister

#adapter

Instance Method Summary collapse

Methods inherited from Memory::Persister

#save, #save_all, #valid_for_save?, #wipe!

Constructor Details

#initialize(*args) ⇒ Persister

Returns a new instance of Persister.



18
19
20
21
# File 'lib/valkyrie/persistence/delete_tracking_buffer.rb', line 18

def initialize(*args)
  @deletes = []
  super
end

Instance Attribute Details

#deletesObject (readonly)

Returns the value of attribute deletes.



17
18
19
# File 'lib/valkyrie/persistence/delete_tracking_buffer.rb', line 17

def deletes
  @deletes
end

Instance Method Details

#delete(resource:) ⇒ Object



23
24
25
26
# File 'lib/valkyrie/persistence/delete_tracking_buffer.rb', line 23

def delete(resource:)
  @deletes << resource
  super
end