Class: Dbee::Providers::ActiveRecordProvider::Makers::Order
- Inherits:
-
Object
- Object
- Dbee::Providers::ActiveRecordProvider::Makers::Order
- Includes:
- Singleton
- Defined in:
- lib/dbee/providers/active_record_provider/makers/order.rb
Overview
Derives Arel#order predicates.
Instance Method Summary collapse
Instance Method Details
#make(sorter, arel_column) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/dbee/providers/active_record_provider/makers/order.rb', line 18 def make(sorter, arel_column) method = SORTER_EVALUATORS[sorter.class] raise ArgumentError, "cannot compile sorter: #{sorter}" unless method method.call(arel_column) end |