Permalink
Fetching contributors…
Cannot retrieve contributors at this time
329 lines (223 sloc) 11.1 KB
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Module: RConfig</title>
<link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
<script src="./js/jquery.js" type="text/javascript"
charset="utf-8"></script>
<script src="./js/thickbox-compressed.js" type="text/javascript"
charset="utf-8"></script>
<script src="./js/quicksearch.js" type="text/javascript"
charset="utf-8"></script>
<script src="./js/darkfish.js" type="text/javascript"
charset="utf-8"></script>
</head>
<body class="module">
<div id="metadata">
<div id="home-metadata">
<div id="home-section" class="section">
<h3 class="section-header">
<a href="./index.html">Home</a>
<a href="./index.html#classes">Classes</a>
<a href="./index.html#methods">Methods</a>
</h3>
</div>
</div>
<div id="file-metadata">
<div id="file-list-section" class="section">
<h3 class="section-header">In Files</h3>
<div class="section-body">
<ul>
<li><a href="./lib/generators/rconfig/install_generator_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/generators/rconfig/install_generator.rb">lib/generators/rconfig/install_generator.rb</a></li>
<li><a href="./lib/rconfig/callbacks_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/rconfig/callbacks.rb">lib/rconfig/callbacks.rb</a></li>
<li><a href="./lib/rconfig/cascade_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/rconfig/cascade.rb">lib/rconfig/cascade.rb</a></li>
<li><a href="./lib/rconfig/config_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/rconfig/config.rb">lib/rconfig/config.rb</a></li>
<li><a href="./lib/rconfig/constants_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/rconfig/constants.rb">lib/rconfig/constants.rb</a></li>
<li><a href="./lib/rconfig/core_methods_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/rconfig/core_methods.rb">lib/rconfig/core_methods.rb</a></li>
<li><a href="./lib/rconfig/exceptions_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/rconfig/exceptions.rb">lib/rconfig/exceptions.rb</a></li>
<li><a href="./lib/rconfig/load_paths_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/rconfig/load_paths.rb">lib/rconfig/load_paths.rb</a></li>
<li><a href="./lib/rconfig/logger_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/rconfig/logger.rb">lib/rconfig/logger.rb</a></li>
<li><a href="./lib/rconfig/properties_file_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/rconfig/properties_file.rb">lib/rconfig/properties_file.rb</a></li>
<li><a href="./lib/rconfig/reload_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/rconfig/reload.rb">lib/rconfig/reload.rb</a></li>
<li><a href="./lib/rconfig/settings_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/rconfig/settings.rb">lib/rconfig/settings.rb</a></li>
<li><a href="./lib/rconfig/utils_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/rconfig/utils.rb">lib/rconfig/utils.rb</a></li>
<li><a href="./lib/rconfig_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
class="thickbox" title="lib/rconfig.rb">lib/rconfig.rb</a></li>
</ul>
</div>
</div>
</div>
<div id="class-metadata">
<!-- Parent Class -->
<!-- Namespace Contents -->
<div id="namespace-list-section" class="section">
<h3 class="section-header">Namespace</h3>
<ul class="link-list">
<li><span class="type">MODULE</span> <a href="RConfig/Callbacks.html">RConfig::Callbacks</a></li>
<li><span class="type">MODULE</span> <a href="RConfig/Cascade.html">RConfig::Cascade</a></li>
<li><span class="type">MODULE</span> <a href="RConfig/Constants.html">RConfig::Constants</a></li>
<li><span class="type">MODULE</span> <a href="RConfig/CoreMethods.html">RConfig::CoreMethods</a></li>
<li><span class="type">MODULE</span> <a href="RConfig/Exceptions.html">RConfig::Exceptions</a></li>
<li><span class="type">MODULE</span> <a href="RConfig/Generators.html">RConfig::Generators</a></li>
<li><span class="type">MODULE</span> <a href="RConfig/LoadPaths.html">RConfig::LoadPaths</a></li>
<li><span class="type">MODULE</span> <a href="RConfig/Reload.html">RConfig::Reload</a></li>
<li><span class="type">MODULE</span> <a href="RConfig/Settings.html">RConfig::Settings</a></li>
<li><span class="type">MODULE</span> <a href="RConfig/Utils.html">RConfig::Utils</a></li>
<li><span class="type">CLASS</span> <a href="RConfig/Config.html">RConfig::Config</a></li>
<li><span class="type">CLASS</span> <a href="RConfig/ConfigError.html">RConfig::ConfigError</a></li>
<li><span class="type">CLASS</span> <a href="RConfig/DisabledLogger.html">RConfig::DisabledLogger</a></li>
<li><span class="type">CLASS</span> <a href="RConfig/InvalidLoadPathError.html">RConfig::InvalidLoadPathError</a></li>
<li><span class="type">CLASS</span> <a href="RConfig/Logger.html">RConfig::Logger</a></li>
<li><span class="type">CLASS</span> <a href="RConfig/PropertiesFile.html">RConfig::PropertiesFile</a></li>
</ul>
</div>
<!-- Method Quickref -->
<!-- Included Modules -->
</div>
<div id="project-metadata">
<div id="fileindex-section" class="section project-section">
<h3 class="section-header">Files</h3>
<ul>
<li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
</ul>
</div>
<div id="classindex-section" class="section project-section">
<h3 class="section-header">Class Index
<span class="search-toggle"><img src="./images/find.png"
height="16" width="16" alt="[+]"
title="show/hide quicksearch" /></span></h3>
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
<fieldset>
<legend>Quicksearch</legend>
<input type="text" name="quicksearch" value=""
class="quicksearch-field" />
</fieldset>
</form>
<ul class="link-list">
<li><a href="./RConfig.html">RConfig</a></li>
<li><a href="./RConfig/Callbacks.html">RConfig::Callbacks</a></li>
<li><a href="./RConfig/Cascade.html">RConfig::Cascade</a></li>
<li><a href="./RConfig/Config.html">RConfig::Config</a></li>
<li><a href="./RConfig/ConfigError.html">RConfig::ConfigError</a></li>
<li><a href="./RConfig/Constants.html">RConfig::Constants</a></li>
<li><a href="./RConfig/CoreMethods.html">RConfig::CoreMethods</a></li>
<li><a href="./RConfig/DisabledLogger.html">RConfig::DisabledLogger</a></li>
<li><a href="./RConfig/Exceptions.html">RConfig::Exceptions</a></li>
<li><a href="./RConfig/Generators.html">RConfig::Generators</a></li>
<li><a href="./RConfig/Generators/InstallGenerator.html">RConfig::Generators::InstallGenerator</a></li>
<li><a href="./RConfig/InvalidLoadPathError.html">RConfig::InvalidLoadPathError</a></li>
<li><a href="./RConfig/LoadPaths.html">RConfig::LoadPaths</a></li>
<li><a href="./RConfig/PropertiesFile.html">RConfig::PropertiesFile</a></li>
<li><a href="./RConfig/Reload.html">RConfig::Reload</a></li>
<li><a href="./RConfig/Settings.html">RConfig::Settings</a></li>
<li><a href="./RConfig/Utils.html">RConfig::Utils</a></li>
<li><a href="./Array.html">Array</a></li>
<li><a href="./Hash.html">Hash</a></li>
<li><a href="./NilClass.html">NilClass</a></li>
<li><a href="./String.html">String</a></li>
</ul>
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
</div>
</div>
</div>
<div id="documentation">
<h1 class="module">RConfig</h1>
<div id="description">
<p>
Copyright &#169; 2009 Rahmal Conda <rahmal@gmail.com>
</p>
<p>
<a href="RConfig/Config.html">Config</a> 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.
</p>
<hr style="height: 1px"></hr><p>
Copyright &#169; 2009 Rahmal Conda <rahmal@gmail.com>
</p>
<hr style="height: 1px"></hr><p>
Copyright &#169; 2009 Rahmal Conda <rahmal@gmail.com>
</p>
<p>
<a href="RConfig.html">RConfig</a> <a
href="RConfig/Exceptions.html">Exceptions</a>
</p>
<hr style="height: 1px"></hr><p>
Copyright &#169; 2009 Rahmal Conda <rahmal@gmail.com>
</p>
<p>
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:
</p>
<pre>
server_url=host.domain.com
server_port=8080
</pre>
<p>
Secondly, it can have properties grouped into catagories. The group names
must be specified within brackets like [ &#8230; ]
</p>
<pre>
[server]
url=host.domain.com
port=8080
</pre>
<p>
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> &#8220;<name>&#8221; ]
</p>
<pre>
[host &quot;dev&quot;]
domain=dev.server.com
[host &quot;prod&quot;]
domain=www.server.com
</pre>
<p>
These can be retrieved using dot-notation or variable to do it dynamically.
</p>
<pre>
RConfig.props.host.dev.domain
* or -
RConfig.props.host[env].domain (where env is 'dev' or 'prod')</pre>
</div>
<!-- Constants -->
<div id="constants-list" class="section">
<h3 class="section-header">Constants</h3>
<dl>
<dt><a name="VERSION">VERSION</a></dt>
<dd class="description"></dd>
</dl>
</div>
<!-- Attributes -->
<!-- Methods -->
</div>
<div id="rdoc-debugging-section-dump" class="debugging-section">
<p>Disabled; run with --debug to generate this.</p>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
Rdoc Generator</a> 1.1.6</small>.</p>
</div>
</body>
</html>