Class: ConfigMapper::ErrorProxy
- Inherits:
-
Object
- Object
- ConfigMapper::ErrorProxy
- Defined in:
- lib/config_mapper/error_proxy.rb
Overview
Wraps a Hash of errors, injecting prefixes
Instance Method Summary collapse
- #[]=(key, value) ⇒ Object
-
#initialize(errors, prefix) ⇒ ErrorProxy
constructor
A new instance of ErrorProxy.
Constructor Details
#initialize(errors, prefix) ⇒ ErrorProxy
Returns a new instance of ErrorProxy.
7 8 9 10 |
# File 'lib/config_mapper/error_proxy.rb', line 7 def initialize(errors, prefix) @errors = errors @prefix = prefix end |
Instance Method Details
#[]=(key, value) ⇒ Object
12 13 14 |
# File 'lib/config_mapper/error_proxy.rb', line 12 def []=(key, value) errors[prefix + key] = value end |