Class: DataMapper::LoadedSet
- Inherits:
-
Object
- Object
- DataMapper::LoadedSet
- Defined in:
- lib/data_mapper/loaded_set.rb
Overview
LoadedSet’s purpose is to give a common reference for the results of a query, so that they can be manipulated by the DataMapper, behind-the-scenes, as a set.
Defined Under Namespace
Classes: ObjectIdCollection
Instance Attribute Summary collapse
-
#database ⇒ Object
readonly
Provides a reference to the database that originally loaded the instances.
-
#instances ⇒ Object
readonly
Provides an Enumerable of the instances loaded in the set.
Instance Method Summary collapse
-
#initialize(database) ⇒ LoadedSet
constructor
A new instance of LoadedSet.
Constructor Details
Instance Attribute Details
#database ⇒ Object (readonly)
Provides a reference to the database that originally loaded the instances.
10 11 12 |
# File 'lib/data_mapper/loaded_set.rb', line 10 def database @database end |
#instances ⇒ Object (readonly)
Provides an Enumerable of the instances loaded in the set.
12 13 14 |
# File 'lib/data_mapper/loaded_set.rb', line 12 def instances @instances end |