class SunspotMatchersTestunit::HaveSearchParams

Public Class Methods

new(session, method, *args) click to toggle source
# File lib/sunspot_matchers_testunit/matchers.rb, line 129
def initialize(session, method, *args)
  @session = session
  @method = method
  @args = args
end

Public Instance Methods

get_matcher() click to toggle source
# File lib/sunspot_matchers_testunit/matchers.rb, line 135
def get_matcher
  matcher_class = case @method
    when :with
      WithMatcher
    when :without
      WithoutMatcher
    when :keywords
      KeywordsMatcher
    when :boost
      BoostMatcher
    when :facet
      FacetMatcher
    when :order_by
      OrderByMatcher
    when :paginate
      PaginationMatcher
  end
  matcher_class.new(@session, @args)
end