Class: MongoMapper::Plugins::Associations::Collection
- Defined in:
- lib/mongo_mapper/plugins/associations/collection.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Proxy
Instance Method Summary collapse
Methods inherited from Proxy
#===, #blank?, #initialize, #inspect, #loaded, #loaded?, #nil?, #present?, #proxy_respond_to?, #reload, #replace, #respond_to?, #send
Constructor Details
This class inherits a constructor from MongoMapper::Plugins::Associations::Proxy
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class MongoMapper::Plugins::Associations::Proxy
Instance Method Details
#reset ⇒ Object
14 15 16 17 |
# File 'lib/mongo_mapper/plugins/associations/collection.rb', line 14 def reset super target = [] end |
#to_ary ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/mongo_mapper/plugins/associations/collection.rb', line 5 def to_ary load_target if target.is_a?(Array) target.to_ary else Array(target) end end |