Class: MessagePack::Timestamp
- Inherits:
-
Object
- Object
- MessagePack::Timestamp
- Defined in:
- doclib/msgpack/timestamp.rb
Overview
A utility class for MessagePack timestamp type
Constant Summary collapse
- TYPE =
The timestamp extension type defined in the MessagePack spec.
See github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type for details.
-1
Instance Attribute Summary collapse
-
#nsec ⇒ Integer
readonly
Nanosecond part of the timestamp.
-
#sec ⇒ Integer
readonly
Second part of the timestamp.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(sec, nsec) ⇒ Timestamp
constructor
A new instance of Timestamp.
Constructor Details
#initialize(sec, nsec) ⇒ Timestamp
Returns a new instance of Timestamp.
19 20 |
# File 'doclib/msgpack/timestamp.rb', line 19 def initialize(sec, nsec) end |
Instance Attribute Details
#nsec ⇒ Integer (readonly)
Returns Nanosecond part of the timestamp.
15 16 17 |
# File 'doclib/msgpack/timestamp.rb', line 15 def nsec @nsec end |
#sec ⇒ Integer (readonly)
Returns Second part of the timestamp.
12 13 14 |
# File 'doclib/msgpack/timestamp.rb', line 12 def sec @sec end |
Class Method Details
.from_msgpack_ext(data) ⇒ MessagePack::Timestamp
30 31 |
# File 'doclib/msgpack/timestamp.rb', line 30 def self.from_msgpack_ext(data) end |
.to_msgpack_ext(sec, nsec) ⇒ String
41 42 |
# File 'doclib/msgpack/timestamp.rb', line 41 def self.to_msgpack_ext(sec, nsec) end |