Class: JSONAPI::Request::QueryParamCollection::FieldsParam
- Inherits:
-
QueryParam
- Object
- Item
- NameValuePair
- QueryParam
- JSONAPI::Request::QueryParamCollection::FieldsParam
- Defined in:
- lib/easy/jsonapi/request/query_param_collection/fields_param.rb,
lib/easy/jsonapi/request/query_param_collection/fields_param/fieldset.rb
Overview
Used to create a unique Fieldset JSONAPI::Request::QueryParamCollection::QueryParam
Defined Under Namespace
Classes: Fieldset
Instance Attribute Summary
Attributes inherited from Item
Instance Method Summary collapse
-
#fieldsets ⇒ Array<JSONAPI::Request::QueryParamCollection::FieldsParam::Fieldset>
Alias to parent #value method.
-
#initialize(fieldset_arr) ⇒ FieldsParam
constructor
A new instance of FieldsParam.
-
#to_s ⇒ Object
The the query string representation of the included fieldsets ex: “#fieldset1fieldset1.to_s&fieldset2fieldset2.to_s&…”.
Methods inherited from QueryParam
Methods inherited from NameValuePair
#name, #name=, #to_h, #value, #value=
Methods inherited from Item
Constructor Details
#initialize(fieldset_arr) ⇒ FieldsParam
Returns a new instance of FieldsParam.
13 14 15 |
# File 'lib/easy/jsonapi/request/query_param_collection/fields_param.rb', line 13 def initialize(fieldset_arr) super('fields', fieldset_arr) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class JSONAPI::Item
Instance Method Details
#fieldsets ⇒ Array<JSONAPI::Request::QueryParamCollection::FieldsParam::Fieldset>
Alias to parent #value method
19 20 21 |
# File 'lib/easy/jsonapi/request/query_param_collection/fields_param.rb', line 19 def fieldsets value end |
#to_s ⇒ Object
Returns The the query string representation of the included fieldsets ex: “#JSONAPI::Request::QueryParamCollection::FieldsParam.fieldset1fieldset1.to_s&JSONAPI::Request::QueryParamCollection::FieldsParam.fieldset2fieldset2.to_s&…”.
25 26 27 |
# File 'lib/easy/jsonapi/request/query_param_collection/fields_param.rb', line 25 def to_s JSONAPI::Utility.to_string_collection(value, delimiter: '&') end |