Skip to content

Commit

Permalink
Provide [] method on ParseConfig object
Browse files Browse the repository at this point in the history
Closes #5

Signed-off-by: Tim Ekl <lithium3141@gmail.com>
  • Loading branch information
timothyekl committed May 24, 2012
1 parent 5759cb8 commit 6feee4a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/parseconfig.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6feee4a

Please sign in to comment.