Sha256: b1b8fdb1be8c421acced91e1793c79fb2466450d3bbafcadcfdee4b71ebe7b05

Contents?: true

Size: 475 Bytes

Versions: 6

Compression:

Stored size: 475 Bytes

Contents

module Virtus
  class Coercion

    # Coerce Time values
    class Time < Object
      extend TimeCoercions

      primitive ::Time

      # Passthrough the value
      #
      # @example
      #   Virtus::Coercion::DateTime.to_time(time)  # => Time object
      #
      # @param [DateTime] value
      #
      # @return [Date]
      #
      # @api public
      def self.to_time(value)
        value
      end

    end # class Time
  end # class Coercion
end # module Virtus

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
virtus-0.1.0 lib/virtus/coercion/time.rb
virtus-0.0.10 lib/virtus/coercion/time.rb
virtus-0.0.9 lib/virtus/coercion/time.rb
virtus-0.0.8 lib/virtus/coercion/time.rb
virtus-0.0.7 lib/virtus/coercion/time.rb
virtus-0.0.6 lib/virtus/coercion/time.rb