Class: Conf
- Inherits:
-
Object
- Object
- Conf
- Defined in:
- lib/bolt_train_runner/conf.rb
Constant Summary collapse
- CONFFILE =
File.('~/.bolttrain/config')
- CONFDIR =
File.split(CONFFILE)[0]
Instance Attribute Summary collapse
-
#CONFFILE ⇒ Object
readonly
Returns the value of attribute CONFFILE.
Class Method Summary collapse
Instance Attribute Details
#CONFFILE ⇒ Object (readonly)
Returns the value of attribute CONFFILE.
4 5 6 |
# File 'lib/bolt_train_runner/conf.rb', line 4 def CONFFILE @CONFFILE end |
Class Method Details
.debug ⇒ Object
19 20 21 22 |
# File 'lib/bolt_train_runner/conf.rb', line 19 def self.debug conf = load_conf conf['debug'] || false end |
.load_conf ⇒ Object
11 12 13 |
# File 'lib/bolt_train_runner/conf.rb', line 11 def self.load_conf YAML.load_file(CONFFILE) end |
.save_conf(conf) ⇒ Object
15 16 17 |
# File 'lib/bolt_train_runner/conf.rb', line 15 def self.save_conf(conf) File.write(CONFFILE, conf.to_yaml) end |