Class: Construqt::Firewalls::Firewall::Nat

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

Defined Under Namespace

Classes: NatEntry

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(firewall) ⇒ Nat

Returns a new instance of Nat.



155
156
157
158
# File 'lib/construqt/firewalls.rb', line 155

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

Instance Attribute Details

#firewallObject (readonly)

Returns the value of attribute firewall.



154
155
156
# File 'lib/construqt/firewalls.rb', line 154

def firewall
  @firewall
end

#rulesObject (readonly)

Returns the value of attribute rules.



154
155
156
# File 'lib/construqt/firewalls.rb', line 154

def rules
  @rules
end

Instance Method Details

#addObject



190
191
192
193
194
# File 'lib/construqt/firewalls.rb', line 190

def add
  entry = NatEntry.new
  @rules << entry
  entry
end