Class: MessagePack::Time

Inherits:
Object
  • Object
show all
Defined in:
doclib/msgpack/time.rb

Overview

MessagePack::Time provides packer and unpacker functions for a timestamp type.

Examples:

Setup for DefaultFactory

MessagePack::DefaultFactory.register_type(
  MessagePack::Timestamp::TYPE,
  Time,
  packer: MessagePack::Time::Packer,
  unpacker: MessagePack::Time::Unpacker
)

Constant Summary collapse

Packer =

A packer function that packs a Time instance to a MessagePack timestamp.

lambda { |payload|
  # ...
}
Unpacker =

An unpacker function that unpacks a MessagePack timestamp to a Time instance.

lambda { |time|
  # ...
}