Class: Chore::Configuration
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Chore::Configuration
- Defined in:
- lib/chore/configuration.rb
Overview
Wrapper around an OpenStruct to define configuration data TODO: Add required opts, and validate that they're set
Instance Method Summary collapse
-
#merge_hash(hsh = {}) ⇒ Object
Helper method to make merging Hashes into OpenStructs easier.
Instance Method Details
#merge_hash(hsh = {}) ⇒ Object
Helper method to make merging Hashes into OpenStructs easier
6 7 8 9 10 11 |
# File 'lib/chore/configuration.rb', line 6 def merge_hash(hsh={}) hsh.keys.each do |k| self.send("#{k.to_sym}=",hsh[k]) end self end |