Module: EacRubyUtils::GemsRegistry::Gem::PathsToRequire
- Included in:
- EacRubyUtils::GemsRegistry::Gem
- Defined in:
- lib/eac_ruby_utils/gems_registry/gem/paths_to_require.rb
Constant Summary collapse
- ROOT_MODULE_REQUIRE_PATTERNS =
%w[ EacRubyUtils::RootModuleSetup EacRubyBase1::RootModuleSetup Zeitwerk ].freeze
Instance Method Summary collapse
- #absolute_require_paths(lib_relative_path) ⇒ Enumerable<Pathname>
- #path_to_require ⇒ String
- #to_s ⇒ String
Instance Method Details
#absolute_require_paths(lib_relative_path) ⇒ Enumerable<Pathname>
16 17 18 19 20 21 |
# File 'lib/eac_ruby_utils/gems_registry/gem/paths_to_require.rb', line 16 def absolute_require_paths(lib_relative_path) gemspec.require_paths.lazy.map do |e| ::Pathname.new(e).(gemspec.gem_dir) .join("#{lib_relative_path}.rb") end end |
#path_to_require ⇒ String
24 25 26 |
# File 'lib/eac_ruby_utils/gems_registry/gem/paths_to_require.rb', line 24 def path_to_require require_root_module? ? root_module_path_to_require : direct_path_to_require end |
#to_s ⇒ String
29 30 31 |
# File 'lib/eac_ruby_utils/gems_registry/gem/paths_to_require.rb', line 29 def to_s "#{self.class.name}[#{gemspec.name}]" end |