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, #to_i

Constructor Details

This class inherits a constructor from Zerbo::Packet

Instance Method Details

#inspectObject



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

def inspect
  format_inspect(to_s)
end

#to_sObject



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

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

#to_timeObject



222
223
224
# File 'lib/zerbo.rb', line 222

def to_time
  Time.at(to_i).utc
end