Class: CollectdServer::Packet::Number

Inherits:
Part
  • Object
show all
Defined in:
lib/collectd_server/packet.rb

Direct Known Subclasses

Interval, Time

Instance Attribute Summary

Attributes inherited from Part

#content

Instance Method Summary collapse

Methods inherited from Part

add_type, class_for, part_for, type

Constructor Details

#initialize(content) ⇒ Number

Returns a new instance of Number.



108
109
110
111
# File 'lib/collectd_server/packet.rb', line 108

def initialize(content)
  big, small = content.unpack('NN')
  @content = (big << 32) + (small)
end