Class: NumberedRelationships::Constructor

Inherits:
Object
  • Object
show all
Defined in:
lib/numbered_relationships/constructor.rb

Instance Method Summary collapse

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(options={})
  @n = options[:n]
  @operator = options[:operator]
  @filters = options[:filters]
  @klass = options[:klass]
  @reflection = options[:reflection]
end

Instance Method Details

#constructObject



11
12
13
# File 'lib/numbered_relationships/constructor.rb', line 11

def construct
  return @klass.scoped unless @reflection
end