Sha256: e1b1a9acba931af72db76eb772683a4b5185ccbfd09e63158982623331087d13

Contents?: true

Size: 858 Bytes

Versions: 8

Compression:

Stored size: 858 Bytes

Contents

require 'metasploit/model/search/operation'

# Operation that uses a {Metasploit::Model::Search::Operation::Null null operator}.
class Metasploit::Model::Search::Operation::Null < Metasploit::Model::Search::Operation::Base
  #
  # Validations
  #

  validate :null_operator

  #
  # Methods
  #

  private

  # Validates that {Metasploit::Model::Search::Operation::Base#operator} is a
  # {Metasploit::Model::Search::Operator::Null}, as {Metasploit::Model::Search::Operation::Null} won't validate
  # correctly (and be invalid) if {Metasploit::Model::Search::Operation::Base#operator} is not a
  # {Metasploit::Model::Search::Operator::Null}.
  #
  # @return [void]
  def null_operator
    unless operator.is_a? Metasploit::Model::Search::Operator::Null
      errors.add(:operator, :type, :type => Metasploit::Model::Search::Operator::Null)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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