sig/steep/server/master.rbs in steep-1.6.0.pre.3 vs sig/steep/server/master.rbs in steep-1.6.0.pre.4
- old
+ new
@@ -59,19 +59,33 @@
attr_reader changed_paths: Set[Pathname]
attr_reader target_paths: Array[TargetPaths]
+ # TargetPaths object keeps track of the expanded absolute paths of each target
+ #
+ # 1. *Library path* is a RBS file that is loaded as a part of a library
+ # 2. *Signature path* is a RBS file that is loaded as a part of the application library
+ # 3. *Code path* is a Ruby file that is being type checked
+ #
class TargetPaths
attr_reader project: Project
attr_reader target: Project::Target
+ # Set of absolute paths of Ruby code
+ #
attr_reader code_paths: Set[Pathname]
+ # Set of absolute paths of app signatures
+ #
attr_reader signature_paths: Set[Pathname]
+ # Set of absolute paths of library signatures
+ #
+ # Unlike `code_paths` and `signature_paths`, the `library_paths` must be added explicitly not by `#add` method.
+ #
attr_reader library_paths: Set[Pathname]
def initialize: (project: Project, target: Project::Target) -> void
def all_paths: () -> Set[Pathname]
@@ -80,10 +94,17 @@
def signature_path?: (Pathname path) -> bool
def code_path?: (Pathname path) -> bool
- def add: (Pathname path) -> void
+ # Adds `path` to the object
+ #
+ # Returns `false` if the path is not a part of the project.
+ #
+ # Whether `path` is a code path or signature path is automatically detected.
+ # `library: true` is required to add the path to library path.
+ #
+ def add: (Pathname path, ?library: bool) -> bool
alias << add
end
def initialize: (project: Project) -> void