Sha256: 82d06b7cea7c4f614ebb278c684710cd31170b3a193a92a82a9eb3328ae311ed

Contents?: true

Size: 708 Bytes

Versions: 1

Compression:

Stored size: 708 Bytes

Contents

# frozen_string_literal: true

module Puffy
  module Formatters
    module Netfilter6 # :nodoc:
      # IPv6 Netfilter implementation of a Puffy Ruleset formatter.
      class Ruleset < Puffy::Formatters::Netfilter::Ruleset # :nodoc:
        # Return an IPv6 Netfilter String representation of the provided +rules+ Puffy::Rule with the +policy+ policy.
        def emit_ruleset(rules, policy = :block)
          super(rules.select(&:ipv6?), policy)
        end

        def filename_fragment
          ['netfilter', 'rules.v6']
        end
      end

      # IPv6 Netfilter implementation of a Puffy Rule formatter.
      class Rule < Puffy::Formatters::Netfilter::Rule # :nodoc:
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
puffy-0.1.0 lib/puffy/formatters/netfilter6.rb