class Construqt::Firewalls::Firewall

Public Class Methods

new(name) click to toggle source
# File lib/construqt/firewalls.rb, line 63
def initialize(name)
  @name = name
  @raw = Raw.new(self)
  @nat = Nat.new(self)
  @forward = Forward.new(self)
  @host = Host.new(self)
  @ipv4 = true
  @ipv6 = true
end

Public Instance Methods

forward(&block) click to toggle source
# File lib/construqt/firewalls.rb, line 288
def forward(&block)
  block.call(@forward)
end
get_forward() click to toggle source
# File lib/construqt/firewalls.rb, line 284
def get_forward
  @forward
end
get_host() click to toggle source
# File lib/construqt/firewalls.rb, line 313
def get_host
  @host
end
get_nat() click to toggle source
# File lib/construqt/firewalls.rb, line 197
def get_nat
  @nat
end
get_raw() click to toggle source
# File lib/construqt/firewalls.rb, line 145
def get_raw
  @raw
end
host(&block) click to toggle source
# File lib/construqt/firewalls.rb, line 317
def host(&block)
  block.call(@host)
end
ipv4?() click to toggle source
# File lib/construqt/firewalls.rb, line 73
def ipv4?
  @ipv4
end
ipv6?() click to toggle source
# File lib/construqt/firewalls.rb, line 82
def ipv6?
  @ipv6
end
mangle(&block) click to toggle source
# File lib/construqt/firewalls.rb, line 215
def mangle(&block)
  block.call(@mangle)
end
name() click to toggle source
# File lib/construqt/firewalls.rb, line 91
def name
  @name
end
nat(&block) click to toggle source
# File lib/construqt/firewalls.rb, line 201
def nat(&block)
  block.call(@nat)
end
only_ipv4() click to toggle source
# File lib/construqt/firewalls.rb, line 76
def only_ipv4
  @ipv4 = true
  @ipv6 = false
  self.clone
end
only_ipv6() click to toggle source
# File lib/construqt/firewalls.rb, line 85
def only_ipv6
  @ipv4 = false
  @ipv6 = true
  self.clone
end
raw(&block) click to toggle source
# File lib/construqt/firewalls.rb, line 149
def raw(&block)
  block.call(@raw)
end