Module: ScanDB::Model

Includes:
DataMapper::Types
Included in:
Host, HostName, OSClass, OSClassGuess, OSMatch, OSMatchGuess, Port, ScannedPort, Service
Defined in:
lib/scandb/model.rb

Constant Summary collapse

REPOSITORY_NAME =

Name of the DataMapper repository

:scandb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/scandb/model.rb', line 36

def self.included(base)
  base.module_eval do
    include DataMapper::Resource
    include DataMapper::AutoMigrations

    def self.default_repository_name
      Model::REPOSITORY_NAME
    end

    property :id, Serial
  end
end