Class: Moped::BSON::Timestamp
- Defined in:
- lib/moped/bson/timestamp.rb
Instance Attribute Summary collapse
-
#increment ⇒ Object
Returns the value of attribute increment.
-
#seconds ⇒ Object
Returns the value of attribute seconds.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#increment ⇒ Object
Returns the value of attribute increment
3 4 5 |
# File 'lib/moped/bson/timestamp.rb', line 3 def increment @increment end |
#seconds ⇒ Object
Returns the value of attribute seconds
3 4 5 |
# File 'lib/moped/bson/timestamp.rb', line 3 def seconds @seconds end |
Class Method Details
.__bson_load__(io) ⇒ Object
5 6 7 |
# File 'lib/moped/bson/timestamp.rb', line 5 def __bson_load__(io) new(*io.read(8).unpack('l2').reverse) end |
Instance Method Details
#__bson_dump__(io, key) ⇒ Object
10 11 12 |
# File 'lib/moped/bson/timestamp.rb', line 10 def __bson_dump__(io, key) io << [17, key, increment, seconds].pack('cZ*l2') end |