Method: Codger::Manager#initialize
- Defined in:
- lib/codger/manager.rb
#initialize(path) ⇒ Manager
Create an instance with project-level settings stored at the specified path (does not need to exist yet, and will not be created unless necessary).
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/codger/manager.rb', line 25 def initialize(path) @project_path = path @project_settings = { runs: [] }.with_indifferent_access if File.exists?(@project_path) @project_settings.merge! YAML.load(File.read(@project_path)) end @global_settings = { config: { diff: 'diff -ur %SOURCE %DEST' }, cached: {} }.with_indifferent_access if File.exists?(globals_path) @global_settings.merge! YAML.load(File.read(globals_path)) end end |