Skip to content

Commit

Permalink
Refactor fully_qualified_nesting_namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
unasuke authored and hsbt committed Mar 15, 2024
1 parent 168ea67 commit ec0072b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rdoc/class_module.rb
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ def nesting_namespaces

def fully_qualified_nesting_namespaces
return nesting_namespaces if nesting_namespaces.length < 2
@fqns ||= nesting_namespaces.map.with_index do |_, i|
nesting_namespaces[0..i].join("::")
@fqns ||= nesting_namespaces.inject([]) do |list, n|
list << (list.empty? ? n : "#{list.last}::#{n}")
end
end

Expand Down

0 comments on commit ec0072b

Please sign in to comment.