Ruby metadata programming issue

I looked at the Logging.logger library of the Ruby log library and asked a question from a source in github related to this piece of code

  logger = ::Logging::Logger.new(name)
  logger.add_appenders appender
  logger.additive = false

  class << logger
    def close
      @appenders.each {|a| a.close}
      h = ::Logging::Repository.instance.instance_variable_get :@h
      h.delete(@name)
      class << self; undef :close; end
    end
  end

I understand that the <logger class opens the eigen / meta / singleton class for the logger object to add an instance closure method. However, I'm not quite sure what "class <self; undef: close; end" does and for what purpose. Can someone tell me what that means?

+5
source share
1 answer

( ). , . , " < ', . < , , < , .

+10

All Articles