Module: BSON::DateTime
- Defined in:
- lib/bson/date_time.rb
Overview
Injects behaviour for encoding date time values to raw bytes as specified by the BSON spec for time.
Instance Method Summary collapse
-
#to_bson(buffer = ByteBuffer.new) ⇒ BSON::ByteBuffer
Get the date time as encoded BSON.
Instance Method Details
#to_bson(buffer = ByteBuffer.new) ⇒ BSON::ByteBuffer
Get the date time as encoded BSON.
39 40 41 |
# File 'lib/bson/date_time.rb', line 39 def to_bson(buffer = ByteBuffer.new) gregorian.to_time.to_bson(buffer) end |