instance method
stable_sort!
Ruby on Rails 2.9.0
Since v1.9.3 Last seen in v2.11.0Signature
stable_sort!(elements, &block)
No documentation comment.
Parameters
-
elementsreq -
blockblock
Source
# File lib/kamal/utils.rb, line 87
def stable_sort!(elements, &block)
elements.sort_by!.with_index { |element, index| [ block.call(element), index ] }
end
Defined in lib/kamal/utils.rb line 87
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Kamal::Utils