Module: Collapsium::Config::ClassMethods
- Included in:
- Collapsium::Config
- Defined in:
- lib/collapsium-config.rb
Overview
Modules can have class methods, too, but it’s a little more verbose to provide them.
Instance Attribute Summary collapse
- #config ⇒ Object private
Instance Method Summary collapse
-
#config_file ⇒ String
The config file path, defaulting to ‘config/config.yml’.
-
#config_file=(name) ⇒ Object
Set the configuration file.
-
#config_options ⇒ Hash
Configuration loading options.
-
#config_options=(opts) ⇒ Object
Set configuration loading options.
Instance Attribute Details
#config ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
53 54 55 |
# File 'lib/collapsium-config.rb', line 53 def config @config end |
Instance Method Details
#config_file ⇒ String
Returns the config file path, defaulting to ‘config/config.yml’.
38 39 40 |
# File 'lib/collapsium-config.rb', line 38 def config_file return @config_file || DEFAULT_CONFIG_PATH end |
#config_file=(name) ⇒ Object
Set the configuration file
33 34 35 |
# File 'lib/collapsium-config.rb', line 33 def config_file=(name) @config_file = name end |
#config_options ⇒ Hash
Returns configuration loading options.
48 49 50 |
# File 'lib/collapsium-config.rb', line 48 def return || DEFAULT_CONFIG_OPTIONS end |
#config_options=(opts) ⇒ Object
Set configuration loading options
43 44 45 |
# File 'lib/collapsium-config.rb', line 43 def (opts) = opts end |