Module: Docscribe::CLI::Sigs

Defined in:
lib/docscribe/cli/sigs.rb

Overview

Check RBS signature coverage for Ruby source files.

Usage:

docscribe sigs [options] [files...]

Parses Ruby source files, extracts method definitions, and checks each method against the configured RBS signature directories. Reports methods that lack RBS type signatures.

Defined Under Namespace

Classes: MethodDef

Constant Summary collapse

<<~TEXT
  Usage: docscribe sigs [options] [files...]

  Check RBS signature coverage for Ruby source files.

TEXT
EXIT_CODES =
"\nExit codes:\n    " \
"0 - all methods have signatures\n    " \
"1 - some methods lack signatures\n    " \
'2 - error occurred'

Class Method Summary collapse

Class Method Details

.run(argv) ⇒ Integer

Parameters:

  • argv (Array<String>)

Returns:

  • (Integer)


54
55
56
57
58
59
60
61
# File 'lib/docscribe/cli/sigs.rb', line 54

def run(argv)
  warn_ruby_version
  options = parse_options(argv)
  paths = expand_paths(argv)
  return no_files_found if paths.empty?

  run_with(options, extract_methods(paths))
end