Class: Rack::JSON::MongoDocument
- Defined in:
- lib/rackjson/mongo_document.rb
Instance Attribute Summary
Attributes inherited from Document
Instance Method Summary collapse
-
#initialize(row) ⇒ MongoDocument
constructor
A new instance of MongoDocument.
Methods inherited from Document
#add_attributes, create, #field, #set_id, #to_h, #to_json
Constructor Details
#initialize(row) ⇒ MongoDocument
Returns a new instance of MongoDocument.
4 5 6 7 |
# File 'lib/rackjson/mongo_document.rb', line 4 def initialize(row) @attributes = row set_attributes end |