Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Better namespace handling

  • Loading branch information...
commit 2044005899b17a54fba09f54cc7a32d8553ba4fd 1 parent ed63c18
Peter Wagenet authored
Showing with 2 additions and 9 deletions.
  1. +2 −9 lib/parsejs/docs.rb
View
11 lib/parsejs/docs.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.