Class: Carioca::Services::Config::Settings
- Includes:
- Helpers
- Defined in:
- lib/carioca/services/config.rb
Overview
A setting object
Instance Attribute Summary collapse
-
#config_file ⇒ Object
Returns the value of attribute config_file.
-
#stage ⇒ Object
Returns the value of attribute stage.
Instance Method Summary collapse
-
#initialize(config_filename:, stage:, root:) ⇒ Settings
constructor
A new instance of Settings.
- #refresh ⇒ Object
Methods included from Helpers
#debug, #i18n, #log, #search_file_in_gem
Methods inherited from Hash
#deep_symbolize, #method_missing
Constructor Details
#initialize(config_filename:, stage:, root:) ⇒ Settings
Returns a new instance of Settings.
84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/carioca/services/config.rb', line 84 def initialize(config_filename:, stage:, root:) super registry = Carioca::Registry.get @logger = registry.get_service name: :logger @i18n = registry.get_service name: :i18n @debug = Carioca::Registry.config.debug? @stage = stage @root = root @config_file = Carioca::Services::Config::ConfigFile.new filename: config_filename initconf end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Hash
Instance Attribute Details
#config_file ⇒ Object
Returns the value of attribute config_file.
80 81 82 |
# File 'lib/carioca/services/config.rb', line 80 def config_file @config_file end |
#stage ⇒ Object
Returns the value of attribute stage.
80 81 82 |
# File 'lib/carioca/services/config.rb', line 80 def stage @stage end |
Instance Method Details
#refresh ⇒ Object
96 97 98 |
# File 'lib/carioca/services/config.rb', line 96 def refresh initconf end |