Sha256: 72affab441d1d46b6325d28388470b9136f717e374d285cafd7568461f199d1c
Contents?: true
Size: 944 Bytes
Versions: 1
Compression:
Stored size: 944 Bytes
Contents
module AIPP module LF # Aerodromes radiocommunication facilities (VFR only) class AD16 < AIP include AIPP::LF::Helpers::Common include AIPP::LF::Helpers::ADRadio DEPENDS = %w(AD-1.3) ID_FIXES = { 'LF04' => 'LF9004', # illegal ID as per AIXM 'LFPY' => nil # decommissioned - see https://fr.wikipedia.org/wiki/Base_a%C3%A9rienne_217_Br%C3%A9tigny-sur-Orge } def parse prepare(html: read).css('tbody').first do |tbody| tbody.css('tr').group_by_chunks { |e| e.attr(:id).match?(/-TXT_NAME-/) }.each do |tr, trs| id = tr.css('span[id*="CODE_ICAO"]').text.cleanup next unless id = ID_FIXES.fetch(id, id) @airport = select(:airport, id: id).first addresses_from(trs).each { |a| @airport.add_address(a) } units_from(trs).each(&method(:write)) end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
aipp-0.2.2 | lib/aipp/regions/LF/AD-1.6.rb |