Exception: DataMapper::Lock::StaleRecordError
- Inherits:
-
StandardError
- Object
- StandardError
- DataMapper::Lock::StaleRecordError
- Defined in:
- lib/dm-lock/exceptions.rb
Instance Attribute Summary collapse
-
#current_record ⇒ Object
readonly
Record as-is current in the database.
-
#stale_record ⇒ Object
readonly
Stale record attempted to be destroyed or saved.
Instance Method Summary collapse
-
#initialize(stale, latest) ⇒ StaleRecordError
constructor
Initialize with stale and latest records.
Constructor Details
#initialize(stale, latest) ⇒ StaleRecordError
Initialize with stale and latest records.
19 20 21 22 |
# File 'lib/dm-lock/exceptions.rb', line 19 def initialize stale, latest @stale_record, @current_record = stale, latest super 'record has been altered' end |
Instance Attribute Details
#current_record ⇒ Object (readonly)
Record as-is current in the database.
9 10 11 |
# File 'lib/dm-lock/exceptions.rb', line 9 def current_record @current_record end |
#stale_record ⇒ Object (readonly)
Stale record attempted to be destroyed or saved.
14 15 16 |
# File 'lib/dm-lock/exceptions.rb', line 14 def stale_record @stale_record end |