Class: Construqt::Firewalls::Firewall::Forward

Inherits:
Object
  • Object
show all
Defined in:
lib/construqt/firewalls.rb

Defined Under Namespace

Classes: ForwardEntry

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(firewall) ⇒ Forward

Returns a new instance of Forward.



221
222
223
224
# File 'lib/construqt/firewalls.rb', line 221

def initialize(firewall)
  @firewall = firewall
  @rules = []
end

Instance Attribute Details

#firewallObject (readonly)

Returns the value of attribute firewall.



220
221
222
# File 'lib/construqt/firewalls.rb', line 220

def firewall
  @firewall
end

#rulesObject (readonly)

Returns the value of attribute rules.



220
221
222
# File 'lib/construqt/firewalls.rb', line 220

def rules
  @rules
end

Instance Method Details

#addObject



276
277
278
279
280
281
# File 'lib/construqt/firewalls.rb', line 276

def add
  entry = ForwardEntry.new
  #puts "ForwardEntry: #{@firewall.name} #{entry.input_only?} #{entry.output_only?}"
  @rules << entry
  entry
end