Class: RubyIndexer::IndexablePath
- Inherits:
-
Object
- Object
- RubyIndexer::IndexablePath
- Extended by:
- T::Sig
- Defined in:
- lib/ruby_indexer/lib/ruby_indexer/indexable_path.rb
Instance Attribute Summary collapse
-
#full_path ⇒ Object
readonly
Returns the value of attribute full_path.
-
#require_path ⇒ Object
readonly
Returns the value of attribute require_path.
Instance Method Summary collapse
-
#initialize(load_path_entry, full_path) ⇒ IndexablePath
constructor
A new instance of IndexablePath.
Constructor Details
#initialize(load_path_entry, full_path) ⇒ IndexablePath
Returns a new instance of IndexablePath.
21 22 23 24 25 26 27 |
# File 'lib/ruby_indexer/lib/ruby_indexer/indexable_path.rb', line 21 def initialize(load_path_entry, full_path) @full_path = full_path @require_path = T.let( load_path_entry ? Pathname.new(full_path).relative_path_from(load_path_entry).to_s.delete_suffix(".rb") : nil, T.nilable(String), ) end |
Instance Attribute Details
#full_path ⇒ Object (readonly)
Returns the value of attribute full_path.
12 13 14 |
# File 'lib/ruby_indexer/lib/ruby_indexer/indexable_path.rb', line 12 def full_path @full_path end |
#require_path ⇒ Object (readonly)
Returns the value of attribute require_path.
9 10 11 |
# File 'lib/ruby_indexer/lib/ruby_indexer/indexable_path.rb', line 9 def require_path @require_path end |