Sha256: 176ae78594b010f3113e05b6838f08bb0073d6183a3d7eb32b355f8672497381

Contents?: true

Size: 726 Bytes

Versions: 1

Compression:

Stored size: 726 Bytes

Contents

module AIPP
  module LF

    # Designated Points
    class ENR43 < AIP

      include AIPP::LF::Helpers::Base

      def parse
        prepare(html: read).css('tbody').each do |tbody|
          tbody.css('tr').to_enum.with_index(1).each do |tr, index|
            tds = tr.css('td')
            designated_point = AIXM.designated_point(
              type: :icao,
              id: tds[0].text.strip,
              xy: xy_from(tds[1].text)
            )
            designated_point.source = source(position: tr.line)
            add designated_point
          rescue => error
            warn("error parsing designated point at ##{index}: #{error.message}", pry: error)
          end
        end
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aipp-0.2.5 lib/aipp/regions/LF/ENR-4.3.rb