Class: Referral::SortsTokens
- Inherits:
-
Object
- Object
- Referral::SortsTokens
- Defined in:
- lib/referral/sorts_tokens.rb
Instance Method Summary collapse
Instance Method Details
#call(tokens, options) ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/referral/sorts_tokens.rb', line 38 def call(tokens, ) if (sort_func = SORT_FUNCTIONS[[:sort].to_sym]) sort_func.call(tokens) else raise Referral::Error.new("Sort '#{[:sort]} not found in Referral::SORT_FUNCTIONS") end end |