Class: CARPS::SystemConfig

Inherits:
YamlConfig show all
Defined in:
lib/carps/util/config.rb

Overview

System configurations, which exist in strictly predefined locations and which should crash the system if they do not exist, because they are critical to its operation.

Direct Known Subclasses

Editor, EmailConfig, Process

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from YamlConfig

#fail_hard, #read

Constructor Details

#initializeSystemConfig

Subclasses must call super



142
143
144
# File 'lib/carps/util/config.rb', line 142

def initialize
   fail_hard true
end

Class Method Details

.loadObject

Load a system file.



147
148
149
150
151
152
# File 'lib/carps/util/config.rb', line 147

def self.load
   config = self.allocate
   config.read self.filepath
   config.fail_hard false 
   config
end

Instance Method Details

#saveObject

Save the user config



155
156
157
# File 'lib/carps/util/config.rb', line 155

def save
   save_file self.class.filepath
end