Sha256: 5dd5acedc51e1b08cdcb3389d006189569f933b1a4cd6e31a9cabd6394235fd1

Contents?: true

Size: 499 Bytes

Versions: 16

Compression:

Stored size: 499 Bytes

Contents

module Coercible
  class Coercer

    # Coerce DateTime values
    class DateTime < Object
      primitive ::DateTime

      include TimeCoercions

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

    end # class DateTime

  end # class Coercer
end # module Coercible

Version data entries

16 entries across 14 versions & 5 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/coercible-1.0.0/lib/coercible/coercer/date_time.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/coercible-1.0.0/lib/coercible/coercer/date_time.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/coercible-1.0.0/lib/coercible/coercer/date_time.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/coercible-1.0.0/lib/coercible/coercer/date_time.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/coercible-1.0.0/lib/coercible/coercer/date_time.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/coercible-1.0.0/lib/coercible/coercer/date_time.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_time.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_time.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/coercible-1.0.0/lib/coercible/coercer/date_time.rb
coercible-1.0.0 lib/coercible/coercer/date_time.rb
motion_coercible-0.2.0.2 lib/project/coercer/date_time.rb
motion_coercible-0.2.0.1 lib/project/coercer/date_time.rb
coercible-0.2.0 lib/coercible/coercer/date_time.rb
coercible-0.1.0 lib/coercible/coercer/date_time.rb
coercible-0.0.2 lib/coercible/coercer/date_time.rb
coercible-0.0.1 lib/coercible/coercer/date_time.rb