Class: Plutonium::Positioning::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/plutonium/positioning.rb

Overview

Outcome of a Model#reposition! call. rebalanced? is true when the gap between the neighbours was exhausted and the whole scope group had to be renumbered — the caller needs to know because every other row's position changed, so any cached client-side view of the list is stale.

It lives on the namespace, NOT inside Model, for the same reason the concern was split out of the namespace in the first place: Model is included into user models, so anything nested in it joins their constant lookup and can shadow their own constants (see the comment in model.rb).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#rebalancedObject (readonly)

Returns the value of attribute rebalanced

Returns:

  • (Object)

    the current value of rebalanced



34
35
36
# File 'lib/plutonium/positioning.rb', line 34

def rebalanced
  @rebalanced
end

Instance Method Details

#rebalanced?Boolean

Returns:

  • (Boolean)


35
# File 'lib/plutonium/positioning.rb', line 35

def rebalanced? = rebalanced