Sha256: 80f1d1001846f091ddf2f967b3bc20b635ad6b719d6d01386dd0e3190a9c4c07
Contents?: true
Size: 1.02 KB
Versions: 60
Compression:
Stored size: 1.02 KB
Contents
# 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}. class Metasploit::Model::Search::Operation::Base < Metasploit::Model::Base # # Attributes # # @!attribute [rw] operator # The operator operating on {#value}. # # @return [Metasploit::Model::Search::Operator::Base] attr_accessor :operator # @!attribute [rw] value # The value cast to the correct type from the formatted_value from the formatted operation. # # @return [String] attr_accessor :value # # Validations # validates :operator, :presence => true # validate_associated is defined by ActiveRecord, so have to do it manually here. validate :operator_valid private # Validates that {#operator} is valid # # @return [void] def operator_valid if operator and !operator.valid? errors.add(:operator, :invalid, :value => operator) end end end
Version data entries
60 entries across 60 versions & 1 rubygems