def sort_criteria
      @sort_criteria ||=
        sort_params.reduce('') do |sum, (key, value)|
          comparables = ["a[:#{key}]", "b[:#{key}]"]
          comparables.reverse! if value == :desc
          sum + "comp = comp == 0 ? #{comparables.join(' <=> ')} : comp; "
        end
    end
def sort_criteria
      @sort_criteria ||=
        sort_params.reduce('') do |sum, (key, value)|
          comparables = ["a[:#{key}]", "b[:#{key}]"]
          comparables.reverse! if value == :desc
          sum + "comp = comp == 0 ? #{comparables.join(' <=> ')} : comp; "
        end
    end
Build the criteria to be evaluated wthen applying sort
 on Array of Hashes (ascending by default).

 @return [String]

 @api public