Module: OptParseBuilder::StableSort
- Included in:
- Parser
- Defined in:
- lib/opt_parse_builder/stable_sort.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
permalink .stable_sort_by!(a) ⇒ Object
[View source]
6 7 8 9 10 |
# File 'lib/opt_parse_builder/stable_sort.rb', line 6 def stable_sort_by!(a) a.sort_by!.with_index do |e, i| [yield(e), i] end end |