Class: Puffy::Formatters::Iptables4::Ruleset

Inherits:
Puffy::Formatters::Iptables::Ruleset show all
Defined in:
lib/puffy/formatters/iptables4.rb

Overview

IPv4 Iptables implementation of a Puffy Ruleset formatter.

Instance Method Summary collapse

Methods inherited from Puffy::Formatters::Iptables::Ruleset

known_conntrack_helpers

Methods inherited from Base::Ruleset

#emit_header, #initialize

Constructor Details

This class inherits a constructor from Puffy::Formatters::Base::Ruleset

Instance Method Details

#emit_ruleset(rules, policy = :block) ⇒ Object

Return an IPv4 Iptables String representation of the provided rules Puffy::Rule with the policy policy.



9
10
11
# File 'lib/puffy/formatters/iptables4.rb', line 9

def emit_ruleset(rules, policy = :block)
  super(rules.select(&:ipv4?), policy)
end

#filename_fragmentObject



13
14
15
# File 'lib/puffy/formatters/iptables4.rb', line 13

def filename_fragment
  ['iptables', 'rules.v4']
end