svoop/ogn_client-ruby

View on GitHub
lib/ogn_client/messages/receiver_beacon.rb

Summary

Maintainability
A
0 mins
Test Coverage
module OGNClient

  class ReceiverBeacon < Message

    RECEIVER_BEACON_PATTERN = %r(^
      .+?>APRS,(?:.+?,){1,2}
      (?:GLIDERN|GIGA|NYMSERV)\d*:
    )x

    private

    def parse(raw, date: nil)
      raw.match RECEIVER_BEACON_PATTERN do
        super unless @raw
        self
      end
    end

  end

end