Class: NumberedRelationships::Constructor
- Inherits:
-
Object
- Object
- NumberedRelationships::Constructor
- Defined in:
- lib/numbered_relationships/constructor.rb
Direct Known Subclasses
HasAndBelongsToManyConstructor, HasManyConstructor, HasManyThroughConstructor
Instance Method Summary collapse
- #construct ⇒ Object
-
#initialize(options = {}) ⇒ Constructor
constructor
A new instance of Constructor.
Constructor Details
#initialize(options = {}) ⇒ Constructor
Returns a new instance of Constructor.
3 4 5 6 7 8 9 |
# File 'lib/numbered_relationships/constructor.rb', line 3 def initialize(={}) @n = [:n] @operator = [:operator] @filters = [:filters] @klass = [:klass] @reflection = [:reflection] end |
Instance Method Details
#construct ⇒ Object
11 12 13 |
# File 'lib/numbered_relationships/constructor.rb', line 11 def construct return @klass.scoped unless @reflection end |