Sha256: 543db126f2a899ee36ee1cc58f1f8d5a65cdb87634acb79db61dfd1bc1f76998
Contents?: true
Size: 1.66 KB
Versions: 42
Compression:
Stored size: 1.66 KB
Contents
# # 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 Metasploit::Model::Search::Operator extend ActiveSupport::Autoload autoload :Association autoload :Attribute autoload :Base autoload :Delegation autoload :Deprecated autoload :Group autoload :Help autoload :Null autoload :Single end
Version data entries
42 entries across 42 versions & 1 rubygems
Version | Path |
---|---|
metasploit-model-0.27.4 | lib/metasploit/model/search/operator.rb |
metasploit-model-0.27.4-java | lib/metasploit/model/search/operator.rb |