Sha256: 746dada93cf378282e6ca00058bf873dc2d5f2e167c83b5970009d4c961aa270

Contents?: true

Size: 206 Bytes

Versions: 4

Compression:

Stored size: 206 Bytes

Contents

module BridgeClient
  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

4 entries across 4 versions & 1 rubygems

Version Path
bridge_client-0.4.0 lib/bridge_client/coercers/indifferent_hash.rb
bridge_client-0.3.0 lib/bridge_client/coercers/indifferent_hash.rb
bridge_client-0.2.0 lib/bridge_client/coercers/indifferent_hash.rb
bridge_client-0.1.0 lib/bridge_client/coercers/indifferent_hash.rb