Skip to content

Commit

Permalink
Create Entry::Namespace as parent concept for classes and modules
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock committed Aug 10, 2023
1 parent 44155f9 commit ab17bfb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/ruby_indexer/lib/ruby_indexer/index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,17 @@ def initialize(name, file_path, location, comments)
@comments = comments
end

class Module < Entry
class Namespace < Entry
sig { returns(String) }
def short_name
T.must(@name.split("::").last)
end
end

class Class < Module
class Module < Namespace
end

class Class < Namespace
end
end
end
Expand Down

0 comments on commit ab17bfb

Please sign in to comment.