Class: RubyIndexer::Index::Entry

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/ruby_indexer/lib/ruby_indexer/index.rb

Direct Known Subclasses

Constant, Namespace

Defined Under Namespace

Classes: Class, Constant, Module, Namespace

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, file_path, location, comments) ⇒ Entry

Returns a new instance of Entry.



118
119
120
121
122
123
# File 'lib/ruby_indexer/lib/ruby_indexer/index.rb', line 118

def initialize(name, file_path, location, comments)
  @name = name
  @file_path = file_path
  @location = location
  @comments = comments
end

Instance Attribute Details

#commentsObject (readonly)

Returns the value of attribute comments.



115
116
117
# File 'lib/ruby_indexer/lib/ruby_indexer/index.rb', line 115

def comments
  @comments
end

#file_pathObject (readonly)

Returns the value of attribute file_path.



109
110
111
# File 'lib/ruby_indexer/lib/ruby_indexer/index.rb', line 109

def file_path
  @file_path
end

#locationObject (readonly)

Returns the value of attribute location.



112
113
114
# File 'lib/ruby_indexer/lib/ruby_indexer/index.rb', line 112

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



106
107
108
# File 'lib/ruby_indexer/lib/ruby_indexer/index.rb', line 106

def name
  @name
end

Instance Method Details

#file_nameObject



126
127
128
# File 'lib/ruby_indexer/lib/ruby_indexer/index.rb', line 126

def file_name
  File.basename(@file_path)
end