本文簡要介紹ruby語言中 ACL.new
的用法。
用法
new(list=nil, order = DENY_ALLOW)
從 list
創建一個新的 ACL
,其評估為 DENY_ALLOW
或 ALLOW_DENY
的 order
。
ACL
list
是 “allow” 或 “deny” 的 Array
和地址或地址掩碼或 “all” 或 “*” 以匹配任何地址:
%w[
deny all
allow 192.0.2.2
allow 192.0.2.128/26
]
相關用法
- Ruby ACL.allow_addr?用法及代碼示例
- Ruby ACL類用法及代碼示例
- Ruby Array.push用法及代碼示例
- Ruby Array.hash用法及代碼示例
- Ruby ARGF.path用法及代碼示例
- Ruby Addrinfo.ip_address用法及代碼示例
- Ruby Array permutation()用法及代碼示例
- Ruby Array.to_a用法及代碼示例
- Ruby Array.to_h用法及代碼示例
- Ruby Array.to_s用法及代碼示例
- Ruby Array class fill()用法及代碼示例
- Ruby Array.array + other_array用法及代碼示例
- Ruby Array product()用法及代碼示例
- Ruby Array zip()用法及代碼示例
- Ruby Array concat()用法及代碼示例
- Ruby Array類用法及代碼示例
- Ruby Addrinfo.connect_from用法及代碼示例
- Ruby Array.take()用法及代碼示例
- Ruby Array.reject!用法及代碼示例
- Ruby ASN1Data.new用法及代碼示例
- Ruby Array.flatten!用法及代碼示例
- Ruby Array.reject用法及代碼示例
- Ruby Array compact!()用法及代碼示例
- Ruby ASN1.decode_all用法及代碼示例
- Ruby Array reject!()用法及代碼示例
注:本文由純淨天空篩選整理自ruby-lang.org大神的英文原創作品 ACL.new。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。