blob: c631ed8216d8da5e409b4317c4fd99ba51a875a5 [file] [edit]
module RBS
class CLI
class LibraryOptions
attr_accessor core_root: Pathname?
attr_accessor config_path: Pathname?
attr_reader libs: Array[String]
attr_reader dirs: Array[String]
attr_reader repos: Array[String]
def initialize: () -> void
def loader: () -> EnvironmentLoader
def setup_library_options: (OptionParser) -> OptionParser
end
interface _IO
def puts: (*untyped) -> void
def tty?: () -> bool
def print: (*untyped) -> void
def flush: () -> void
end
attr_reader stdout: _IO
attr_reader stderr: _IO
# The copy of `args` passed to `run`.
#
# `OptionParser#order!` mutates given `arg`, the `run_***` actions should read `original_args` to get the original commandline arguments.
#
# Returns `nil` if called before `#run` call.
#
attr_reader original_args: Array[String]
def initialize: (stdout: IO, stderr: IO) -> void
COMMANDS: Array[Symbol]
def library_parse: (OptionParser, options: LibraryOptions) -> void
def parse_logging_options: (OptionParser) -> void
def has_parser?: () -> bool
def run: (Array[String] args) -> Integer
def run_ast: (Array[String], LibraryOptions) -> Integer
def run_list: (Array[String], LibraryOptions) -> Integer
def run_ancestors: (Array[String], LibraryOptions) -> Integer
def run_methods: (Array[String], LibraryOptions) -> Integer
def run_method: (Array[String], LibraryOptions) -> Integer
def run_validate: (Array[String], LibraryOptions) -> Integer
def run_constant: (Array[String], LibraryOptions) -> Integer
def run_paths: (Array[String], LibraryOptions) -> Integer
def run_prototype: (Array[String], LibraryOptions) -> Integer
def run_prototype_file: (String format, Array[String]) -> Integer
def run_vendor: (Array[String], LibraryOptions) -> Integer
def run_parse: (Array[String], LibraryOptions) -> Integer
def run_test: (Array[String], LibraryOptions) -> Integer
def run_collection: (Array[String], LibraryOptions) -> Integer
# Returns `true` if the collection config exists, otherwise prints a message to `stderr` and returns `false`
def collection_config_available?: (Pathname) -> bool
# Returns `nil` if `Gemfile` or `Gemfile.lock` is not found, after printing a message to `stderr`
def bundler_definition: () -> Bundler::Definition?
def run_annotate: (Array[String], top) -> Integer
def run_subtract: (Array[String], top) -> Integer
def run_diff: (Array[String], LibraryOptions) -> Integer
def test_opt: (LibraryOptions) -> String?
def collection_options: (Array[String]) -> OptionParser
end
end