Class: Twigg::Settings
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Twigg::Settings
- Extended by:
- DSL::ClassMethods
- Includes:
- DSL::InstanceMethods
- Defined in:
- lib/twigg/settings.rb,
lib/twigg/settings/dsl.rb
Overview
Simple OpenStruct subclass with some methods overridden in order to provide more detailed feedback in the event of a misconfiguration, or to provide reasonable default values.
For example, we override ‘repositories_directory` so that we can report to the user that:
- the setting is missing from the configuration file
- the setting does not point at a directory
We override ‘app.bind` so that we can supply a reasonable default when the configuration file has no value set.
In order to keep this class a simple and readable manifest of the different options, the real logic is all implemented in the DSL module, leaving only the DSL declarations here.
Defined Under Namespace
Modules: DSL