Sha256: 6ce2edd249be6b547a96cc9146c6ec328af55dc5a1b40f075db0cd1b987dddee

Contents?: true

Size: 475 Bytes

Versions: 18

Compression:

Stored size: 475 Bytes

Contents

module Virtus
  class Coercion

    # Coerce Date values
    class Date < Object
      extend TimeCoercions

      primitive ::Date

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

    end # class Date
  end # class Coercion
end # module Virtus

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
virtus-0.5.5 lib/virtus/coercion/date.rb
virtus-0.5.4 lib/virtus/coercion/date.rb
virtus-0.5.3 lib/virtus/coercion/date.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/virtus-0.5.2/lib/virtus/coercion/date.rb
virtus-0.5.2 lib/virtus/coercion/date.rb
virtus-0.5.1 lib/virtus/coercion/date.rb
virtus-0.5.0 lib/virtus/coercion/date.rb
virtus-0.4.2 lib/virtus/coercion/date.rb
virtus-0.4.1 lib/virtus/coercion/date.rb
virtus-0.4.0 lib/virtus/coercion/date.rb
virtus-0.3.0 lib/virtus/coercion/date.rb
virtus-0.2.0 lib/virtus/coercion/date.rb
virtus-0.1.0 lib/virtus/coercion/date.rb
virtus-0.0.10 lib/virtus/coercion/date.rb
virtus-0.0.9 lib/virtus/coercion/date.rb
virtus-0.0.8 lib/virtus/coercion/date.rb
virtus-0.0.7 lib/virtus/coercion/date.rb
virtus-0.0.6 lib/virtus/coercion/date.rb