Class: Plushie::State::Container
- Inherits:
-
Data
- Object
- Data
- Plushie::State::Container
- Includes:
- Model::Extensions
- Defined in:
- lib/plushie/state.rb
Overview
Immutable state container.
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#revision ⇒ Object
readonly
Returns the value of attribute revision.
-
#transaction ⇒ Object
readonly
Returns the value of attribute transaction.
Instance Method Summary collapse
-
#with(**changes) ⇒ Object
included
from Model::Extensions
private
Return a new instance with the given fields replaced.
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data
25 26 27 |
# File 'lib/plushie/state.rb', line 25 def data @data end |
#revision ⇒ Object (readonly)
Returns the value of attribute revision
25 26 27 |
# File 'lib/plushie/state.rb', line 25 def revision @revision end |
#transaction ⇒ Object (readonly)
Returns the value of attribute transaction
25 26 27 |
# File 'lib/plushie/state.rb', line 25 def transaction @transaction 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)