Class Coercible::Coercer::Hash
In: lib/coercible/coercer/hash.rb
Parent: Object

Coerce Hash values

Methods

Constants

TIME_SEGMENTS = [ :year, :month, :day, :hour, :min, :sec ].freeze

Public Instance methods

Creates a Date instance from a Hash

Valid keys are: :year, :month, :day, :hour

@param [Hash] value

@return [Date]

@api private

Creates a DateTime instance from a Hash

Valid keys are: :year, :month, :day, :hour, :min, :sec

@param [Hash] value

@return [DateTime]

@api private

Creates a Time instance from a Hash

Valid keys are: :year, :month, :day, :hour, :min, :sec

@param [Hash] value

@return [Time]

@api private

[Validate]