module RConfig

Copyright © 2009 Rahmal Conda <rahmal@gmail.com>

Config is a special class, derived from HashWithIndifferentAccess. It was specifically created for handling config data or creating mock objects from yaml files. It provides a dotted notation for accessing embedded hash values, similar to the way one might traverse a object tree.

Copyright © 2009 Rahmal Conda <rahmal@gmail.com>

Copyright © 2009 Rahmal Conda <rahmal@gmail.com>

RConfig Exceptions

Copyright © 2009 Rahmal Conda <rahmal@gmail.com>

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 [ <group> “<name>” ]

[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')

Constants

VERSION