Class: JSONAPI::Request::QueryParamCollection::FilterParam
- Inherits:
-
QueryParam
- Object
- Item
- NameValuePair
- QueryParam
- JSONAPI::Request::QueryParamCollection::FilterParam
- Defined in:
- lib/easy/jsonapi/request/query_param_collection/filter_param.rb,
lib/easy/jsonapi/request/query_param_collection/filter_param/filter.rb
Overview
Used to create a unique Filter JSONAPI::Request::QueryParamCollection::QueryParam
Defined Under Namespace
Classes: Filter
Instance Attribute Summary
Attributes inherited from Item
Instance Method Summary collapse
-
#initialize(filter_arr) ⇒ FilterParam
constructor
A new instance of FilterParam.
-
#to_s ⇒ Object
Represent each filter separated by a & value Ex: “#filter1filter1.to_s&filter2filter2.to_s&…”.
Methods inherited from QueryParam
Methods inherited from NameValuePair
#name, #name=, #to_h, #value, #value=
Methods inherited from Item
Constructor Details
#initialize(filter_arr) ⇒ FilterParam
Returns a new instance of FilterParam.
15 16 17 |
# File 'lib/easy/jsonapi/request/query_param_collection/filter_param.rb', line 15 def initialize(filter_arr) super('filters', filter_arr) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class JSONAPI::Item
Instance Method Details
#to_s ⇒ Object
Represent each filter separated by a & value
Ex: "#{filter1.to_s}&{filter2.to_s}&..."
21 22 23 |
# File 'lib/easy/jsonapi/request/query_param_collection/filter_param.rb', line 21 def to_s JSONAPI::Utility.to_string_collection(value, delimiter: '&') end |