Class: Petra::Components::Entries::AttributeChangeVeto

Inherits:
LogEntry
  • Object
show all
Defined in:
lib/petra/components/entries/attribute_change_veto.rb

Overview

Tells the system to ignore all attribute changes we made to the current attribute during the transaction.

Instance Attribute Summary

Attributes inherited from LogEntry

#attribute, #object_class, #object_persisted, #persist_on_retry, #section, #transaction_persisted

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from LogEntry

#<=>, #attribute_change?, #attribute_read?, #enqueue_for_persisting!, #for_object?, from_hash, #initialize, #kind?, #load_proxy, log!, #mark_as_object_persisted!, #mark_as_persisted!, #marked_for_destruction?, #object_initialization?, #object_persistence?, #to_h, #to_s, #undo!

Methods included from Util::FieldAccessors

#[], #[]=, #fields, included

Methods included from Util::Registrable

included

Constructor Details

This class inherits a constructor from Petra::Components::LogEntry

Class Method Details

.kindObject



15
16
17
# File 'lib/petra/components/entries/attribute_change_veto.rb', line 15

def self.kind
  :attribute_change_veto
end

Instance Method Details

#apply!Object



31
# File 'lib/petra/components/entries/attribute_change_veto.rb', line 31

def apply!; end

#persist?Boolean

As for ReadIntegrityOverrides, we have to make sure that AttributeChangeVetoes are always persisted.

Returns:

  • (Boolean)


23
24
25
# File 'lib/petra/components/entries/attribute_change_veto.rb', line 23

def persist?
  true
end

#persist_on_retry?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/petra/components/entries/attribute_change_veto.rb', line 27

def persist_on_retry?
  true
end