Method: Net::IP::Route::Collection#flush

Defined in:
lib/net/ip/route/collection.rb

#flush(selector) ⇒ void

This method returns an undefined value.

Flush the routing table based on a selector

Examples:

Flush the routing table cache

Net::IP::Route.flush(:cache)

Parameters:

  • selector (String)

    The selector string.



62
63
64
65
# File 'lib/net/ip/route/collection.rb', line 62

def flush(selector)
  result = `ip route flush #{selector}`
  raise result unless $?.success?
end