Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/bandicoot/msgpack_time.rb

Overview

As it turns out, serializing Time is something we should support for this sort of application

Instance Method Summary collapse

Instance Method Details

#to_msgpack(out = '') ⇒ Object



4
5
6
# File 'lib/bandicoot/msgpack_time.rb', line 4

def to_msgpack(out='')
  {"__type__" => "unixts", "ts" => self.to_i}.to_msgpack(out)
end