Class: Mongoid::NestedSerialization::Finder
- Inherits:
-
Object
- Object
- Mongoid::NestedSerialization::Finder
- Defined in:
- lib/mongoid/nested_serialization/finder.rb
Class Method Summary collapse
Class Method Details
.find(json) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/mongoid/nested_serialization/finder.rb', line 7 def self.find(json) data = parse_input(json) # load the top level object object = top_level_object(data) # if we have embedded stuff while data["embedded"] # work on the next level down data = data["embedded"] # find the nested object object = nested_object(object, data) end # once at the bottom, return the object object end |