Class: Pec::Network::Subnet
- Inherits:
-
Object
- Object
- Pec::Network::Subnet
- Extended by:
- Query
- Defined in:
- lib/pec/network/subnet.rb
Class Method Summary collapse
Methods included from Query
Class Method Details
.fetch(cidr) ⇒ Object
6 7 8 9 10 |
# File 'lib/pec/network/subnet.rb', line 6 def fetch(cidr) subnet = list.find {|p| p["cidr"] == cidr } raise(Pec::Errors::Subnet, "cidr:#{cidr} is not fond!") unless subnet subnet end |