class JSONAPI::Request::QueryParamCollection::SortParam
Used to create a unique Sort JSONAPI::Request::QueryParamCollection::QueryParam
Public Class Methods
new(res_field_arr)
click to toggle source
@param res_field_arr [Array<JSONAPI::Field] The resource fields
to sort the primary resources by.
Calls superclass method
JSONAPI::Request::QueryParamCollection::QueryParam::new
# File lib/easy/jsonapi/request/query_param_collection/sort_param.rb, line 13 def initialize(res_field_arr) super('sorts', res_field_arr) end
Public Instance Methods
to_s()
click to toggle source
Represent sort as query string
# File lib/easy/jsonapi/request/query_param_collection/sort_param.rb, line 18 def to_s "sort=#{JSONAPI::Utility.to_string_collection(value, delimiter: ',')}" end