Sha256: 4fb23ffeb504c5ad77be0c9fbf6ea926902be18774462cb7026e0078132d5595

Contents?: true

Size: 284 Bytes

Versions: 2

Compression:

Stored size: 284 Bytes

Contents

require 'net/http'

module Noip
  class RemoteIp

    def address
      @address ||= fetch_remote_address
    end

  private

    def fetch_remote_address
      remote_ip = Net::HTTP.get(resolver)
    end

    def resolver
      URI('http://whatismyip.akamai.com')
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
noip-0.2 lib/noip/remote_ip.rb
noip-0.1 lib/noip/remote_ip.rb