Module: Throttle::Ipfw
Instance Method Summary collapse
Instance Method Details
#ipfw(args) ⇒ Object
3 4 5 |
# File 'lib/throttle/ipfw.rb', line 3 def ipfw(args) `sudo ipfw #{args}` end |
#parse_pipe_id(str) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/throttle/ipfw.rb', line 7 def parse_pipe_id(str) if /^\d{5} pipe (\d*) .*$/.match(str) Regexp.last_match(1).to_i else nil end end |