Sha256: 458c185a3524e85abce4fe232bea91a48bd6fd6144fce49219c5effff358ab01
Contents?: true
Size: 339 Bytes
Versions: 4
Compression:
Stored size: 339 Bytes
Contents
module ServState class Rotator attr_reader :data, :size def append(values) @data[@size] = [values[:cpu], values[:ram], values[:down], values[:up]] @data.shift end private def initialize(size) @size = size @data = Array.new(@size, [0, 0, 0, 0]) # [cpu, ram, netdown, netup] end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ServState-0.1.3 | lib/ServState/rotator.rb |
ServState-0.1.2 | lib/ServState/rotator.rb |
ServState-0.1.1 | lib/ServState/rotator.rb |
ServState-0.1.0 | lib/ServState/rotator.rb |