Sha256: cf2343fa358d6c6d0b4438fd3092aed801fd81a32a3ee0846918d0446510251a
Contents?: true
Size: 561 Bytes
Versions: 2
Compression:
Stored size: 561 Bytes
Contents
module Throttle class Client include Bandwidth def status pipes = Pipe.all status = "" pipes.each do |p| status += "#{p.bandwidth}" end status = "No Limits." if status.empty? return status end def reset Pipe.reset status end def limit(bandwidth) Pipe.reset options = { :id => 1, :bandwidth => parse_bandwidth(bandwidth) } Pipe.new(options).set status end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
throttle-0.0.2 | lib/throttle/client.rb |
throttle-0.0.1 | lib/throttle/client.rb |