Class: CabbageDoc::Configuration
- Inherits:
-
Object
- Object
- CabbageDoc::Configuration
- Includes:
- Singleton
- Defined in:
- lib/cabbage_doc/configuration.rb
Constant Summary collapse
- DEFAULTS =
{ version: 'v1', path: 'api/v1', title: 'Cabbage Doc', scheme: 'https', verbose: false }.freeze
- OPTIONAL_ATTRIBUTES =
i(welcome path scheme version title verbose authentication).freeze
- REQUIRED_ATTRIBUTES =
i(domain controllers root).freeze
- ATTRIBUTES =
(OPTIONAL_ATTRIBUTES + REQUIRED_ATTRIBUTES).freeze
- CALLABLE_ATTRIBUTES =
i(controllers authentication).freeze
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #validate! ⇒ Object
Methods included from Singleton
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
20 21 22 23 24 |
# File 'lib/cabbage_doc/configuration.rb', line 20 def initialize DEFAULTS.each do |attr, value| send(:"#{attr}=", value) end end |
Instance Method Details
#validate! ⇒ Object
26 27 28 29 30 |
# File 'lib/cabbage_doc/configuration.rb', line 26 def validate! validate_required! validate_callable! validate_root! end |