Module: Hunter2

Defined in:
lib/hunter2.rb,
lib/hunter2/command.rb,
lib/hunter2/version.rb,
lib/hunter2/model/password.rb

Defined Under Namespace

Modules: Model Classes: Command

Constant Summary collapse

Version =
'0.0.3'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.aesObject

Returns the value of attribute aes.



22
23
24
# File 'lib/hunter2.rb', line 22

def aes
  @aes
end

.databaseObject

Returns the value of attribute database.



21
22
23
# File 'lib/hunter2.rb', line 21

def database
  @database
end

Class Method Details

.initObject



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/hunter2.rb', line 24

def init
  # Ensure we're connected to a database
  if @database.nil?
    $stderr.puts('No database connection has been set')
    exit
  end

  # Load all the models after the database connection has been established.
  Dir.glob(
    File.expand_path('../hunter2/model/*.rb', __FILE__)
  ).each do |f|
    require(f)
  end
end