Class: Rails::AppEnv::EnvironmentInquirer

Inherits:
ActiveSupport::EnvironmentInquirer
  • Object
show all
Defined in:
lib/rails/app_env/environment_inquirer.rb

Constant Summary collapse

DEFAULT_ENVIRONMENTS =

Optimization for the two extra Heroku pipeline stages, so this inquirer doesn’t need to rely on the slower delegation through method_missing that StringInquirer would normally entail.

%w[staging review]

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ EnvironmentInquirer

Returns a new instance of EnvironmentInquirer.



8
9
10
11
12
13
14
# File 'lib/rails/app_env/environment_inquirer.rb', line 8

def initialize(env)
  super

  DEFAULT_ENVIRONMENTS.each do |default|
    instance_variable_set :"@#{default}", env == default
  end
end