def run
        raise Lupa::SearchAttributesError, "You need to specify search attributes." unless search_attributes

        search_attributes.each do |method_name, value|
          new_scope         = scope_class.public_send(method_name)
          scope_class.scope = new_scope unless new_scope.nil?
        end

        scope_class.scope
      end
def run
        raise Lupa::SearchAttributesError, "You need to specify search attributes." unless search_attributes

        search_attributes.each do |method_name, value|
          new_scope         = scope_class.public_send(method_name)
          scope_class.scope = new_scope unless new_scope.nil?
        end

        scope_class.scope
      end
Internal: Applies search attributes keys as methods over the scope_class.

 * If search_attributes are not specified a Lupa::SearchAttributesError
   exception will be raised.

 Returns the result of the search.