Sha256: 559de2bdef6e398d15ae5f8324d0fa1536616e6efe6add298fab0012461dc061

Contents?: true

Size: 210 Bytes

Versions: 23

Compression:

Stored size: 210 Bytes

Contents

module BloomRemitClient
  module Coercers
    class IndifferentHash < Virtus::Attribute

      def coerce(value)
        value.is_a?(::Hash) ? value.with_indifferent_access : value
      end

    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
bloom_remit_client-0.4.0 lib/bloom_remit_client/coercers/indifferent_hash.rb
bloom_remit_client-0.3.1 lib/bloom_remit_client/coercers/indifferent_hash.rb
bloom_remit_client-0.3.0 lib/bloom_remit_client/coercers/indifferent_hash.rb