Sha256: e6362fde7bdd084007103cde69ab68e5ab3963135e954e1bd9efbd231b36e091
Contents?: true
Size: 401 Bytes
Versions: 54
Compression:
Stored size: 401 Bytes
Contents
# frozen_string_literal: true module Mihari module Mixins module AutonomousSystem # # Normalize ASN value # # @param [String, Integer] asn # # @return [Integer] # def normalize_asn(asn) return asn if asn.is_a?(Integer) return asn.to_i unless asn.start_with?("AS") asn.delete_prefix("AS").to_i end end end end
Version data entries
54 entries across 54 versions & 1 rubygems