Permalink
Browse files

Better namespace handling

  • Loading branch information...
1 parent ed63c18 commit 2044005899b17a54fba09f54cc7a32d8553ba4fd Peter Wagenet committed Feb 18, 2012
Showing with 2 additions and 9 deletions.
  1. +2 −9 lib/parsejs/docs.rb
View
@@ -160,15 +160,8 @@ def build_namespace(namespace)
elsif ns = YARD::Registry.at(namespace)
ns
else
- parts = namespace.split("::")
- parent = parts[0...-1].join("::")
-
- if parent.empty?
- YARD::CodeObjects::NamespaceObject.new(YARD::Registry.root, parts[-1])
- else
- build_namespace parent
- YARD::CodeObjects::NamespaceObject.new(parent, parts[-1])
- end
+ name = namespace.gsub('::', '.')
+ YARD::CodeObjects::NamespaceObject.new(:root, name)
end
end

0 comments on commit 2044005

Please sign in to comment.