Sha256: ad32adf03ef6870edddb621830cf470f0fdd640b6b62316284f929a2ed99ae27
Contents?: true
Size: 359 Bytes
Versions: 2
Compression:
Stored size: 359 Bytes
Contents
require 'httparty' require 'ipaddress' module Moocher module Ip def ip_blacklisted?(ipaddress) base_url = 'https://api.moocher.io/badip/IPV4/' if IPAddress.valid? ipaddress response = HTTParty.get(base_url + ipaddress) response.success? else "IP Address doesn't seem to be valid." end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
moocher-0.1.1.2pre | lib/moocher/ip.rb |
moocher-0.1.1.1pre | lib/moocher/ip.rb |