lib/virtus/coercion/time_coercions.rb
# Try to use native coercion method on the given value
#
# Falls back to String-based parsing
#
# @param [Date,DateTime,Time] value
# @param [Symbol] method
#
# @return [Date,DateTime,Time]
#
# @api private
Try to use native coercion method on the given value
Falls back to String-based parsing
Try to use native coercion method on the given value Falls back to String - based parsing
def coerce_with_method(value, method)
        coerced = super
        if coerced.equal?(value)
          String.public_send(method, to_string(value))
        else
          coerced
        end
      end
def coerce_with_method ( value , method ) coerced = super if coerced . equal? ( value ) String . public_send ( method , to_string ( value ) ) else coerced end end
Try to use native coercion method on the given value
Falls back to String-based parsing
Try to use native coercion method on the given value Falls back to String - based parsing
None
Date,DateTime,Time
value
<not_specific>
method
<not_specific>
<not_specific>
None
api
None