Method: MotionRecord::Scope#initialize

Defined in:
lib/motion_record/scope.rb

#initialize(klass, options = {}) ⇒ Scope

Returns a new instance of Scope.



10
11
12
13
14
15
# File 'lib/motion_record/scope.rb', line 10

def initialize(klass, options = {})
  @klass = klass
  @conditions = options[:conditions] || {} # TODO: freeze?
  @order = options[:order]
  @limit = options[:limit]
end