Class: Reyes::IPTables::Rule
- Inherits:
-
Object
- Object
- Reyes::IPTables::Rule
- Defined in:
- lib/reyes/iptables.rb
Constant Summary collapse
- IPTABLES =
"iptables"
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
Instance Method Summary collapse
-
#initialize(cmd) ⇒ Rule
constructor
A new instance of Rule.
- #materialize ⇒ Object
Constructor Details
#initialize(cmd) ⇒ Rule
Returns a new instance of Rule.
81 82 83 |
# File 'lib/reyes/iptables.rb', line 81 def initialize(cmd) @cmd = cmd end |
Instance Attribute Details
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
80 81 82 |
# File 'lib/reyes/iptables.rb', line 80 def cmd @cmd end |
Instance Method Details
#materialize ⇒ Object
85 86 87 88 |
# File 'lib/reyes/iptables.rb', line 85 def materialize cmd = [IPTABLES] + @cmd Subprocess.check_call(cmd) end |