Module: Construqt::Firewalls
- Defined in:
- lib/construqt/firewalls.rb
Defined Under Namespace
Modules: Actions, FromToNetAddr, ICMP, InputOutputOnly
Classes: Firewall
Class Method Summary
collapse
Class Method Details
.add(name, &block) ⇒ Object
333
334
335
336
337
338
|
# File 'lib/construqt/firewalls.rb', line 333
def self.add(name, &block)
throw "firewall with this name exists #{name}" if @firewalls[name]
fw = @firewalls[name] = Firewall.new(name)
block.call(fw)
fw
end
|
.find(name) ⇒ Object
340
341
342
343
344
|
# File 'lib/construqt/firewalls.rb', line 340
def self.find(name)
ret = @firewalls[name]
throw "firewall with this name #{name} not found" unless @firewalls[name]
ret
end
|