Sha256: dcae4a7ece19d0d77d44156b746e52f616e13fe9cc1b70989b55a2490c0188d7

Contents?: true

Size: 467 Bytes

Versions: 14

Compression:

Stored size: 467 Bytes

Contents

module Coercible
  class Coercer

    # Coerce Date values
    class Date < Object
      include TimeCoercions

      primitive ::Date

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

    end # class Date

  end # class Coercer
end # module Coercible

Version data entries

14 entries across 12 versions & 4 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/coercible-1.0.0/lib/coercible/coercer/date.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/coercible-1.0.0/lib/coercible/coercer/date.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/coercible-1.0.0/lib/coercible/coercer/date.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/coercible-1.0.0/lib/coercible/coercer/date.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/coercible-1.0.0/lib/coercible/coercer/date.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/coercible-1.0.0/lib/coercible/coercer/date.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/coercible-1.0.0/lib/coercible/coercer/date.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/coercible-1.0.0/lib/coercible/coercer/date.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/coercible-1.0.0/lib/coercible/coercer/date.rb
coercible-1.0.0 lib/coercible/coercer/date.rb
coercible-0.2.0 lib/coercible/coercer/date.rb
coercible-0.1.0 lib/coercible/coercer/date.rb
coercible-0.0.2 lib/coercible/coercer/date.rb
coercible-0.0.1 lib/coercible/coercer/date.rb