Sha256: bfacbdabc5a76e086b89df64c300df6d68bc209042e52ff96d5e2954ffd31117
Contents?: true
Size: 942 Bytes
Versions: 2
Compression:
Stored size: 942 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(:add)) end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aipp-0.2.4 | lib/aipp/regions/LF/AD-1.6.rb |
aipp-0.2.3 | lib/aipp/regions/LF/AD-1.6.rb |