Class: CredsEnv::Railtie

Inherits:
Rails::Railtie
  • Object
show all
Defined in:
lib/creds_env/rails.rb

Overview

CredsEnv Railtie for using CredsEnv to load environment from Rails encrypted credentials

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.loadObject

Rails uses ‘#method_missing` to delegate all class methods to the instance, which means `Kernel#load` gets called here. We don’t want that.



17
18
19
# File 'lib/creds_env/rails.rb', line 17

def self.load
  instance.load
end

Instance Method Details

#loadObject

Public: Load CredsEnv

This will get called during the ‘before_configuration` callback, but you can manually call `CredsEnv::Railtie.load` if you needed it sooner.



11
12
13
# File 'lib/creds_env/rails.rb', line 11

def load
  CredsEnv.load
end