Class: CARPS::SystemConfig
- Inherits:
-
YamlConfig
- Object
- YamlConfig
- CARPS::SystemConfig
- 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
Class Method Summary collapse
-
.load ⇒ Object
Load a system file.
Instance Method Summary collapse
-
#initialize ⇒ SystemConfig
constructor
Subclasses must call super.
-
#save ⇒ Object
Save the user config.
Methods inherited from YamlConfig
Constructor Details
#initialize ⇒ SystemConfig
Subclasses must call super
142 143 144 |
# File 'lib/carps/util/config.rb', line 142 def initialize fail_hard true end |
Class Method Details
.load ⇒ Object
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
#save ⇒ Object
Save the user config
155 156 157 |
# File 'lib/carps/util/config.rb', line 155 def save save_file self.class.filepath end |