Class: PincasterConfig
- Inherits:
-
Object
- Object
- PincasterConfig
- Defined in:
- lib/pincaster_config.rb
Instance Attribute Summary collapse
-
#raw_config ⇒ Object
Returns the value of attribute raw_config.
Instance Method Summary collapse
-
#initialize(config_hash) ⇒ PincasterConfig
constructor
A new instance of PincasterConfig.
- #splat_config ⇒ Object
Constructor Details
#initialize(config_hash) ⇒ PincasterConfig
Returns a new instance of PincasterConfig.
5 6 7 8 |
# File 'lib/pincaster_config.rb', line 5 def initialize(config_hash) @raw_config = config_hash splat_config end |
Instance Attribute Details
#raw_config ⇒ Object
Returns the value of attribute raw_config.
3 4 5 |
# File 'lib/pincaster_config.rb', line 3 def raw_config @raw_config end |
Instance Method Details
#splat_config ⇒ Object
10 11 12 13 14 15 |
# File 'lib/pincaster_config.rb', line 10 def splat_config @raw_config.each_pair do |key, value| self.class.send(:attr_accessor, key.to_sym) self.send(key.to_s+"=", value) end end |