Copyright © 2009 Rahmal Conda
This class parses key/value based properties files used for configuration. It is used by rconfig to import configuration files of the aforementioned format. Unlike yaml, and xml files it can only support three levels. First, it can have root level properties:
server_url=host.domain.com server_port=8080
Secondly, it can have properties grouped into catagories. The group names must be specified within brackets like [ … ]
[server] url=host.domain.com port=8080
Finally, groups can also be qualified with namespaces, similar to git
config files. Group names are same as before, but with namespace in within
the brackets like [
[host "dev"] domain=dev.server.com [host "prod"] domain=www.server.com
These can be retrieved using dot-notation or variable to do it dynamically.
RConfig.props.host.dev.domain * or - RConfig.props.host[env].domain (where env is 'dev' or 'prod')