Class: AIPP::Environment::Borders

Inherits:
Cache
  • Object
show all
Defined in:
lib/aipp/environment.rb

Overview

Borders read from directory containing GeoJSON files

Instance Method Summary collapse

Methods inherited from Cache

#[], #merge, #replace

Instance Method Details

#read!(dir) ⇒ Object



41
42
43
44
45
46
# File 'lib/aipp/environment.rb', line 41

def read!(dir)
  @table.clear
  dir.glob('*.geojson').each do |file|
    @table[file.basename('.geojson').to_s.to_sym] = AIPP::Border.from_file(file)
  end
end