This was somewhat confusing at first. I think we just want a instance method access a class variable in line 14? maybe (line 16-29 should still work ok):

   def self.map
     @map ||= PuppetX::VMware::Mapper.new_map('HostVirtualNicSpecMap')
   end

   def map
      self.class.map
   end