Class UserChoices::XmlConfigFileSource
In: lib/user-choices/sources.rb
Parent: FileSource

Use an XML file as a source of choices. The XML file is parsed with XmlSimple(‘ForceArray’ => false). That means that single elements like <home>Mars</home> are read as the value "Mars", whereas <home>Mars</home><home>Venus</home> is read as ["Mars", "Venus"].


Public Instance methods

Treat filename as the configuration file. filename is expected to be in the home directory. The home directory is found in the same way Rubygems finds it. (First look in environment variables $HOME, $USERPROFILE, $HOMEDRIVE:$HOMEPATH, file expansion of "~" and finally the root.)