Module: Kamal::Configuration::Validation
- Extended by:
- ActiveSupport::Concern
- Included in:
- Kamal::Configuration, Accessory, Alias, Boot, Builder, Env, Logging, Proxy, Registry, Role, Servers, Ssh, Sshkit
- Defined in:
- lib/kamal/configuration/validation.rb
Instance Method Summary collapse
- #validate!(config, example: nil, context: nil, with: Kamal::Configuration::Validator) ⇒ Object
- #validation_yml ⇒ Object
Instance Method Details
#validate!(config, example: nil, context: nil, with: Kamal::Configuration::Validator) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/kamal/configuration/validation.rb', line 17 def validate!(config, example: nil, context: nil, with: Kamal::Configuration::Validator) context ||= self.class.validation_config_key example ||= validation_yml[self.class.validation_config_key] with.new(config, example: example, context: context).validate! end |
#validation_yml ⇒ Object
24 25 26 |
# File 'lib/kamal/configuration/validation.rb', line 24 def validation_yml @validation_yml ||= YAML.load(self.class.validation_doc) end |