Module: Bridgetown::Commands::ConfigurationOverridable
- Defined in:
- lib/bridgetown-core/commands/concerns/configuration_overridable.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#configuration_with_overrides(options, preloaded = nil) ⇒ Bridgetown::Configuration
Create a full Bridgetown configuration with the options passed in as overrides.
Class Method Details
.included(klass) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/bridgetown-core/commands/concerns/configuration_overridable.rb', line 6 def self.included(klass) desc = "The environment used for this command (aka development, test, production, etc.)" klass.class_option :environment, aliases: "-e", desc: end |
Instance Method Details
#configuration_with_overrides(options, preloaded = nil) ⇒ Bridgetown::Configuration
Create a full Bridgetown configuration with the options passed in as overrides
19 20 21 22 23 |
# File 'lib/bridgetown-core/commands/concerns/configuration_overridable.rb', line 19 def configuration_with_overrides(, preloaded = nil) return preloaded.merge!() if preloaded.is_a?(Bridgetown::Configuration) Bridgetown.configuration() end |