Class: Plushie::Selection::State

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

Overview

Immutable selection state.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#anchorObject (readonly)

Returns the value of attribute anchor

Returns:

  • (Object)

    the current value of anchor



22
23
24
# File 'lib/plushie/selection.rb', line 22

def anchor
  @anchor
end

#modeObject (readonly)

Returns the value of attribute mode

Returns:

  • (Object)

    the current value of mode



22
23
24
# File 'lib/plushie/selection.rb', line 22

def mode
  @mode
end

#orderObject (readonly)

Returns the value of attribute order

Returns:

  • (Object)

    the current value of order



22
23
24
# File 'lib/plushie/selection.rb', line 22

def order
  @order
end

#selectedObject (readonly)

Returns the value of attribute selected

Returns:

  • (Object)

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