Module: Birddog::Searchable

Defined in:
lib/birddog/searchable.rb

Instance Method Summary collapse

Instance Method Details

#birddog(&block) ⇒ Object



5
6
7
8
# File 'lib/birddog/searchable.rb', line 5

def birddog(&block)
  @birddog ||= ::Birddog::Birddog.new(self)
  block ? @birddog.tap(&block) : @birddog
end

#scopes_for_query(query) ⇒ Object



10
11
12
# File 'lib/birddog/searchable.rb', line 10

def scopes_for_query(query)
  birddog.search(query)
end