Class: Compel::Coercion::Hash

Inherits:
Type
  • Object
show all
Defined in:
lib/compel/coercion/types/hash.rb

Instance Attribute Summary

Attributes inherited from Type

#options, #value

Instance Method Summary collapse

Methods inherited from Type

#coerce, #initialize

Constructor Details

This class inherits a constructor from Compel::Coercion::Type

Instance Method Details

#coerce_valueObject



6
7
8
# File 'lib/compel/coercion/types/hash.rb', line 6

def coerce_value
  Hashie::Mash.new(value).to_hash rescue nil
end