Class: Construqt::Firewalls::Firewall::Host

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

Defined Under Namespace

Classes: HostEntry

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(firewall) ⇒ Host

Returns a new instance of Host.



294
295
296
297
# File 'lib/construqt/firewalls.rb', line 294

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

Instance Attribute Details

#firewallObject (readonly)

Returns the value of attribute firewall.



293
294
295
# File 'lib/construqt/firewalls.rb', line 293

def firewall
  @firewall
end

#rulesObject (readonly)

Returns the value of attribute rules.



293
294
295
# File 'lib/construqt/firewalls.rb', line 293

def rules
  @rules
end

Instance Method Details

#addObject



305
306
307
308
309
310
# File 'lib/construqt/firewalls.rb', line 305

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