Module: SmplPrflr::Initializers::Base

Included in:
SmplPrflr
Defined in:
lib/smpl_prflr/initializers/base.rb

Instance Method Summary collapse

Instance Method Details

#initialize_base!Object



6
7
8
9
10
11
12
13
14
# File 'lib/smpl_prflr/initializers/base.rb', line 6

def initialize_base!
  host = ENV['HOST'] || SmplPrflr::Constants::HOST
  port = ENV['PORT'] || SmplPrflr::Constants::PORT
  db = ENV['DB'] || SmplPrflr::Constants::DB

  @redis = Redis.new(host: host, port: port, db: db)
rescue StandardError => e
  raise SmplPrflr::LoadResourcesError.new, e.message
end