Module: Rails::Command::EnvironmentArgument
- Extended by:
- ActiveSupport::Concern
- Included in:
- BootCommand, ConsoleCommand, CredentialsCommand, DbconsoleCommand, InitializersCommand, RunnerCommand, ServerCommand
- Defined in:
- lib/rails/command/environment_argument.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#initialize ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/rails/command/environment_argument.rb', line 16 def initialize(...) super @environment_specified = [:environment].present? if !@environment_specified self. = .merge(environment: Rails::Command.environment) elsif !available_environments.include?([:environment]) self. = .merge(environment: ([:environment])) end end |