Sha256: d880fe88cd21eedf17c8ae7fa62cf136d1311b6ce9c0db9da62811a130631651

Contents?: true

Size: 171 Bytes

Versions: 5

Compression:

Stored size: 171 Bytes

Contents

module BluepanClient
  class IndifferentHash < Virtus::Attribute
    def coerce(value)
      value.is_a?(::Hash) ? value.with_indifferent_access : value
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bluepan_client-1.0.0 lib/bluepan_client/indifferent_hash.rb
bluepan_client-0.4.0 lib/bluepan_client/indifferent_hash.rb
bluepan_client-0.3.0 lib/bluepan_client/indifferent_hash.rb
bluepan_client-0.2.0 lib/bluepan_client/indifferent_hash.rb
bluepan_client-0.1.0 lib/bluepan_client/indifferent_hash.rb