Sha256: e7f5f7d713afdef53701217bc84258ec80c924e9a3fab8803b21050fa6625a03
Contents?: true
Size: 443 Bytes
Versions: 7
Compression:
Stored size: 443 Bytes
Contents
# frozen_string_literal: true module Mihari module Mixins # # Autonomous System mixin # 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
7 entries across 7 versions & 1 rubygems