Class: Mongomatic::TypeConverters::Time
- Inherits:
-
Base
- Object
- Base
- Mongomatic::TypeConverters::Time
show all
- Defined in:
- lib/mongomatic/type_converters.rb
Instance Method Summary
collapse
Methods inherited from Base
#cast, #initialize
Instance Method Details
#convert_orig_val ⇒ Object
106
107
108
109
110
|
# File 'lib/mongomatic/type_converters.rb', line 106
def convert_orig_val
::Time.parse(@orig_val.to_s)
rescue ArgumentError => e
nil
end
|
#type_match? ⇒ Boolean
102
103
104
|
# File 'lib/mongomatic/type_converters.rb', line 102
def type_match?
@orig_val.kind_of? ::Time
end
|