Class: Collectd::Packet::Number

Inherits:
Part
  • Object
show all
Defined in:
lib/collectd/pkt.rb

Direct Known Subclasses

Interval, Severity, Time

Instance Method Summary collapse

Methods inherited from Part

type, #type

Constructor Details

#initialize(n) ⇒ Number

Returns a new instance of Number.



30
31
32
# File 'lib/collectd/pkt.rb', line 30

def initialize(n)
  @n = n
end

Instance Method Details

#to_sObject



33
34
35
# File 'lib/collectd/pkt.rb', line 33

def to_s
  super [@n >> 32, @n & 0xffffffff].pack("NN")
end