Module: Jat::Plugins::JsonApi::FieldsParamParser::ClassMethods
- Included in:
- Jat::Plugins::JsonApi::FieldsParamParser
- Defined in:
- lib/jat/plugins/json_api/lib/fields_param_parser.rb
Constant Summary collapse
- COMMA =
","
Instance Attribute Summary collapse
-
#jat_class ⇒ Object
Returns the Jat class that this FieldsParamParser class is namespaced under.
Instance Method Summary collapse
-
#inspect ⇒ Object
Since FieldsParamParser is anonymously subclassed when Jat is subclassed, and then assigned to a constant of the Jat subclass, make inspect reflect the likely name for the class.
- #parse(fields) ⇒ Object
Instance Attribute Details
#jat_class ⇒ Object
Returns the Jat class that this FieldsParamParser class is namespaced under.
11 12 13 |
# File 'lib/jat/plugins/json_api/lib/fields_param_parser.rb', line 11 def jat_class @jat_class end |
Instance Method Details
#inspect ⇒ Object
Since FieldsParamParser is anonymously subclassed when Jat is subclassed, and then assigned to a constant of the Jat subclass, make inspect reflect the likely name for the class.
16 17 18 |
# File 'lib/jat/plugins/json_api/lib/fields_param_parser.rb', line 16 def inspect "#{jat_class.inspect}::FieldsParamParser" end |
#parse(fields) ⇒ Object
20 21 22 23 24 |
# File 'lib/jat/plugins/json_api/lib/fields_param_parser.rb', line 20 def parse(fields) return FROZEN_EMPTY_HASH unless fields parse_to_nested_hash(fields) end |