lib/packwerk/constant_discovery.rb in packwerk-2.0.0 vs lib/packwerk/constant_discovery.rb in packwerk-2.1.0

- old
+ new

@@ -2,11 +2,11 @@ # frozen_string_literal: true require "constant_resolver" module Packwerk - # Get information about (partially qualified) constants without loading the application code. + # Get information about unresolved constants without loading the application code. # Information gathered: Fully qualified name, path to file containing the definition, package, # and visibility (public/private to the package). # # The implementation makes a few assumptions about the code base: # - `Something::SomeOtherThing` is defined in a path of either `something/some_other_thing.rb` or `something.rb`, @@ -33,12 +33,12 @@ def package_from_path(path) @packages.package_from_path(path) end # Analyze a constant via its name. - # If the name is partially qualified, we need the current namespace path to correctly infer its full name + # If the constant is unresolved, we need the current namespace path to correctly infer its full name # - # @param const_name [String] The constant's name, fully or partially qualified. + # @param const_name [String] The unresolved constant's name. # @param current_namespace_path [Array<String>] (optional) The namespace of the context in which the constant is # used, e.g. ["Apps", "Models"] for `Apps::Models`. Defaults to [] which means top level. # @return [Packwerk::ConstantDiscovery::ConstantContext] def context_for(const_name, current_namespace_path: []) begin