Sha256: 7176d30f2a3c485b85c894aefdc11b3cbd73767313f75413d2fd678daa67ba42
Contents?: true
Size: 305 Bytes
Versions: 10
Compression:
Stored size: 305 Bytes
Contents
class Date def to_bson(*args) { MongoDoc::BSON::CLASS_KEY => self.class.name, 'dt' => strftime, 'sg' => start } end alias start sg unless method_defined?(:start) def self.bson_create(bson_hash, options = nil) Date.parse(*bson_hash.values_at('dt', 'sg')) end end
Version data entries
10 entries across 10 versions & 2 rubygems