Module: Billy::Config
- Included in:
- Brain
- Defined in:
- lib/billygoat/config.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
- #config_path ⇒ Object
- #create_config_path ⇒ Object
-
#save_configuration ⇒ Object
Save all in-memory configuration to disk.
Instance Attribute Details
#config_dir ⇒ Object
10 11 12 |
# File 'lib/billygoat/config.rb', line 10 def config_dir @config_dir ||= ".goat" end |
#root ⇒ Object
5 6 7 |
# File 'lib/billygoat/config.rb', line 5 def root @root ||= ENV['HOME'] end |
Instance Method Details
#config_path ⇒ Object
15 16 17 |
# File 'lib/billygoat/config.rb', line 15 def config_path "#{root}/#{config_dir}" end |
#create_config_path ⇒ Object
19 20 21 |
# File 'lib/billygoat/config.rb', line 19 def create_config_path create_path(config_path) end |
#save_configuration ⇒ Object
Save all in-memory configuration to disk
26 27 28 29 30 31 |
# File 'lib/billygoat/config.rb', line 26 def save_configuration save_settings update_knowledge save_knowledge save_credentials end |