Module: Config::Validation::Validate
- Included in:
- Options
- Defined in:
- lib/config/validation/validate.rb
Instance Method Summary collapse
Instance Method Details
#validate! ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/config/validation/validate.rb', line 7 def validate! if Config.schema v_res = Config.schema.(self.to_hash) unless v_res.success? raise Config::Validation::Error.new("Config validation failed:\n\n#{Config::Validation::Error.format(v_res)}") end end end |