def search_with(operator_class, options={})
      merged_operations = options.merge(
          :klass => self
      )
      operator = operator_class.new(merged_operations)
      operator.valid!

      search_with_operator_by_name[operator.name] = operator
    end
def search_with(operator_class, options={})
      merged_operations = options.merge(
          :klass => self
      )
      operator = operator_class.new(merged_operations)
      operator.valid!

      search_with_operator_by_name[operator.name] = operator
    end
Declares that this class should be search with an instance of the given `operator_class`.

 @param operator_class [Class<Metasploit::Model::Search::Operator::Base>] a class to initialize.
 @param options [Hash] Options passed to `operator_class.new` along with `{:klass => self}`, so that the
   `operator_class` instance knows it was registered as search this class.
 @return [Metasploit::Model::Search::Operator::Base]
 @raise (see Metasploit::Model::Base#invalid!)