lib/onyphe/clients/geoloc.rb in onyphe-0.1.0 vs lib/onyphe/clients/geoloc.rb in onyphe-0.2.0

- old
+ new

@@ -2,9 +2,11 @@ module Onyphe module Clients class Geoloc < Client def get_by_ip(ip, page = 1) + raise ArgumentError, "Invalid IP address: #{ip}" unless Validator.valid_ip?(ip) + get("/geoloc/#{ip}", page: page) { |json| json } end end end end