lib/iptablez/commands/append_chain.rb in iptablez-1.0.2.pre vs lib/iptablez/commands/append_chain.rb in iptablez-1.0.3.pre
- old
+ new
@@ -55,8 +55,18 @@
else
determine_error(chain: name, error: e)
end
end
+ def self.chains(names:, error: false, continue: !error, **args)
+ results = {}
+ names.each do |name|
+ results[name] = chain(name: name, continue: continue, **args) do |name, result|
+ yield [name, result] if block_given?
+ end
+ end
+ results
+ end
+
end
end
end