The Ruber Settings Framework

The backend

The backend is the responsible for writing the options to file and reading them from there. It should provide the following methods: A constructor:: it should read all the contents of the file and store it. The file shouldn’t be read anymore from that point, unless explicitly requested. [opt]:: returns the value of the option opt_. See addoption for an explaination of what opt is. Additional methods provided by opt may be used to determine its value. If no value for opt is included in the file, the default value should be returned. Note that, while the backend is free to store the values for the different options however it wants, it must make sure that options with the same names, but belonging to different groups don’t clash. write(data):: writes the options back to file. data is an hash whose keys are the objects describing the options (see add_option) and whose values are the actual values of the options.