I was looking at the Nokogiri source code, and found this:
module Nokogiri
class << self
def XML # some args
# some code
end
end
module XML
# more code
end
end
How come the names don't conflict? How does it know what I'm referring to when then using Nokogiri::XML
? Is this best practice? If so, is this just a way to get default module entry-points as is the case here?
xml = Nokogiri::XML(open("www.foo.com/bar.xml"))