Class: Time

Inherits:
Object show all
Defined in:
lib/mongo_doc/ext/time.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.cast_from_string(string) ⇒ Object



6
7
8
# File 'lib/mongo_doc/ext/time.rb', line 6

def self.cast_from_string(string)
  Time.parse(string) unless string.blank?
end

Instance Method Details

#to_bson(*args) ⇒ Object



2
3
4
# File 'lib/mongo_doc/ext/time.rb', line 2

def to_bson(*args)
  self
end