Method: EasySearch::InstanceMethods#initialize

Defined in:
lib/easy_search/core.rb

#initialize(klass) ⇒ Object



25
26
27
28
29
30
31
32
# File 'lib/easy_search/core.rb', line 25

def initialize(klass)
  @klass = klass
  
  # validate that the class derived from the missing method descends from
  # ActiveRecord and has been "configured" in `Setup.config { setup_tables {...} }'
  # (i.e. "Search.userz.with(...)" where "userz" is an invalid model)
  Validations.validate_class!(@klass)
end