Sha256: 8b1c7c85da50b885593bec32023813503c9d4671e6b6c90a5a9bc68374480339
Contents?: true
Size: 496 Bytes
Versions: 14
Compression:
Stored size: 496 Bytes
Contents
# frozen_string_literal: true module Mihari module Concerns # # Autonomous System concern # module AutonomousSystemNormalizable extend ActiveSupport::Concern # # 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
14 entries across 14 versions & 1 rubygems