Class: Mongo::Collection::View
- Inherits:
-
Object
- Object
- Mongo::Collection::View
- Defined in:
- lib/modelize/ext.rb
Instance Method Summary collapse
-
#first ⇒ Object
First BSON::Document or model.
-
#to_a ⇒ Object
To a BSON::Documents or models.
Instance Method Details
#first ⇒ Object
First BSON::Document or model
20 21 22 |
# File 'lib/modelize/ext.rb', line 20 def first Modelize.enable ? modelize(super) : super end |
#to_a ⇒ Object
To a BSON::Documents or models
15 16 17 |
# File 'lib/modelize/ext.rb', line 15 def to_a Modelize.enable ? super.map{|doc| modelize(doc)} : super end |