Module: HAProxy::Treetop::ServiceAddressContainer

Included in:
FrontendHeader, ListenHeader, ServerLine
Defined in:
lib/haproxy/treetop/nodes.rb

Overview

Include this module if the node contains a service address element.

Instance Method Summary collapse

Instance Method Details

#hostObject



29
30
31
# File 'lib/haproxy/treetop/nodes.rb', line 29

def host
  self.service_address.host.text_value.strip
end

#portObject



33
34
35
# File 'lib/haproxy/treetop/nodes.rb', line 33

def port
  self.service_address.port.text_value.strip
end

#service_addressObject



25
26
27
# File 'lib/haproxy/treetop/nodes.rb', line 25

def service_address
  self.elements.find {|e| e.class == ServiceAddress }
end