Class: Priora::Collection

Inherits:
Object
  • Object
show all
Defined in:
lib/priora/collection.rb

Instance Method Summary collapse

Constructor Details

#initialize(collection) ⇒ Collection

Returns a new instance of Collection.


3
4
5
6
# File 'lib/priora/collection.rb', line 3

def initialize(collection)
  @collection = collection
  @comparison_ready_objects = {}
end

Instance Method Details

#prioritize_by(priorities) ⇒ Object


8
9
10
# File 'lib/priora/collection.rb', line 8

def prioritize_by(priorities)
  sorted_collection_by(priorities).reverse
end