Method: HAProxySocket#initialize
- Defined in:
- lib/haproxystats/socket.rb
#initialize(location) ⇒ HAProxySocket
Check we have a socket at location and that we can open it
12 13 14 15 16 |
# File 'lib/haproxystats/socket.rb', line 12 def initialize(location) @location = location raise ArgumentError, "#{location} does not appear to be a socket." unless File.socket?(location) raise IOError, 'Cannot read/write to socket at ${location}' unless show_info end |