Class: ConfigMapper::ErrorProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/config_mapper.rb

Overview

Wraps a Hash of errors, injecting prefixes

Instance Method Summary collapse

Constructor Details

#initialize(errors, prefix) ⇒ ErrorProxy

Returns a new instance of ErrorProxy.



81
82
83
84
# File 'lib/config_mapper.rb', line 81

def initialize(errors, prefix)
  @errors = errors
  @prefix = prefix
end

Instance Method Details

#[]=(key, value) ⇒ Object



86
87
88
# File 'lib/config_mapper.rb', line 86

def []=(key, value)
  errors[prefix + key] = value
end