Class: Zerbo::ZeoTimeStamp

Inherits:
Packet
  • Object
show all
Defined in:
lib/zerbo.rb

Instance Attribute Summary

Attributes inherited from Packet

#data, #owner, #sequence, #type

Instance Method Summary collapse

Methods inherited from Packet

#guess_length, inherited, #initialize, #name, #to_i

Constructor Details

This class inherits a constructor from Zerbo::Packet

Instance Method Details

#inspectObject



234
235
236
# File 'lib/zerbo.rb', line 234

def inspect
  format_inspect(to_s)
end

#to_sObject



230
231
232
# File 'lib/zerbo.rb', line 230

def to_s
  to_time.strftime('%Y-%m-%dT%H:%M:%S')
end

#to_timeObject



226
227
228
# File 'lib/zerbo.rb', line 226

def to_time
  Time.at(to_i).utc
end