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.



132
133
134
135
# File 'lib/construqt/firewalls.rb', line 132

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

Instance Attribute Details

#firewallObject (readonly)

Returns the value of attribute firewall.



131
132
133
# File 'lib/construqt/firewalls.rb', line 131

def firewall
  @firewall
end

#rulesObject (readonly)

Returns the value of attribute rules.



131
132
133
# File 'lib/construqt/firewalls.rb', line 131

def rules
  @rules
end

Instance Method Details

#addObject



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