Class: RockConfig::EnvironmentDetector

Inherits:
Object
  • Object
show all
Defined in:
lib/rock_config/environment_detector.rb

Instance Method Summary collapse

Constructor Details

#initialize(environment) ⇒ EnvironmentDetector

Returns a new instance of EnvironmentDetector.



3
4
5
# File 'lib/rock_config/environment_detector.rb', line 3

def initialize(environment)
  @environment = environment
end

Instance Method Details

#detectObject



7
8
9
# File 'lib/rock_config/environment_detector.rb', line 7

def detect
  @environment["RAILS_ENV"] || @environment["RACK_ENV"] || "development"
end