Class: Netdisco::PollMap
- Inherits:
-
Object
- Object
- Netdisco::PollMap
- Defined in:
- lib/netdisco/poll_map.rb
Instance Attribute Summary collapse
-
#poll ⇒ Object
readonly
Returns the value of attribute poll.
Instance Method Summary collapse
-
#include?(addr) ⇒ Boolean
判断是否包含某个地址.
-
#initialize ⇒ PollMap
constructor
类对象初始化函数入口.
Constructor Details
Instance Attribute Details
#poll ⇒ Object (readonly)
Returns the value of attribute poll.
7 8 9 |
# File 'lib/netdisco/poll_map.rb', line 7 def poll @poll end |
Instance Method Details
#include?(addr) ⇒ Boolean
判断是否包含某个地址
15 16 17 |
# File 'lib/netdisco/poll_map.rb', line 15 def include?(addr) @poll.any? { |cidr| cidr.include? addr } end |