lib/statsd/instrument/udp_sink.rb in statsd-instrument-3.5.9 vs lib/statsd/instrument/udp_sink.rb in statsd-instrument-3.5.10

- old
+ new

@@ -3,12 +3,14 @@ module StatsD module Instrument # @note This class is part of the new Client implementation that is intended # to become the new default in the next major release of this library. class UDPSink - def self.for_addr(addr) - host, port_as_string = addr.split(":", 2) - new(host, Integer(port_as_string)) + class << self + def for_addr(addr) + host, port_as_string = addr.split(":", 2) + new(host, Integer(port_as_string)) + end end attr_reader :host, :port FINALIZER = ->(object_id) do