Sha256: c2a9d863182177975b7d635b5408143ab6aa6320fe9d8415c9ae3e4018e0cac3

Contents?: true

Size: 361 Bytes

Versions: 5

Compression:

Stored size: 361 Bytes

Contents

module HttpEventLogger
  module Event

    class Connection

      attr_reader :host, :port

      def initialize(host, port)
        @host = host
        @port = port ? port.to_s : nil
        HttpEventLogger::Event::Observer.observe(:connected, self)
      end

      def uri
        @port.present? ? "#{@host}:#{@port}" : @host
      end

    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
http_event_logger-0.1.0 ./lib/http_event_logger/event/connection.rb
http_event_logger-0.1.0.rc4 ./lib/http_event_logger/event/connection.rb
http_event_logger-0.1.0.rc3 ./lib/http_event_logger/event/connection.rb
http_event_logger-0.1.0.rc2 ./lib/http_event_logger/event/connection.rb
http_event_logger-0.1.0.rc1 ./lib/http_event_logger/event/connection.rb