module Metasploit::Model::Search::Attribute::ClassMethods

Adds {#search_attribute} DSL to make {Metasploit::Model::Search::Operator::Attribute attribute search operators}.

Public Instance Methods

search_attribute(attribute, options={}) click to toggle source

{include:Metasploit::Model::Search::Attribute}

@param attribute [#to_sym] name of attribute to search. @param options [Hash{Symbol => String}] @option options [Symbol] :type The type of the attribute. Used to determine how to parse the search values

and which modifiers are supported.

@return (see Metasploit::Model::Search::With::ClassMethods#search_with) @raise [Metasploit::Model::Invalid] unless attribute is present @raise [Metasploit::Model::Invalid] unless :type is present

# File lib/metasploit/model/search/attribute.rb, line 129
def search_attribute(attribute, options={})
  search_with Metasploit::Model::Search::Operator::Attribute,
              :attribute => attribute,
              :type => options[:type]
end