class JSONAPI::Request::QueryParamCollection::FilterParam

Used to create a unique Filter JSONAPI::Request::QueryParamCollection::QueryParam

Public Class Methods

new(filter_arr) click to toggle source

@param filter_arr [Array<JSONAPI::Request::QueryParamCollection::FilterParam::Filter>]

The array of filters included in the query string. Ex: filter[articles]=(posted_date == today)
Calls superclass method
# File lib/easy/jsonapi/request/query_param_collection/filter_param.rb, line 15
def initialize(filter_arr)
  super('filters', filter_arr)
end

Public Instance Methods

to_s() click to toggle source

Represent each filter separated by a & value

Ex: "#{filter1.to_s}&{filter2.to_s}&..."
# File lib/easy/jsonapi/request/query_param_collection/filter_param.rb, line 21
def to_s
  JSONAPI::Utility.to_string_collection(value, delimiter: '&')
end