Sha256: cd6833e8a179d207df818f5c901e6833c51680c8139addab4b1e3a85d288d642
Contents?: true
Size: 337 Bytes
Versions: 1
Compression:
Stored size: 337 Bytes
Contents
require 'httparty' require 'ipaddress' module Apility module Ip def ip_blacklisted?(ipaddress) return "IP Address doesn't seem to be valid." if !(IPAddress.valid? ipaddress) base_url = 'https://api.apility.net/badip/IPV4/' response = HTTParty.get(base_url + ipaddress) response.success? end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
apility-1.0 | lib/apility/ip.rb |