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.



195
196
197
198
# File 'lib/construqt/firewalls.rb', line 195

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

Instance Attribute Details

#firewallObject (readonly)

Returns the value of attribute firewall.



194
195
196
# File 'lib/construqt/firewalls.rb', line 194

def firewall
  @firewall
end

#rulesObject (readonly)

Returns the value of attribute rules.



194
195
196
# File 'lib/construqt/firewalls.rb', line 194

def rules
  @rules
end

Instance Method Details

#addObject



206
207
208
209
210
211
# File 'lib/construqt/firewalls.rb', line 206

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