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

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

Direct Known Subclasses

Host::HostEntry

Instance Method Summary collapse

Methods included from Util::Chainable

chainable_attr, chainable_attr_value, included

Constructor Details

#initializeForwardEntry

Returns a new instance of ForwardEntry.



152
153
154
# File 'lib/construqt/firewalls.rb', line 152

def initialize
  @from_is = nil
end

Instance Method Details

#from_is(direction) ⇒ Object



162
163
164
# File 'lib/construqt/firewalls.rb', line 162

def from_is(direction)
  @from_is = direction
end

#from_is_inbound?Boolean

Returns:

  • (Boolean)


156
157
158
# File 'lib/construqt/firewalls.rb', line 156

def from_is_inbound?
  @from_is == :inbound
end

#from_is_outbound?Boolean

Returns:

  • (Boolean)


159
160
161
# File 'lib/construqt/firewalls.rb', line 159

def from_is_outbound?
  @from_is == :outbound
end

#get_portsObject



172
173
174
# File 'lib/construqt/firewalls.rb', line 172

def get_ports
  @ports ||= []
end

#port(port) ⇒ Object



166
167
168
169
170
# File 'lib/construqt/firewalls.rb', line 166

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