Sha256: ec64affd8a8204334931dc13d9e8000c90a8c0c728c0fe9ecb7d974e1e749b04
Contents?: true
Size: 587 Bytes
Versions: 32
Compression:
Stored size: 587 Bytes
Contents
module Tdc # # Knows how to transform the result of calling the TestDefinitionReader#read method from an Array # of Hash instances into an Array of ActiveSupport::HashWithIndifferentAccess instances. # module WithIndifferentAccessDecorator def read(*path_elements) definitions = super raise Tdc::FatalError, "Use 'with_indifferent_access' only for an Array" unless definitions.is_a?(Array) definitions.map do |definition| definition.is_a?(Hash) ? ActiveSupport::HashWithIndifferentAccess.new(definition) : definition end end end end
Version data entries
32 entries across 32 versions & 1 rubygems