Sha256: 567319500f0cf81c143c48aecb31a664b74c118a615ffe249dca36ee5558c1ce

Contents?: true

Size: 207 Bytes

Versions: 7

Compression:

Stored size: 207 Bytes

Contents

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

7 entries across 7 versions & 1 rubygems

Version Path
stellar_client-0.8.0 lib/stellar_client/coercers/indifferent_hash.rb
stellar_client-0.7.0 lib/stellar_client/coercers/indifferent_hash.rb
stellar_client-0.6.1 lib/stellar_client/coercers/indifferent_hash.rb
stellar_client-0.6.0 lib/stellar_client/coercers/indifferent_hash.rb
stellar_client-0.5.2 lib/stellar_client/coercers/indifferent_hash.rb
stellar_client-0.5.1 lib/stellar_client/coercers/indifferent_hash.rb
stellar_client-0.5.0 lib/stellar_client/coercers/indifferent_hash.rb