Sha256: 44f5f4f28dac1813f1b11d3ae52eb1c679547548885e36ccf1ef84d293a9054a

Contents?: true

Size: 273 Bytes

Versions: 6

Compression:

Stored size: 273 Bytes

Contents

# frozen_string_literal: true

class Netdisco
  module NameMap
    def name_map(origin_name)
      name = origin_name.dup
      CFG.name_map.each do |match, replace|
        re   = Regexp.new match
        name = name.sub re, replace
      end
      name
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
netdisco-0.0.7 lib/netdisco/name_map.rb
netdisco-0.0.6 lib/netdisco/name_map.rb
netdisco-0.0.5 lib/netdisco/name_map.rb
netdisco-0.0.4 lib/netdisco/name_map.rb
netdisco-0.0.3 lib/netdisco/name_map.rb
netdisco-0.0.2 lib/netdisco/name_map.rb