Class: Plushie::Selection::State
- Inherits:
-
Data
- Object
- Data
- Plushie::Selection::State
- Includes:
- Model::Extensions
- Defined in:
- lib/plushie/selection.rb
Overview
Immutable selection state.
Instance Attribute Summary collapse
-
#anchor ⇒ Object
readonly
Returns the value of attribute anchor.
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
-
#selected ⇒ Object
readonly
Returns the value of attribute selected.
Instance Method Summary collapse
-
#with(**changes) ⇒ Object
included
from Model::Extensions
private
Return a new instance with the given fields replaced.
Instance Attribute Details
#anchor ⇒ Object (readonly)
Returns the value of attribute anchor
22 23 24 |
# File 'lib/plushie/selection.rb', line 22 def anchor @anchor end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode
22 23 24 |
# File 'lib/plushie/selection.rb', line 22 def mode @mode end |
#order ⇒ Object (readonly)
Returns the value of attribute order
22 23 24 |
# File 'lib/plushie/selection.rb', line 22 def order @order end |
#selected ⇒ Object (readonly)
Returns the value of attribute selected
22 23 24 |
# File 'lib/plushie/selection.rb', line 22 def selected @selected 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)