Module: Jat::Plugins::SimpleApi::FieldsParamParser::ClassMethods
- Included in:
- Jat::Plugins::SimpleApi::FieldsParamParser
- Defined in:
- lib/jat/plugins/simple_api/lib/fields_param_parser.rb
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.
9 10 11 |
# File 'lib/jat/plugins/simple_api/lib/fields_param_parser.rb', line 9 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.
14 15 16 |
# File 'lib/jat/plugins/simple_api/lib/fields_param_parser.rb', line 14 def inspect "#{jat_class.inspect}::FieldsParamParser" end |
#parse(fields) ⇒ Object
18 19 20 21 22 |
# File 'lib/jat/plugins/simple_api/lib/fields_param_parser.rb', line 18 def parse(fields) return FROZEN_EMPTY_HASH unless fields new.parse(fields) end |