instance method stable_sort!

Ruby on Rails 2.0.0

Since v1.9.3 Last seen in v2.11.0

Available in: v1.9.3 v2.0.0 v2.1.2 v2.2.2 v2.3.0 v2.4.0 v2.5.3 v2.6.1 v2.7.0 v2.8.2 v2.9.0 v2.10.1 v2.11.0

Signature

stable_sort!(elements, &block)

No documentation comment.

Parameters

elements req
block block
Source
# File lib/kamal/utils.rb, line 85
  def stable_sort!(elements, &block)
    elements.sort_by!.with_index { |element, index| [ block.call(element), index ] }
  end

Defined in lib/kamal/utils.rb line 85 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Kamal::Utils

Type at least 2 characters to search.

↑↓ navigate · open · esc close