Sha256: c071bccac02cd45ca10dd77e167e8ecb589a25abd7c8827d9ab0e78a6c955d35

Contents?: true

Size: 957 Bytes

Versions: 15

Compression:

Stored size: 957 Bytes

Contents

module Metasploit
  module Model
    module Search
      # Registers associations that can be searched.
      module Association
        extend ActiveSupport::Concern

        # Adds {#search_association} DSL to make {Metasploit::Model::Search::Operator::Association association search
        # operators}.
        module ClassMethods
          # Registers association for search.
          #
          # @param association [#to_sym] name of association to search.
          # @return [void]
          def search_association(association)
            search_association_set.add(association.to_sym)
          end

          # Set of all associations that are searchable.
          #
          # @example Adding association to search
          #   search_association :things
          #
          # @return [Set<Symbol>]
          def search_association_set
            @search_association_set ||= Set.new
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
metasploit-model-0.25.7 lib/metasploit/model/search/association.rb
metasploit-model-0.25.7-java lib/metasploit/model/search/association.rb
metasploit-model-0.25.6 lib/metasploit/model/search/association.rb
metasploit-model-0.25.6-java lib/metasploit/model/search/association.rb
metasploit-model-0.25.3 lib/metasploit/model/search/association.rb
metasploit-model-0.25.3-java lib/metasploit/model/search/association.rb
metasploit-model-0.25.2 lib/metasploit/model/search/association.rb
metasploit-model-0.25.2-java lib/metasploit/model/search/association.rb
metasploit-model-0.25.1 lib/metasploit/model/search/association.rb
metasploit-model-0.25.1-java lib/metasploit/model/search/association.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups-java lib/metasploit/model/search/association.rb
metasploit-model-0.25.1.pre.metasploit.pre.model.pre.search.pre.operator.pre.and.pre.operation.pre.groups lib/metasploit/model/search/association.rb
metasploit-model-0.24.1-java lib/metasploit/model/search/association.rb
metasploit-model-0.24.1 lib/metasploit/model/search/association.rb
metasploit-model-0.24.1.pre.semantic.pre.versioning.pre.2.pre.0 lib/metasploit/model/search/association.rb