Class: INatGet::Data::Parser::Part::JSON Private
- Inherits:
-
Copy
- Object
- INatGet::Data::Parser::Part
- Copy
- INatGet::Data::Parser::Part::JSON
- Defined in:
- lib/inat-get/data/parsers/defs/json.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary
Attributes inherited from INatGet::Data::Parser::Part
Instance Method Summary collapse
- #parse(source) ⇒ Object private
Methods inherited from Copy
Methods inherited from INatGet::Data::Parser::Part
Constructor Details
This class inherits a constructor from INatGet::Data::Parser::Part::Copy
Instance Method Details
#parse(source) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/inat-get/data/parsers/defs/json.rb', line 9 def parse source result = {} @names.each do |name| result[name] = source[name].to_json end @aliases.each do |name, src_name| result[name] = source[src_name].to_json end result end |