Class: Construqt::Firewalls::Firewall::Forward::ForwardEntry

Inherits:
Object
  • Object
show all
Includes:
Construqt::Firewalls::FromToNetAddr, InputOutputOnly, Util::Chainable
Defined in:
lib/construqt/firewalls.rb

Direct Known Subclasses

Host::HostEntry

Instance Method Summary collapse

Methods included from InputOutputOnly

#input_only, #input_only?, #output_only, #output_only?

Methods included from Construqt::Firewalls::FromToNetAddr

#from_net_addr, #get_from_net_addr, #get_to_net_addr, #to_net_addr

Methods included from Util::Chainable

chainable_attr, chainable_attr_value, included

Constructor Details

#initializeForwardEntry

Returns a new instance of ForwardEntry.



250
251
252
# File 'lib/construqt/firewalls.rb', line 250

def initialize
  @from_is = nil
end

Instance Method Details

#from_is(direction) ⇒ Object



260
261
262
263
# File 'lib/construqt/firewalls.rb', line 260

def from_is(direction)
  @from_is = direction
  self
end

#from_is_inbound?Boolean

Returns:

  • (Boolean)


254
255
256
# File 'lib/construqt/firewalls.rb', line 254

def from_is_inbound?
  @from_is == :inbound
end

#from_is_outbound?Boolean

Returns:

  • (Boolean)


257
258
259
# File 'lib/construqt/firewalls.rb', line 257

def from_is_outbound?
  @from_is == :outbound
end

#get_portsObject



271
272
273
# File 'lib/construqt/firewalls.rb', line 271

def get_ports
  @ports ||= []
end

#port(port) ⇒ Object



265
266
267
268
269
# File 'lib/construqt/firewalls.rb', line 265

def port(port)
  @ports ||= []
  @ports << port
  self
end