Class: Tornados::GeoEnrich

Inherits:
Service
  • Object
show all
Defined in:
lib/tornados/geo_enrich.rb

Instance Method Summary collapse

Methods inherited from Service

call

Constructor Details

#initialize(ip_list, max_db_file_path, filter = nil) ⇒ GeoEnrich

Returns a new instance of GeoEnrich.



13
14
15
16
17
# File 'lib/tornados/geo_enrich.rb', line 13

def initialize(ip_list, max_db_file_path, filter = nil)
  @filter = filter
  @ip_list = ip_list
  @reader = MaxMind::GeoIP2::Reader.new(database: max_db_file_path)
end