Class: Construqt::Firewalls::Firewall::Forward
- Inherits:
-
Object
- Object
- Construqt::Firewalls::Firewall::Forward
- Defined in:
- lib/construqt/firewalls.rb
Defined Under Namespace
Classes: ForwardEntry
Instance Attribute Summary collapse
-
#firewall ⇒ Object
readonly
Returns the value of attribute firewall.
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
Instance Method Summary collapse
- #add ⇒ Object
-
#initialize(firewall) ⇒ Forward
constructor
A new instance of Forward.
Constructor Details
#initialize(firewall) ⇒ Forward
Returns a new instance of Forward.
132 133 134 135 |
# File 'lib/construqt/firewalls.rb', line 132 def initialize(firewall) @firewall = firewall @rules = [] end |
Instance Attribute Details
#firewall ⇒ Object (readonly)
Returns the value of attribute firewall.
131 132 133 |
# File 'lib/construqt/firewalls.rb', line 131 def firewall @firewall end |
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
131 132 133 |
# File 'lib/construqt/firewalls.rb', line 131 def rules @rules end |
Instance Method Details
#add ⇒ Object
177 178 179 180 181 182 |
# File 'lib/construqt/firewalls.rb', line 177 def add entry = ForwardEntry.new #puts "ForwardEntry: #{@firewall.name} #{entry.input_only?} #{entry.output_only?}" @rules << entry entry end |