Class: Remotenv::Railtie

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

Overview

Remotenv Railtie for using Remotenv to load environment before application is loaded

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.



18
19
20
# File 'lib/remotenv/rails.rb', line 18

def self.load
  instance.load
end

Instance Method Details

#loadObject

Public: Load Remotenv

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



12
13
14
# File 'lib/remotenv/rails.rb', line 12

def load
  Remotenv.load
end