Sha256: dabb1490ceb2aa9696c7985c6228acdc13d4ff81b54783600688e8014017693d

Contents?: true

Size: 1.24 KB

Versions: 8

Compression:

Stored size: 1.24 KB

Contents

require 'metasploit/model/translation'

module Metasploit
  module Model
    module Module
      # Code shared between `Mdm::Module::Action` and `Metasploit::Framework::Module::Action`.
      module Action
        extend ActiveModel::Naming
        extend ActiveSupport::Concern

        include Metasploit::Model::Translation

        included do
          include ActiveModel::MassAssignmentSecurity
          include ActiveModel::Validations
          include Metasploit::Model::Search

          #
          # Mass Assignment Security
          #

          attr_accessible :name

          #
          # Search Attributes
          #

          search_attribute :name, :type => :string

          #
          # Validations
          #

          validates :module_instance,
                    :presence => true
          validates :name,
                    :presence => true
        end

        #
        # Associations
        #

        # @!attribute [rw] module_instance
        #   Module that has this action.
        #
        #   @return [Metasploit::Model::Module::Instance]

        #
        # Attributes
        #

        # @!attribute [rw] name
        #   The name of this action.
        #
        #   @return [String]
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
metasploit-model-0.27.3 lib/metasploit/model/module/action.rb
metasploit-model-0.27.3-java lib/metasploit/model/module/action.rb
metasploit-model-0.27.2 lib/metasploit/model/module/action.rb
metasploit-model-0.27.2-java lib/metasploit/model/module/action.rb
metasploit-model-0.27.1 lib/metasploit/model/module/action.rb
metasploit-model-0.27.1-java lib/metasploit/model/module/action.rb
metasploit-model-0.27.0 lib/metasploit/model/module/action.rb
metasploit-model-0.27.0-java lib/metasploit/model/module/action.rb