Module: Fairy::Sort::Interface
- Defined in:
- lib/fairy/client/sort.rb
Instance Method Summary collapse
Instance Method Details
#sort_by(cmp_proc, opts = nil) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/fairy/client/sort.rb', line 13 def sort_by(cmp_proc, opts=nil) cmp_proc = BlockSource.new(cmp_proc) pre_sort = Sort::PreSort.new(@fairy, opts, cmp_proc) pre_sort.input = self post_sort = Sort::PostSort.new(@fairy, opts, cmp_proc) post_sort.input = pre_sort post_sort end |