Class: RubyIndexer::Entry
- Inherits:
-
Object
- Object
- RubyIndexer::Entry
- Extended by:
- T::Sig
- Defined in:
- lib/ruby_indexer/lib/ruby_indexer/entry.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Alias, Class, Constant, InstanceMethod, Method, Module, Namespace, Parameter, RequiredParameter, SingletonMethod, UnresolvedAlias
Instance Attribute Summary collapse
-
#comments ⇒ Object
readonly
Returns the value of attribute comments.
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#visibility ⇒ Object
Returns the value of attribute visibility.
Instance Method Summary collapse
- #file_name ⇒ Object
-
#initialize(name, file_path, location, comments) ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize(name, file_path, location, comments) ⇒ Entry
Returns a new instance of Entry.
24 25 26 27 28 29 30 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 24 def initialize(name, file_path, location, comments) @name = name @file_path = file_path @location = location @comments = comments @visibility = T.let(:public, Symbol) end |
Instance Attribute Details
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
18 19 20 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 18 def comments @comments end |
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
12 13 14 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 12 def file_path @file_path end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
15 16 17 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 15 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 9 def name @name end |
#visibility ⇒ Object
Returns the value of attribute visibility.
21 22 23 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 21 def visibility @visibility end |
Instance Method Details
#file_name ⇒ Object
33 34 35 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 33 def file_name File.basename(@file_path) end |