diff --git a/lib/parseconfig.rb b/lib/parseconfig.rb index 0dcfc97..3c58024 100644 --- a/lib/parseconfig.rb +++ b/lib/parseconfig.rb @@ -97,6 +97,11 @@ def get_value(param) return self.params[param] end + # This method is a shortcut to accessing the @params variable + def [](param) + return self.params[param] + end + # This method returns all parameters/groups defined in a config file. def get_params() return self.params.keys