Sha256: 7a52d969293385158642b12fc455e32b76c053b1a62ed72d442d342d05dde0a9

Contents?: true

Size: 631 Bytes

Versions: 170

Compression:

Stored size: 631 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc
  module Errors #:nodoc

    # This exception is raised when a bad value is attempted to be converted to
    # a date or time.
    class InvalidTime < MongoidError

      attr_reader :klass, :value

      # Create the new invalid date error.
      #
      # @example Create the new invalid date error.
      #   InvalidTime.new("this is not a time")
      #
      # @param [ Object ] value The value that was attempted.
      #
      # @since 2.3.1
      def initialize(value)
        @value = value
        super(translate("invalid_time", { :value => value }))
      end
    end
  end
end

Version data entries

170 entries across 78 versions & 4 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.5 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.5 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.4 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.4 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.4 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.3 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.3 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.3 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/errors/invalid_time.rb
mongoid-2.8.1 lib/mongoid/errors/invalid_time.rb
mongoid-2.8.0 lib/mongoid/errors/invalid_time.rb
classiccms-0.7.2 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.2 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.2 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.1 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.1 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.1 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.0 vendor/bundle/gems/mongoid-2.4.9/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.0 vendor/bundle/gems/mongoid-2.4.7/lib/mongoid/errors/invalid_time.rb
classiccms-0.7.0 vendor/bundle/gems/mongoid-2.4.10/lib/mongoid/errors/invalid_time.rb