Class: Plushie::Undo::Entry

Inherits:
Data
  • Object
show all
Includes:
Model::Extensions
Defined in:
lib/plushie/undo.rb

Overview

Immutable undo entry.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#apply_fnObject (readonly)

Returns the value of attribute apply_fn

Returns:

  • (Object)

    the current value of apply_fn



42
43
44
# File 'lib/plushie/undo.rb', line 42

def apply_fn
  @apply_fn
end

#coalesceObject (readonly)

Returns the value of attribute coalesce

Returns:

  • (Object)

    the current value of coalesce



42
43
44
# File 'lib/plushie/undo.rb', line 42

def coalesce
  @coalesce
end

#labelObject (readonly)

Returns the value of attribute label

Returns:

  • (Object)

    the current value of label



42
43
44
# File 'lib/plushie/undo.rb', line 42

def label
  @label
end

#timestampObject (readonly)

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of timestamp



42
43
44
# File 'lib/plushie/undo.rb', line 42

def timestamp
  @timestamp
end

#undo_fnObject (readonly)

Returns the value of attribute undo_fn

Returns:

  • (Object)

    the current value of 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)