Sha256: 76ed2c3d4edff4533c70f5c52bc9e23dd88999e4b52e00a16ff13cdce33c4b3a

Contents?: true

Size: 1.92 KB

Versions: 8

Compression:

Stored size: 1.92 KB

Contents

module Metasploit
  module Model
    module Search
      # # Declaring operator classes
      #
      # ## Interface
      #
      # Operators do not need to subclass any specific superclass, but they are expected to define certain methods.
      #
      #     class MyOperator
      #       #
      #       # Instance Methods
      #       #
      #
      #       # @param klass [Class] The klass on which `search_with` was called.
      #       def initialize(attributes={})
      #         # ...
      #       end
      #
      #       # Description of what this operator searches for.
      #       #
      #       # @return [String]
      #       def help
      #         # ...
      #       end
      #
      #       # Name of this operator.  The name of the operator is matched to the string before the ':' in a formatted
      #       # operation.
      #       #
      #       # @return [Symbol]
      #       def name
      #         # ...
      #       end
      #
      #       # Creates a one or more operations based on `formatted_value`.
      #       #
      #       # @return [#operator, Array<#operator>] Operation with this operator as the operation's `operator`.
      #       def operate_on(formatted_value)
      #         # ...
      #       end
      #     end
      #
      # ## Help
      #
      # Instead of having define your own `#help` method for your operator `Class`, you can `include`
      # {Metasploit::Model::Search::Operator::Help}.
      #
      # {include:Metasploit::Model::Search::Operator::Help}
      #
      # ## {Metasploit::Model::Search::Operator::Base}
      #
      # {include:Metasploit::Model::Search::Operator::Base}
      #
      # ## {Metasploit::Model::Search::Operator::Single}
      #
      # {include:Metasploit::Model::Search::Operator::Single}
      module Operator
        extend ActiveSupport::Autoload

        autoload :Deprecated
        autoload :Group
        autoload :Help
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
metasploit-model-0.27.3 lib/metasploit/model/search/operator.rb
metasploit-model-0.27.3-java lib/metasploit/model/search/operator.rb
metasploit-model-0.27.2 lib/metasploit/model/search/operator.rb
metasploit-model-0.27.2-java lib/metasploit/model/search/operator.rb
metasploit-model-0.27.1 lib/metasploit/model/search/operator.rb
metasploit-model-0.27.1-java lib/metasploit/model/search/operator.rb
metasploit-model-0.27.0 lib/metasploit/model/search/operator.rb
metasploit-model-0.27.0-java lib/metasploit/model/search/operator.rb