module NexusCore::ReportUtils
Public Class Methods
decode_ip(ip_addr)
click to toggle source
# File lib/nexus_core/report_utils.rb, line 56 def self.decode_ip(ip_addr) g = GeoIP.new(NexusCore::GEOIP_DAT_LOCATION) begin country = g.country(ip_addr).country_name rescue country = 'N/A' puts "Unable to Reverse Geocode: '#{ip_addr}'" end return country end