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



31
32
33
# File 'lib/haproxy/treetop/nodes.rb', line 31

def host
  service_address.host.text_value.strip
end

#portObject



35
36
37
# File 'lib/haproxy/treetop/nodes.rb', line 35

def port
  service_address.port.text_value.strip
end

#service_addressObject



27
28
29
# File 'lib/haproxy/treetop/nodes.rb', line 27

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