Module: NexusCore::ReportUtils
- Extended by:
- DateDefinition, PercentageHelper, PeriodDefinition
- Defined in:
- lib/nexus_core/report_utils.rb
Defined Under Namespace
Modules: DateDefinition, PercentageHelper, PeriodDefinition
Class Method Summary collapse
Methods included from DateDefinition
end_of_last_month, end_of_last_week, last_week, starting_last_month, this_week
Methods included from PeriodDefinition
full_weeks_in_period, last_month_period, last_week_period
Methods included from PercentageHelper
to_percentage, to_percentage_number
Class Method Details
.decode_ip(ip_addr) ⇒ Object
56 57 58 59 60 61 62 63 64 65 |
# 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 |