Konfigurationsdaten aus YAML-Files laden 0

Posted by fwoeck
on Wednesday, November 05

.. mehr Text!

config.yml:

---
from:
  jid: bot@passenger.int.bm.net/Office
  password: geheim
to:
  jid: me@passenger.int.bm.net
vcard:
  nickname: XMPP Bot
  fn: XMPP Bot
  url: http://passenger
  photo_path: avatar-red.png
require 'yaml'

config   = YAML.load_file('config.yml')
username = config['from']['jid']
password = config['from']['password']

FIXME