class JSONAPI::Request::QueryParamCollection::FilterParam::Filter

Represents an individual Filtering scheme for the filter query param(s) used.

Attributes

filter[R]
resource_type[R]

Public Class Methods

new(resource_type, filter) click to toggle source

@param resource_type [String] The type to filter @param filter [String] The filter algorithm

# File lib/easy/jsonapi/request/query_param_collection/filter_param/filter.rb, line 16
def initialize(resource_type, filter)
  @resource_type = resource_type
  @filter = filter
end

Public Instance Methods

to_s() click to toggle source

Represent filter as an individual filter query param

# File lib/easy/jsonapi/request/query_param_collection/filter_param/filter.rb, line 27
def to_s
  "filter[#{@resource_type}]=#{@filter}"
end
value() click to toggle source

@return [String] The value of the filter

# File lib/easy/jsonapi/request/query_param_collection/filter_param/filter.rb, line 22
def value
  @filter
end