Class RHC::Vendor::ParseConfig
In: lib/rhc/vendor/parseconfig.rb
Parent: Object

Methods

Constants

Version = '1.0.2'

Attributes

config_file  [RW] 
groups  [RW] 
params  [RW] 

Public Class methods

Initialize the class with the path to the ‘config_file’ The class objects are dynamically generated by the name of the ‘param’ in the config file. Therefore, if the config file is ‘param = value’ then the itializer will eval "@param = value"

Public Instance methods

This method is a shortcut to accessing the @params variable

This method adds an element to the config object (not the config file) By adding a Hash, you create a new group

Add parameters to a group. Note that parameters with the same name could be placed in different groups

List available sub-groups of the config.

This method returns all parameters/groups defined in a config file.

This method will provide the value held by the object "@param" where "@param" is actually the name of the param in the config file.

DEPRECATED - will be removed in future versions

Import data from the config to our config object.

Validate the config file, and contents

Writes out the config file to output_stream

[Validate]