Class: RepoManager::Settings
- Includes:
- Extensions::MethodReader, Extensions::MethodWriter
- Defined in:
- lib/repo_manager/settings.rb
Overview
Access setting via symbolized keys or using accessor methods
Instance Method Summary collapse
-
#initialize(working_dir = nil, options = {}) ⇒ Settings
constructor
A new instance of Settings.
Methods included from Extensions::MethodWriter
#convert_key, #method_missing, #respond_to?
Methods included from Extensions::MethodReader
Methods inherited from Hash
#deep_clone, #recursively_stringify_keys!, #recursively_symbolize_keys!, #stringify_keys, #stringify_keys!, #symbolize_keys, #symbolize_keys!, #to_conf
Constructor Details
#initialize(working_dir = nil, options = {}) ⇒ Settings
Returns a new instance of Settings.
25 26 27 28 29 30 31 32 33 |
# File 'lib/repo_manager/settings.rb', line 25 def initialize(working_dir=nil, ={}) @working_dir = working_dir || FileUtils.pwd @configuration = configure(.deep_clone) # call super without args super *[] self.merge!(@configuration) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RepoManager::Extensions::MethodWriter