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 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>
14 15 16 17 18 19 |
# File 'lib/eac_ruby_utils/gems_registry/gem/paths_to_require.rb', line 14 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
22 23 24 |
# File 'lib/eac_ruby_utils/gems_registry/gem/paths_to_require.rb', line 22 def path_to_require require_root_module? ? root_module_path_to_require : direct_path_to_require end |
#to_s ⇒ String
27 28 29 |
# File 'lib/eac_ruby_utils/gems_registry/gem/paths_to_require.rb', line 27 def to_s "#{self.class.name}[#{gemspec.name}]" end |