Class: BluepanClient::IndifferentHash

Inherits:
Virtus::Attribute
  • Object
show all
Defined in:
lib/bluepan_client/indifferent_hash.rb

Instance Method Summary collapse

Instance Method Details

#coerce(value) ⇒ Object



3
4
5
# File 'lib/bluepan_client/indifferent_hash.rb', line 3

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