class Metasploit::Model::Search::Operation::Base

Base of all search operations that combine an {#operator} with the {#value} it is operating on. Subclasses allow validations specific to the {#operator} {Metasploit::Model::Search::Operator::Single#type type}.

Attributes

operator[RW]

@!attribute [rw] operator

The operator operating on {#value}.

@return [Metasploit::Model::Search::Operator::Base]
value[RW]

@!attribute [rw] value

The value cast to the correct type from the formatted_value from the formatted operation.

@return [String]

Private Instance Methods

operator_valid() click to toggle source

Validates that {#operator} is valid

@return [void]

# File app/models/metasploit/model/search/operation/base.rb, line 34
def operator_valid
  if operator and !operator.valid?
    errors.add(:operator, :invalid, :value => operator)
  end
end