Class: ShinseiConfig::Settings
- Inherits:
-
Object
- Object
- ShinseiConfig::Settings
- Defined in:
- lib/shinsei_config/settings.rb
Overview
Stores settings for RootConfig that are not part of the schema
Instance Attribute Summary collapse
-
#config_path ⇒ Object
Returns the value of attribute config_path.
-
#env ⇒ Object
Returns the value of attribute env.
-
#yaml_opts ⇒ Object
Returns the value of attribute yaml_opts.
Instance Method Summary collapse
-
#initialize ⇒ Settings
constructor
A new instance of Settings.
- #validate! ⇒ Object
Constructor Details
#initialize ⇒ Settings
Returns a new instance of Settings.
16 17 18 19 20 |
# File 'lib/shinsei_config/settings.rb', line 16 def initialize @config_path = nil @env = nil @yaml_opts = {} end |
Instance Attribute Details
#config_path ⇒ Object
Returns the value of attribute config_path.
13 14 15 |
# File 'lib/shinsei_config/settings.rb', line 13 def config_path @config_path end |
#env ⇒ Object
Returns the value of attribute env.
13 14 15 |
# File 'lib/shinsei_config/settings.rb', line 13 def env @env end |
#yaml_opts ⇒ Object
Returns the value of attribute yaml_opts.
13 14 15 |
# File 'lib/shinsei_config/settings.rb', line 13 def yaml_opts @yaml_opts end |
Instance Method Details
#validate! ⇒ Object
23 24 25 |
# File 'lib/shinsei_config/settings.rb', line 23 def validate! raise Error, 'config_path is required' if config_path.nil? || config_path.empty? end |