Class: ShinseiConfig::Settings

Inherits:
Object
  • Object
show all
Defined in:
lib/shinsei_config/settings.rb

Overview

Stores settings for RootConfig that are not part of the schema

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSettings

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_pathObject

Returns the value of attribute config_path.



13
14
15
# File 'lib/shinsei_config/settings.rb', line 13

def config_path
  @config_path
end

#envObject

Returns the value of attribute env.



13
14
15
# File 'lib/shinsei_config/settings.rb', line 13

def env
  @env
end

#yaml_optsObject

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

Raises:



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