Sha256: ceff9894f6a66bd760c66722d0ba7a6e80f358b032ad85e16828ba6aac88cfa1

Contents?: true

Size: 1.23 KB

Versions: 8

Compression:

Stored size: 1.23 KB

Contents

require 'metasploit/model/translation'

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

        include Metasploit::Model::Translation

        included do
          include ActiveModel::Validations

          #
          # Validations
          #

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

        #
        # Associations
        #

        # @!attribute [rw] author
        #   Author who wrote the {#module_instance module}.
        #
        #   @return [Metasploit::Model::Author]

        # @!attribute [rw] email_address
        #   Email address {#author} used when writing {#module_instance module}.
        #
        #   @return [Metasploit::Model::EmailAddress] if {#author} gave an email address.
        #   @return [nil] if {#author} only gave a name.

        # @!attribute [rw] module_instance
        #   Module written by {#author}.
        #
        #   @return [Metasploit::Model::Module::Instance]
      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/author.rb
metasploit-model-0.27.3-java lib/metasploit/model/module/author.rb
metasploit-model-0.27.2 lib/metasploit/model/module/author.rb
metasploit-model-0.27.2-java lib/metasploit/model/module/author.rb
metasploit-model-0.27.1 lib/metasploit/model/module/author.rb
metasploit-model-0.27.1-java lib/metasploit/model/module/author.rb
metasploit-model-0.27.0 lib/metasploit/model/module/author.rb
metasploit-model-0.27.0-java lib/metasploit/model/module/author.rb