class Steep::Server::Master::TypeCheckController::TargetPaths
def add(path, library: false)
def add(path, library: false) return true if signature_path?(path) || code_path?(path) || library_path?(path) if library library_paths << path true else relative_path = project.relative_path(path) case when target.source_pattern =~ relative_path code_paths << path true when target.signature_pattern =~ relative_path signature_paths << path true else false end end end
def all_paths
def all_paths code_paths + signature_paths + library_paths end
def code_path?(path)
def code_path?(path) code_paths.include?(path) end
def initialize(project:, target:)
def initialize(project:, target:) @project = project @target = target @code_paths = Set[] @signature_paths = Set[] @library_paths = Set[] end
def library_path?(path)
def library_path?(path) library_paths.include?(path) end
def signature_path?(path)
def signature_path?(path) signature_paths.include?(path) end