Class: TimezoneLatLon::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/timezone_lat_lon/loader.rb

Constant Summary collapse

CACHE_FILE_NAME =
'time_zones.cache'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config = {}) ⇒ Loader

Returns a new instance of Loader.



11
12
13
14
15
16
17
# File 'lib/timezone_lat_lon/loader.rb', line 11

def initialize(config = {})
  @config = {
    geojson_filename: 'combined.json'
  }.merge(config)
  
  load_data
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



7
8
9
# File 'lib/timezone_lat_lon/loader.rb', line 7

def config
  @config
end

#timezone_dataObject

Returns the value of attribute timezone_data.



7
8
9
# File 'lib/timezone_lat_lon/loader.rb', line 7

def timezone_data
  @timezone_data
end