Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

class method

ACL.new

new(list=nil, order = DENY_ALLOW)

Creates a new ACL from list with an evaluation order of DENY_ALLOW or ALLOW_DENY.

An ACL list is an Array of “allow” or “deny” and an address or address mask or “all” or “*” to match any address:

Example
%w[
  deny all
  allow 192.0.2.2
  allow 192.0.2.128/26
]
See also #allow_addr? #allow_socket? also in 3.2 · 3.1 · 3.0