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