Exception: Mongoid::Errors::InvalidTime
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::InvalidTime
- Defined in:
- lib/mongoid/errors/invalid_time.rb
Overview
This exception is raised when a bad value is attempted to be converted to a date or time.
Constant Summary
Constants inherited from MongoidError
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value) ⇒ InvalidTime
constructor
Create the new invalid date error.
Methods inherited from MongoidError
Constructor Details
#initialize(value) ⇒ InvalidTime
Create the new invalid date error.
19 20 21 22 |
# File 'lib/mongoid/errors/invalid_time.rb', line 19 def initialize(value) @value = value super(translate("invalid_time", { :value => value })) end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
9 10 11 |
# File 'lib/mongoid/errors/invalid_time.rb', line 9 def klass @klass end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
9 10 11 |
# File 'lib/mongoid/errors/invalid_time.rb', line 9 def value @value end |