Module: Settings::Provider
- Included in:
- Config
- Defined in:
- lib/configurates/provider.rb
Overview
Module Provider is an inclusion for Settings::Config class.
This module used for provider validations and data normalization.
Details:
Any provider (f.e. Settings::Yaml should respond to :data and :load methods, otherwise an exception will be raised.
Any provider after provider.data method call should return non-empty hash, otherwise an exception will be raised.
Provider should present non-empty sub-hash if optional parameter “#Top Level Namespace” was used. For example for root: ‘data/day1’, original hash needs to include subhash like:
hash = {…, …, data: {…, day1: { …, … }, … }, … }
Defined Under Namespace
Classes: HashNotValid, ProviderNotRespond, RootNotExist