Class: Puffy::Formatters::Pf::Rule

Inherits:
Base::Rule show all
Defined in:
lib/puffy/formatters/pf.rb

Overview

Pf implementation of a Puffy Rule formatter.

Instance Method Summary collapse

Instance Method Details

#emit_rule(rule) ⇒ Object

Returns a Pf String representation of the provided rule Puffy::Rule.



39
40
41
42
43
44
45
46
47
# File 'lib/puffy/formatters/pf.rb', line 39

def emit_rule(rule)
  parts = []
  parts << emit_action(rule)
  parts << emit_direction(rule)
  parts << emit_quick(rule)
  parts << emit_on(rule)
  parts << emit_what(rule)
  parts.flatten.compact.join(' ')
end