class Referral::SortsTokens
Public Instance Methods
call(tokens, options)
click to toggle source
# File lib/referral/sorts_tokens.rb, line 38 def call(tokens, options) if (sort_func = SORT_FUNCTIONS[options[:sort].to_sym]) sort_func.call(tokens) else raise Referral::Error.new("Sort '#{options[:sort]} not found in Referral::SORT_FUNCTIONS") end end