Class: Plushie::Undo::Entry
- Inherits:
-
Data
- Object
- Data
- Plushie::Undo::Entry
- Includes:
- Model::Extensions
- Defined in:
- lib/plushie/undo.rb
Overview
Immutable undo entry.
Instance Attribute Summary collapse
-
#apply_fn ⇒ Object
readonly
Returns the value of attribute apply_fn.
-
#coalesce ⇒ Object
readonly
Returns the value of attribute coalesce.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#undo_fn ⇒ Object
readonly
Returns the value of attribute undo_fn.
Instance Method Summary collapse
-
#with(**changes) ⇒ Object
included
from Model::Extensions
private
Return a new instance with the given fields replaced.
Instance Attribute Details
#apply_fn ⇒ Object (readonly)
Returns the value of attribute apply_fn
42 43 44 |
# File 'lib/plushie/undo.rb', line 42 def apply_fn @apply_fn end |
#coalesce ⇒ Object (readonly)
Returns the value of attribute coalesce
42 43 44 |
# File 'lib/plushie/undo.rb', line 42 def coalesce @coalesce end |
#label ⇒ Object (readonly)
Returns the value of attribute label
42 43 44 |
# File 'lib/plushie/undo.rb', line 42 def label @label end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp
42 43 44 |
# File 'lib/plushie/undo.rb', line 42 def @timestamp end |
#undo_fn ⇒ Object (readonly)
Returns the value of attribute undo_fn
42 43 44 |
# File 'lib/plushie/undo.rb', line 42 def undo_fn @undo_fn end |
Instance Method Details
#with(**changes) ⇒ Object Originally defined in module Model::Extensions
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return a new instance with the given fields replaced. Unspecified fields carry over from the current instance.
model.with(count: model.count + 1)