Sha256: 08babdb8ccf3776daf1f1f54994691ca134a24643a1446c7a6852a399b515b4a

Contents?: true

Size: 323 Bytes

Versions: 1

Compression:

Stored size: 323 Bytes

Contents

module ConfigMapper

  # Wraps a Hash of errors, injecting prefixes
  #
  class ErrorProxy

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

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

    private

    attr_reader :errors
    attr_reader :prefix

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
config_mapper-1.0.0 lib/config_mapper/error_proxy.rb