Sha256: eab73408a7bf613b0ee57484a680cce2b6edc227c60a84676b71ebb1b218cacc
Contents?: true
Size: 404 Bytes
Versions: 7
Compression:
Stored size: 404 Bytes
Contents
module ActiveMocker # @api private class HashProcess attr_accessor :hash, :processor def initialize(hash, processor) @hash = hash @processor = processor @hash_process = {} end def [](val) @hash_process[val] ||= processor.call(hash[val]) end def merge(merge_hash) self.hash = hash.merge(merge_hash.hash) self end end end
Version data entries
7 entries across 7 versions & 1 rubygems