Sha256: ea7b4ebb0ed353e6eb638e331c23658eb43d089e222f4df727090da5b87df14a

Contents?: true

Size: 968 Bytes

Versions: 8

Compression:

Stored size: 968 Bytes

Contents

require 'metasploit/model/search/operator'

# Operator used when the formatted operator name does not match a class's operators.
class Metasploit::Model::Search::Operator::Null < Metasploit::Model::Search::Operator::Single
  #
  # Attributes
  #

  # @!attribute [rw] name
  #   The name of this operator that was not the name of a search operator for
  #   {Metasploit::Model::Search::Operator::Base#klass}.
  #
  #   @return [Symbol]
  attr_accessor :name

  #
  # Validations
  #

  validate :name_invalid

  # Null operators do not have a type since the attribute is unknown.
  #
  # @return [nil]
  def type
    nil
  end

  protected

  # Null operation Class.
  #
  # @return [Class] {Metasploit::Model::Search::Operation::Null}
  def operation_class
    Metasploit::Model::Search::Operation::Null
  end

  private

  # Always records an error that name is not an operator name
  #
  # @return [void]
  def name_invalid
    errors.add(:name, :unknown)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
metasploit-model-0.27.3 app/models/metasploit/model/search/operator/null.rb
metasploit-model-0.27.3-java app/models/metasploit/model/search/operator/null.rb
metasploit-model-0.27.2 app/models/metasploit/model/search/operator/null.rb
metasploit-model-0.27.2-java app/models/metasploit/model/search/operator/null.rb
metasploit-model-0.27.1 app/models/metasploit/model/search/operator/null.rb
metasploit-model-0.27.1-java app/models/metasploit/model/search/operator/null.rb
metasploit-model-0.27.0 app/models/metasploit/model/search/operator/null.rb
metasploit-model-0.27.0-java app/models/metasploit/model/search/operator/null.rb