Module: CollectionSorter::Sorter::ClassMethods

Defined in:
lib/collection_sorter/sorter.rb

Instance Method Summary collapse

Instance Method Details

#sort_with(name, &block) ⇒ Object



14
15
16
17
# File 'lib/collection_sorter/sorter.rb', line 14

def sort_with(name, &block)
  self.sorters = self.sorters || {}
  self.sorters[name] = block
end