Class: Plushie::Selection::State

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

Overview

Immutable selection state.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeState

Returns a new instance of State.

Parameters:

  • mode: (Symbol)
  • selected: (Set[untyped])
  • anchor: (Object)
  • order: (Array[untyped])


9
# File 'sig/plushie/selection.rbs', line 9

def initialize: (mode: Symbol, selected: Set[untyped], anchor: untyped, order: Array[untyped]) -> void

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

#withState

Parameters:

  • changes (Object)

Returns:



11
# File 'sig/plushie/selection.rbs', line 11

def with: (**untyped changes) -> State