Module: Update
- Defined in:
- lib/skills/update.rb
Instance Method Summary collapse
-
#credentials(service, *args) ⇒ Object
Update the credentials for a particular service.
-
#setting(name, value) ⇒ Object
Update a given goat setting.
Instance Method Details
#credentials(service, *args) ⇒ Object
Update the credentials for a particular service
15 16 17 18 19 20 21 22 |
# File 'lib/skills/update.rb', line 15 def credentials(service, *args) args.each do |pair| key, value = pair.split('=') brain.credentials[service.to_sym][key.to_sym] = value end brain.save_credentials puts brain.credentials[service.to_sym].to_yaml end |
#setting(name, value) ⇒ Object
Update a given goat setting
6 7 8 9 10 |
# File 'lib/skills/update.rb', line 6 def setting(name, value) brain.settings[name.to_sym] = value brain.save_settings puts brain.settings[name.to_sym].to_yaml end |