diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index c6c8b362..00000000 --- a/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 665dfa0a..a9d80f0a 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3'] + ruby-version: ['3.0', '3.1', '3.2', '3.3'] steps: - uses: actions/checkout@v4 - name: Set up Ruby diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..21401e51 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,31 @@ +--- +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: check-added-large-files + args: [--maxkb=2000] + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-json + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-toml + - id: check-vcs-permalinks + exclude: sorbet/rbi/annotations + - id: detect-private-key + - id: end-of-file-fixer + - id: forbid-submodules + - id: mixed-line-ending + - id: sort-simple-yaml + - id: trailing-whitespace + - repo: https://github.com/crate-ci/typos + rev: v1.18.2 + hooks: + - id: typos + args: [--exclude=sorbet/rbi/gems, --force-exclude] + - repo: https://github.com/adrienverge/yamllint + rev: v1.35.0 + hooks: + - id: yamllint + args: [--strict] diff --git a/.rubocop.yml b/.rubocop.yml index 7a9b9291..b4684103 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -8,7 +8,7 @@ require: AllCops: NewCops: enable - TargetRubyVersion: 2.7 + TargetRubyVersion: 3.0 Layout/ClassStructure: Enabled: true diff --git a/.yamllint.yml b/.yamllint.yml index 6b48925f..b88a1c74 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -3,4 +3,3 @@ extends: default ignore: | /vendor/bundle/ - /.rubocop_todo.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index d084ed96..28a7b031 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,11 @@ ### Bug Fixes -* Fix syntax of order-dependent lists +* [Fix](https://github.com/dduugg/yard-sorbet/commit/f44388b) syntax of order-dependent lists + +### Changes + +* [#282](https://github.com/dduugg/yard-sorbet/issues/282) Increase minimum required ruby version to `3.0` ## 0.8.1 (2023-04-03) @@ -31,7 +35,7 @@ ### Changes -* Increase minimum required ruby version to `2.7.0` +* Increase minimum required ruby version to `2.7` ## 0.6.1 (2021-11-01) diff --git a/Gemfile b/Gemfile index 4bc4103b..c39a79c4 100644 --- a/Gemfile +++ b/Gemfile @@ -5,16 +5,15 @@ source 'https://rubygems.org' gemspec -gem 'pry-byebug', '~> 3.10' gem 'rake', '~> 13.1.0' gem 'redcarpet', '~> 3.6.0' -gem 'rspec', '~> 3.12.0' -gem 'rubocop', '~> 1.59.0' +gem 'rspec', '~> 3.13.0' +gem 'rubocop', '~> 1.60.2' gem 'rubocop-packaging', '~> 0.5.2' gem 'rubocop-performance', '~> 1.20.1' gem 'rubocop-rake', '~> 0.6.0' -gem 'rubocop-rspec', '~> 2.25.0' +gem 'rubocop-rspec', '~> 2.26.1' gem 'rubocop-sorbet', '~> 0.7.6' gem 'simplecov-cobertura', '~> 2.1.0' gem 'sorbet', '~> 0.5.11164' -gem 'tapioca', '~> 0.11.8' +gem 'tapioca', '~> 0.12.0' diff --git a/Gemfile.lock b/Gemfile.lock index 72297c07..b5c62f53 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,53 +9,45 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) - byebug (11.1.3) - coderay (1.1.3) - diff-lcs (1.5.0) + diff-lcs (1.5.1) docile (1.4.0) + erubi (1.12.0) json (2.7.1) language_server-protocol (3.17.0.3) - method_source (1.0.0) netrc (0.11.0) parallel (1.24.0) - parser (3.2.2.4) + parser (3.3.0.5) ast (~> 2.4.1) racc - pry (0.14.1) - coderay (~> 1.1) - method_source (~> 1.0) - pry-byebug (3.10.1) - byebug (~> 11.0) - pry (>= 0.13, < 0.15) + prettier_print (1.2.1) + prism (0.24.0) racc (1.7.3) rainbow (3.1.1) rake (13.1.0) - rbi (0.0.17) - ast - parser (>= 3.0.0) + rbi (0.1.9) + prism (>= 0.18.0, < 0.25) sorbet-runtime (>= 0.5.9204) - unparser (>= 0.5.6) redcarpet (3.6.0) - regexp_parser (2.8.3) + regexp_parser (2.9.0) rexml (3.2.6) - rspec (3.12.0) - rspec-core (~> 3.12.0) - rspec-expectations (~> 3.12.0) - rspec-mocks (~> 3.12.0) - rspec-core (3.12.0) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.0) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-mocks (3.12.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-support (3.12.0) - rubocop (1.59.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.0) + rubocop (1.60.2) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.4) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) @@ -64,25 +56,25 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.30.0) parser (>= 3.2.1.0) - rubocop-capybara (2.19.0) + rubocop-capybara (2.20.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.25.1) rubocop (~> 1.41) - rubocop-factory_bot (2.24.0) - rubocop (~> 1.33) rubocop-packaging (0.5.2) rubocop (>= 1.33, < 2.0) - rubocop-performance (1.20.1) + rubocop-performance (1.20.2) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.30.0, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.25.0) + rubocop-rspec (2.26.1) rubocop (~> 1.40) rubocop-capybara (~> 2.17) rubocop-factory_bot (~> 2.22) - rubocop-sorbet (0.7.6) + rubocop-sorbet (0.7.7) rubocop (>= 0.90.0) ruby-progressbar (1.13.0) - simplecov (0.21.2) + simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) @@ -91,54 +83,54 @@ GEM simplecov (~> 0.19) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sorbet (0.5.11164) - sorbet-static (= 0.5.11164) - sorbet-runtime (0.5.11164) - sorbet-static (0.5.11164-universal-darwin) - sorbet-static (0.5.11164-x86_64-linux) - sorbet-static-and-runtime (0.5.11164) - sorbet (= 0.5.11164) - sorbet-runtime (= 0.5.11164) - spoom (1.2.1) - sorbet (>= 0.5.10187) - sorbet-runtime (>= 0.5.9204) + sorbet (0.5.11262) + sorbet-static (= 0.5.11262) + sorbet-runtime (0.5.11262) + sorbet-static (0.5.11262-universal-darwin) + sorbet-static (0.5.11262-x86_64-linux) + sorbet-static-and-runtime (0.5.11262) + sorbet (= 0.5.11262) + sorbet-runtime (= 0.5.11262) + spoom (1.2.4) + erubi (>= 1.10.0) + sorbet-static-and-runtime (>= 0.5.10187) + syntax_tree (>= 6.1.1) thor (>= 0.19.2) - tapioca (0.11.8) + syntax_tree (6.2.0) + prettier_print (>= 1.2.0) + tapioca (0.12.0) bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (~> 0.0.0, >= 0.0.16) - sorbet-static-and-runtime (>= 0.5.10187) + rbi (>= 0.1.4, < 0.2) + sorbet-static-and-runtime (>= 0.5.10820) spoom (~> 1.2.0, >= 1.2.0) thor (>= 1.2.0) yard-sorbet - thor (1.2.2) + thor (1.3.0) unicode-display_width (2.5.0) - unparser (0.6.8) - diff-lcs (~> 1.3) - parser (>= 3.2.0) yard (0.9.34) PLATFORMS arm64-darwin-21 + arm64-darwin-23 x86_64-darwin-21 x86_64-linux DEPENDENCIES - pry-byebug (~> 3.10) rake (~> 13.1.0) redcarpet (~> 3.6.0) - rspec (~> 3.12.0) - rubocop (~> 1.59.0) + rspec (~> 3.13.0) + rubocop (~> 1.60.2) rubocop-packaging (~> 0.5.2) rubocop-performance (~> 1.20.1) rubocop-rake (~> 0.6.0) - rubocop-rspec (~> 2.25.0) + rubocop-rspec (~> 2.26.1) rubocop-sorbet (~> 0.7.6) simplecov-cobertura (~> 2.1.0) sorbet (~> 0.5.11164) - tapioca (~> 0.11.8) + tapioca (~> 0.12.0) yard-sorbet! BUNDLED WITH - 2.3.13 + 2.3.7 diff --git a/bin/console b/bin/console index b699616a..4faa3645 100755 --- a/bin/console +++ b/bin/console @@ -3,9 +3,10 @@ # frozen_string_literal: true require 'bundler/setup' -require 'pry-byebug' +require 'irb' +require 'yard-sorbet' -# Use `Bundler.require(:development)` to add >1s of latency but enjoy access to dev dependencies -Bundler.require +# To require all gems in the Gemfile: +# Bundler.require -Pry.start +IRB.start(__FILE__) diff --git a/lib/yard-sorbet/directives.rb b/lib/yard-sorbet/directives.rb index 1b4fa714..8146e510 100644 --- a/lib/yard-sorbet/directives.rb +++ b/lib/yard-sorbet/directives.rb @@ -18,8 +18,6 @@ def self.extract_directives(docstring) end sig { params(docstring: String, directives: T::Array[String]).void } - def self.add_directives(docstring, directives) - directives.each { docstring.concat("\n#{_1}") } - end + def self.add_directives(docstring, directives) = directives.each { docstring.concat("\n#{_1}") } end end diff --git a/lib/yard-sorbet/handlers/abstract_dsl_handler.rb b/lib/yard-sorbet/handlers/abstract_dsl_handler.rb index 3f935aea..fa286421 100644 --- a/lib/yard-sorbet/handlers/abstract_dsl_handler.rb +++ b/lib/yard-sorbet/handlers/abstract_dsl_handler.rb @@ -15,7 +15,7 @@ class AbstractDSLHandler < YARD::Handlers::Ruby::Base # The `@abstract` tag template TAG_TEXT = 'Subclasses must implement the `abstract` methods below.' # Extra text for class namespaces - CLASS_TAG_TEXT = T.let("It cannot be directly instantiated. #{TAG_TEXT}", String) + CLASS_TAG_TEXT = T.let("It cannot be directly instantiated. #{TAG_TEXT}".freeze, String) sig { void } def process diff --git a/lib/yard-sorbet/handlers/enums_handler.rb b/lib/yard-sorbet/handlers/enums_handler.rb index c3687997..78aff33e 100644 --- a/lib/yard-sorbet/handlers/enums_handler.rb +++ b/lib/yard-sorbet/handlers/enums_handler.rb @@ -26,9 +26,7 @@ def process private sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Boolean) } - def const_assign_node?(node) - node.type == :assign && node[0][0].type == :const - end + def const_assign_node?(node) = node.type == :assign && node[0][0].type == :const end end end diff --git a/lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb b/lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb index f4f0a18c..3e890f1a 100644 --- a/lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb +++ b/lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb @@ -15,9 +15,7 @@ class MixesInClassMethodsHandler < YARD::Handlers::Ruby::Base @@mix_in_class_methods = T.let({}, T::Hash[String, T::Array[String]]) # rubocop:disable Style/ClassVars sig { params(code_obj: String).returns(T.nilable(T::Array[String])) } - def self.mixed_in_class_methods(code_obj) - @@mix_in_class_methods[code_obj] - end + def self.mixed_in_class_methods(code_obj) = @@mix_in_class_methods[code_obj] sig { void } def process diff --git a/lib/yard-sorbet/handlers/sig_handler.rb b/lib/yard-sorbet/handlers/sig_handler.rb index e05c9c7c..d30f317f 100644 --- a/lib/yard-sorbet/handlers/sig_handler.rb +++ b/lib/yard-sorbet/handlers/sig_handler.rb @@ -64,15 +64,13 @@ def merged_into_attr?(attr_node) attrs = namespace.attributes[scope][names[0]] return false if attrs.nil? || attrs.empty? - document_attr_methods(attrs.values.compact) + document_attrs(attrs.values.compact) attr_node.docstring = nil true end sig { params(method_objects: T::Array[YARD::CodeObjects::MethodObject]).void } - def document_attr_methods(method_objects) - method_objects.each { parse_node(_1, _1.docstring, include_params: false) } - end + def document_attrs(method_objects) = method_objects.each { parse_node(_1, _1.docstring, include_params: false) } sig { params(attach_to: Documentable, docstring: T.nilable(String), include_params: T::Boolean).void } def parse_node(attach_to, docstring, include_params: true) diff --git a/lib/yard-sorbet/handlers/struct_prop_handler.rb b/lib/yard-sorbet/handlers/struct_prop_handler.rb index a3050707..32cd1cf6 100644 --- a/lib/yard-sorbet/handlers/struct_prop_handler.rb +++ b/lib/yard-sorbet/handlers/struct_prop_handler.rb @@ -35,15 +35,11 @@ def decorate_object(object, prop) end sig { returns(T::Boolean) } - def immutable? - statement.method_name(true) == :const || kw_arg('immutable:') == 'true' - end + def immutable? = statement.method_name(true) == :const || kw_arg('immutable:') == 'true' # @return the value passed to the keyword argument, or nil sig { params(kwd: String).returns(T.nilable(String)) } - def kw_arg(kwd) - params[2]&.find { _1[0].source == kwd }&.[](1)&.source - end + def kw_arg(kwd) = params[2]&.find { _1[0].source == kwd }&.[](1)&.source sig { params(name: String).returns(TStructProp) } def make_prop(name) @@ -57,9 +53,7 @@ def make_prop(name) end sig { returns(T::Array[YARD::Parser::Ruby::AstNode]) } - def params - @params ||= T.let(statement.parameters(false), T.nilable(T::Array[YARD::Parser::Ruby::AstNode])) - end + def params = @params ||= T.let(statement.parameters(false), T.nilable(T::Array[YARD::Parser::Ruby::AstNode])) # Register the field explicitly as an attribute. sig { params(object: YARD::CodeObjects::MethodObject, name: String).void } diff --git a/lib/yard-sorbet/node_utils.rb b/lib/yard-sorbet/node_utils.rb index 5a595b73..ffa99d72 100644 --- a/lib/yard-sorbet/node_utils.rb +++ b/lib/yard-sorbet/node_utils.rb @@ -28,9 +28,7 @@ def self.bfs_traverse(node, &_blk) end sig { params(node: YARD::Parser::Ruby::AstNode).void } - def self.delete_node(node) - node.parent.children.delete(node) - end + def self.delete_node(node) = node.parent.children.delete(node) # Enqueue the eligible children of a node in the BFS queue sig { params(queue: Queue, node: YARD::Parser::Ruby::AstNode).void } @@ -47,9 +45,7 @@ def self.enqueue_children(queue, node) # Gets the node that a sorbet `sig` can be attached do, bypassing visisbility modifiers and the like sig { params(node: YARD::Parser::Ruby::AstNode).returns(SigableNode) } - def self.get_method_node(node) - sigable_node?(node) ? node : node.jump(:def, :defs) - end + def self.get_method_node(node) = sigable_node?(node) ? node : node.jump(:def, :defs) # Find and return the adjacent node (ascending) # @raise [IndexError] if the node does not have an adjacent sibling (ascending) diff --git a/lib/yard-sorbet/sig_to_yard.rb b/lib/yard-sorbet/sig_to_yard.rb index 9538b18f..564f5d8e 100644 --- a/lib/yard-sorbet/sig_to_yard.rb +++ b/lib/yard-sorbet/sig_to_yard.rb @@ -10,7 +10,7 @@ class << self # Map of common types to YARD conventions (in order to reduce allocations) REF_TYPES = T.let({ 'T::Boolean' => ['Boolean'].freeze, # YARD convention for booleans - # YARD convention is use singleton objects when applicable: + # YARD convention is to use singleton objects when applicable: # https://www.rubydoc.info/gems/yard/file/docs/Tags.md#literals 'FalseClass' => ['false'].freeze, 'NilClass' => ['nil'].freeze, @@ -20,10 +20,7 @@ class << self # @see https://yardoc.org/types.html sig { params(node: YARD::Parser::Ruby::AstNode).returns(T::Array[String]) } - def convert(node) - # scrub newlines, as they break the YARD parser - convert_node(node).map { _1.gsub(/\n\s*/, ' ') } - end + def convert(node) = convert_node(node).map { _1.gsub(/\n\s*/, ' ') } private diff --git a/lib/yard-sorbet/tag_utils.rb b/lib/yard-sorbet/tag_utils.rb index 7bff02e9..6c2da49f 100644 --- a/lib/yard-sorbet/tag_utils.rb +++ b/lib/yard-sorbet/tag_utils.rb @@ -13,9 +13,7 @@ module TagUtils sig do params(docstring: YARD::Docstring, tag_name: String, name: T.nilable(String)).returns(T.nilable(YARD::Tags::Tag)) end - def self.find_tag(docstring, tag_name, name) - docstring.tags.find { _1.tag_name == tag_name && _1.name == name } - end + def self.find_tag(docstring, tag_name, name) = docstring.tags.find { _1.tag_name == tag_name && _1.name == name } # Create or update a `YARD` tag with type information sig do diff --git a/sorbet/rbi/gems/.gitattributes b/sorbet/rbi/gems/.gitattributes new file mode 100644 index 00000000..d9bb82a4 --- /dev/null +++ b/sorbet/rbi/gems/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-generated=true diff --git a/sorbet/rbi/gems/byebug@11.1.3.rbi b/sorbet/rbi/gems/byebug@11.1.3.rbi deleted file mode 100644 index b2aace92..00000000 --- a/sorbet/rbi/gems/byebug@11.1.3.rbi +++ /dev/null @@ -1,3606 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `byebug` gem. -# Please instead update this file by running `bin/tapioca gem byebug`. - -# Reopen main module to define the library version -# -# source://byebug//lib/byebug/helpers/reflection.rb#3 -module Byebug - include ::Byebug::Helpers::ReflectionHelper - extend ::Byebug::Helpers::ReflectionHelper - extend ::Byebug - - # Debugger's display expressions - # - # source://byebug//lib/byebug/core.rb#31 - def displays; end - - # Debugger's display expressions - # - # source://byebug//lib/byebug/core.rb#31 - def displays=(_arg0); end - - # Configuration file used for startup commands. Default value is .byebugrc - # - # source://byebug//lib/byebug/core.rb#25 - def init_file; end - - # Configuration file used for startup commands. Default value is .byebugrc - # - # source://byebug//lib/byebug/core.rb#25 - def init_file=(_arg0); end - - # Running mode of the debugger. Can be either: - # - # * :attached => Attached to a running program through the `byebug` method. - # * :standalone => Started through `byebug` script. - # * :off => Ignoring any `byebug` method calls. - # - # source://byebug//lib/byebug/core.rb#41 - def mode; end - - # Running mode of the debugger. Can be either: - # - # * :attached => Attached to a running program through the `byebug` method. - # * :standalone => Started through `byebug` script. - # * :off => Ignoring any `byebug` method calls. - # - # source://byebug//lib/byebug/core.rb#41 - def mode=(_arg0); end - - # Runs normal byebug initialization scripts. - # - # Reads and executes the commands from init file (if any) in the current - # working directory. This is only done if the current directory is different - # from your home directory. Thus, you can have more than one init file, one - # generic in your home directory, and another, specific to the program you - # are debugging, in the directory where you invoke byebug. - # - # source://byebug//lib/byebug/core.rb#52 - def run_init_script; end - - private - - def add_catchpoint(_arg0); end - def breakpoints; end - def catchpoints; end - def contexts; end - def current_context; end - def debug_load(*_arg0); end - def lock; end - def post_mortem=(_arg0); end - def post_mortem?; end - def raised_exception; end - - # List of folders to load rc files from - # - # @note Files will be loaded in the order specified here. - # - # source://byebug//lib/byebug/core.rb#102 - def rc_dirs; end - - # Runs a initialization script file - # - # source://byebug//lib/byebug/core.rb#91 - def run_rc_file(rc_file); end - - def start; end - def started?; end - def stop; end - def stoppable?; end - def thread_context(_arg0); end - def tracing=(_arg0); end - def tracing?; end - def unlock; end - def verbose=(_arg0); end - def verbose?; end - - class << self - # The actual port that the control server is started at - # - # source://byebug//lib/byebug/remote.rb#25 - def actual_control_port; end - - # The actual port that the server is started at - # - # source://byebug//lib/byebug/remote.rb#20 - def actual_port; end - - def add_catchpoint(_arg0); end - - # Starts byebug, and stops at the first line of user's code. - # - # source://byebug//lib/byebug/attacher.rb#10 - def attach; end - - def breakpoints; end - def catchpoints; end - def contexts; end - def current_context; end - def debug_load(*_arg0); end - - # Saves information about the unhandled exception and gives a byebug - # prompt back to the user before program termination. - # - # source://byebug//lib/byebug/core.rb#76 - def handle_post_mortem; end - - # Interrupts the current thread - # - # source://byebug//lib/byebug/remote.rb#32 - def interrupt; end - - # source://byebug//lib/byebug/core.rb#61 - def load_settings; end - - def lock; end - - # source://byebug//lib/byebug/remote.rb#59 - def parse_host_and_port(host_port_spec); end - - def post_mortem=(_arg0); end - def post_mortem?; end - def raised_exception; end - - # source://byebug//lib/byebug/attacher.rb#21 - def spawn(host = T.unsafe(nil), port = T.unsafe(nil)); end - - def start; end - - # Connects to the remote byebug - # - # source://byebug//lib/byebug/remote.rb#55 - def start_client(host = T.unsafe(nil), port = T.unsafe(nil)); end - - # Starts the remote server control thread - # - # source://byebug//lib/byebug/remote.rb#48 - def start_control(host = T.unsafe(nil), port = T.unsafe(nil)); end - - # Starts the remote server main thread - # - # source://byebug//lib/byebug/remote.rb#39 - def start_server(host = T.unsafe(nil), port = T.unsafe(nil)); end - - def started?; end - def stop; end - def stoppable?; end - def thread_context(_arg0); end - def tracing=(_arg0); end - def tracing?; end - def unlock; end - def verbose=(_arg0); end - def verbose?; end - - # If in remote mode, wait for the remote connection - # - # source://byebug//lib/byebug/remote.rb#17 - def wait_connection; end - - # If in remote mode, wait for the remote connection - # - # source://byebug//lib/byebug/remote.rb#17 - def wait_connection=(_arg0); end - - private - - # source://byebug//lib/byebug/remote.rb#66 - def client; end - - # source://byebug//lib/byebug/remote.rb#76 - def control; end - - # source://byebug//lib/byebug/remote.rb#70 - def server; end - end -end - -# Setting for automatically invoking IRB on every stop. -# -# source://byebug//lib/byebug/settings/autoirb.rb#10 -class Byebug::AutoirbSetting < ::Byebug::Setting - # @return [AutoirbSetting] a new instance of AutoirbSetting - # - # source://byebug//lib/byebug/settings/autoirb.rb#13 - def initialize; end - - # source://byebug//lib/byebug/settings/autoirb.rb#17 - def banner; end - - # source://byebug//lib/byebug/settings/autoirb.rb#25 - def value; end - - # source://byebug//lib/byebug/settings/autoirb.rb#21 - def value=(val); end -end - -# source://byebug//lib/byebug/settings/autoirb.rb#11 -Byebug::AutoirbSetting::DEFAULT = T.let(T.unsafe(nil), Integer) - -# Setting for automatically listing source code on every stop. -# -# source://byebug//lib/byebug/settings/autolist.rb#10 -class Byebug::AutolistSetting < ::Byebug::Setting - # @return [AutolistSetting] a new instance of AutolistSetting - # - # source://byebug//lib/byebug/settings/autolist.rb#13 - def initialize; end - - # source://byebug//lib/byebug/settings/autolist.rb#17 - def banner; end - - # source://byebug//lib/byebug/settings/autolist.rb#25 - def value; end - - # source://byebug//lib/byebug/settings/autolist.rb#21 - def value=(val); end -end - -# source://byebug//lib/byebug/settings/autolist.rb#11 -Byebug::AutolistSetting::DEFAULT = T.let(T.unsafe(nil), Integer) - -# Setting for automatically invoking Pry on every stop. -# -# source://byebug//lib/byebug/settings/autopry.rb#10 -class Byebug::AutoprySetting < ::Byebug::Setting - # @return [AutoprySetting] a new instance of AutoprySetting - # - # source://byebug//lib/byebug/settings/autopry.rb#13 - def initialize; end - - # source://byebug//lib/byebug/settings/autopry.rb#17 - def banner; end - - # source://byebug//lib/byebug/settings/autopry.rb#25 - def value; end - - # source://byebug//lib/byebug/settings/autopry.rb#21 - def value=(val); end -end - -# source://byebug//lib/byebug/settings/autopry.rb#11 -Byebug::AutoprySetting::DEFAULT = T.let(T.unsafe(nil), Integer) - -# Setting for automatically saving previously entered commands to history -# when exiting the debugger. -# -# source://byebug//lib/byebug/settings/autosave.rb#10 -class Byebug::AutosaveSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/autosave.rb#13 - def banner; end -end - -# source://byebug//lib/byebug/settings/autosave.rb#11 -Byebug::AutosaveSetting::DEFAULT = T.let(T.unsafe(nil), TrueClass) - -# Command to display short paths in file names. -# -# For example, when displaying source code information. -# -# source://byebug//lib/byebug/settings/basename.rb#11 -class Byebug::BasenameSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/basename.rb#12 - def banner; end -end - -# Implements breakpoint functionality -# -# source://byebug//lib/byebug/commands/break.rb#13 -class Byebug::BreakCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - include ::Byebug::Helpers::FileHelper - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/break.rb#40 - def execute; end - - private - - # source://byebug//lib/byebug/commands/break.rb#83 - def add_line_breakpoint(file, line); end - - # source://byebug//lib/byebug/commands/break.rb#54 - def line_breakpoint(location); end - - # source://byebug//lib/byebug/commands/break.rb#65 - def method_breakpoint(location); end - - # source://byebug//lib/byebug/commands/break.rb#74 - def target_object(str); end - - # source://byebug//lib/byebug/commands/break.rb#104 - def valid_breakpoints_for(path, line); end - - class << self - # source://byebug//lib/byebug/commands/break.rb#24 - def description; end - - # source://byebug//lib/byebug/commands/break.rb#20 - def regexp; end - - # source://byebug//lib/byebug/commands/break.rb#36 - def short_description; end - end -end - -# Implements breakpoints -# -# source://byebug//lib/byebug/breakpoint.rb#7 -class Byebug::Breakpoint - def initialize(_arg0, _arg1, _arg2); end - - def enabled=(_arg0); end - def enabled?; end - def expr; end - def expr=(_arg0); end - def hit_condition; end - def hit_condition=(_arg0); end - def hit_count; end - def hit_value; end - def hit_value=(_arg0); end - def id; end - - # Prints all information associated to the breakpoint - # - # source://byebug//lib/byebug/breakpoint.rb#105 - def inspect; end - - def pos; end - def source; end - - class << self - # Adds a new breakpoint - # - # @param file [String] - # @param line [Fixnum] - # @param expr [String] - # - # source://byebug//lib/byebug/breakpoint.rb#29 - def add(file, line, expr = T.unsafe(nil)); end - - # First breakpoint, in order of creation - # - # source://byebug//lib/byebug/breakpoint.rb#11 - def first; end - - # Last breakpoint, in order of creation - # - # source://byebug//lib/byebug/breakpoint.rb#18 - def last; end - - # True if there's no breakpoints - # - # @return [Boolean] - # - # source://byebug//lib/byebug/breakpoint.rb#98 - def none?; end - - # Returns true if a breakpoint could be set in line number +lineno+ in file - # name +filename. - # - # @return [Boolean] - # - # source://byebug//lib/byebug/breakpoint.rb#91 - def potential_line?(filename, lineno); end - - # Returns an array of line numbers in file named +filename+ where - # breakpoints could be set. The list will contain an entry for each - # distinct line event call so it is possible (and possibly useful) for a - # line number appear more than once. - # - # @param filename [String] File name to inspect for possible breakpoints - # - # source://byebug//lib/byebug/breakpoint.rb#52 - def potential_lines(filename); end - - # Removes a breakpoint - # - # @param id [integer] breakpoint number - # - # source://byebug//lib/byebug/breakpoint.rb#40 - def remove(id); end - - private - - # source://byebug//lib/byebug/breakpoint.rb#63 - def potential_lines_with_trace_points(iseq, lines); end - - # source://byebug//lib/byebug/breakpoint.rb#74 - def potential_lines_without_trace_points(iseq, lines); end - end -end - -# Setting to customize the verbosity level for stack frames. -# -# source://byebug//lib/byebug/settings/callstyle.rb#9 -class Byebug::CallstyleSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/callstyle.rb#12 - def banner; end - - # source://byebug//lib/byebug/settings/callstyle.rb#16 - def to_s; end -end - -# source://byebug//lib/byebug/settings/callstyle.rb#10 -Byebug::CallstyleSetting::DEFAULT = T.let(T.unsafe(nil), String) - -# Implements exception catching. -# -# Enables the user to catch unhandled assertion when they happen. -# -# source://byebug//lib/byebug/commands/catch.rb#12 -class Byebug::CatchCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - - # source://byebug//lib/byebug/commands/catch.rb#38 - def execute; end - - private - - # source://byebug//lib/byebug/commands/catch.rb#57 - def add(exception); end - - # source://byebug//lib/byebug/commands/catch.rb#64 - def clear; end - - # source://byebug//lib/byebug/commands/catch.rb#68 - def info; end - - # source://byebug//lib/byebug/commands/catch.rb#50 - def remove(exception); end - - class << self - # source://byebug//lib/byebug/commands/catch.rb#21 - def description; end - - # source://byebug//lib/byebug/commands/catch.rb#17 - def regexp; end - - # source://byebug//lib/byebug/commands/catch.rb#34 - def short_description; end - end -end - -# Parent class of all byebug commands. -# -# Subclass it and name the subclass ending with the word Command to implement -# your own custom command. -# -# class MyCustomCommand < Command -# def self.regexp -# /custom_regexp/ -# end -# -# def self.description -# "Custom long desc" -# end -# -# def.short_description -# "Custom short desc" -# end -# -# def execute -# # My command's implementation -# end -# end -# -# @example Define a custom command -# -# source://byebug//lib/byebug/command.rb#33 -class Byebug::Command - extend ::Forwardable - extend ::Byebug::Helpers::StringHelper - - # @return [Command] a new instance of Command - # - # source://byebug//lib/byebug/command.rb#38 - def initialize(processor, input = T.unsafe(nil)); end - - # source://byebug//lib/byebug/command.rb#51 - def arguments; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def confirm(*args, **_arg1, &block); end - - # source://byebug//lib/byebug/command.rb#43 - def context; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def errmsg(*args, **_arg1, &block); end - - # source://byebug//lib/byebug/command.rb#47 - def frame; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def help(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def match(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pr(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prc(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print(*args, **_arg1, &block); end - - # Returns the value of attribute processor. - # - # source://byebug//lib/byebug/command.rb#36 - def processor; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prv(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def puts(*args, **_arg1, &block); end - - class << self - # Special methods to allow command filtering in processors - # - # source://byebug//lib/byebug/command.rb#69 - def allow_in_control; end - - # Special methods to allow command filtering in processors - # - # source://byebug//lib/byebug/command.rb#69 - def allow_in_control=(_arg0); end - - # Special methods to allow command filtering in processors - # - # source://byebug//lib/byebug/command.rb#69 - def allow_in_post_mortem; end - - # Special methods to allow command filtering in processors - # - # source://byebug//lib/byebug/command.rb#69 - def allow_in_post_mortem=(_arg0); end - - # source://byebug//lib/byebug/command.rb#73 - def always_run; end - - # Sets the attribute always_run - # - # @param value the value to set the attribute always_run to. - # - # source://byebug//lib/byebug/command.rb#71 - def always_run=(_arg0); end - - # source://byebug//lib/byebug/command.rb#88 - def columnize(width); end - - # Default help text for a command. - # - # source://byebug//lib/byebug/command.rb#99 - def help; end - - # Command's regexp match against an input - # - # source://byebug//lib/byebug/command.rb#106 - def match(input); end - - # Name of the command, as executed by the user. - # - # source://byebug//lib/byebug/command.rb#80 - def to_s; end - end -end - -# Holds an array of subcommands for a command -# -# source://byebug//lib/byebug/command_list.rb#9 -class Byebug::CommandList - include ::Enumerable - - # @return [CommandList] a new instance of CommandList - # - # source://byebug//lib/byebug/command_list.rb#12 - def initialize(commands); end - - # source://byebug//lib/byebug/command_list.rb#20 - def each; end - - # source://byebug//lib/byebug/command_list.rb#16 - def match(input); end - - # source://byebug//lib/byebug/command_list.rb#24 - def to_s; end - - private - - # source://byebug//lib/byebug/command_list.rb#30 - def width; end -end - -# Custom exception exception to signal "command not found" errors -# -# source://byebug//lib/byebug/errors.rb#7 -class Byebug::CommandNotFound < ::NoMethodError - # @return [CommandNotFound] a new instance of CommandNotFound - # - # source://byebug//lib/byebug/errors.rb#8 - def initialize(input, parent = T.unsafe(nil)); end - - private - - # source://byebug//lib/byebug/errors.rb#25 - def build_cmd(*args); end - - # source://byebug//lib/byebug/errors.rb#21 - def help; end - - # source://byebug//lib/byebug/errors.rb#17 - def name; end -end - -# Processes commands in regular mode. -# -# You can override this class to create your own command processor that, for -# example, whitelists only certain commands to be executed. -# -# @see PostMortemProcessor for a example -# -# source://byebug//lib/byebug/processors/command_processor.rb#17 -class Byebug::CommandProcessor - include ::Byebug::Helpers::EvalHelper - extend ::Forwardable - - # @return [CommandProcessor] a new instance of CommandProcessor - # - # source://byebug//lib/byebug/processors/command_processor.rb#23 - def initialize(context, interface = T.unsafe(nil)); end - - # source://byebug//lib/byebug/processors/command_processor.rb#64 - def at_breakpoint(brkpt); end - - # source://byebug//lib/byebug/processors/command_processor.rb#70 - def at_catchpoint(exception); end - - # source://byebug//lib/byebug/processors/command_processor.rb#80 - def at_end; end - - # source://byebug//lib/byebug/processors/command_processor.rb#54 - def at_line; end - - # source://byebug//lib/byebug/processors/command_processor.rb#74 - def at_return(return_value); end - - # source://byebug//lib/byebug/processors/command_processor.rb#58 - def at_tracing; end - - # Available commands - # - # source://byebug//lib/byebug/processors/command_processor.rb#50 - def command_list; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def confirm(*args, **_arg1, &block); end - - # Returns the value of attribute context. - # - # source://byebug//lib/byebug/processors/command_processor.rb#21 - def context; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def errmsg(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def frame(*args, **_arg1, &block); end - - # Returns the value of attribute interface. - # - # source://byebug//lib/byebug/processors/command_processor.rb#21 - def interface; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pr(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prc(*args, **_arg1, &block); end - - # Returns the value of attribute prev_line. - # - # source://byebug//lib/byebug/processors/command_processor.rb#20 - def prev_line; end - - # Sets the attribute prev_line - # - # @param value the value to set the attribute prev_line to. - # - # source://byebug//lib/byebug/processors/command_processor.rb#20 - def prev_line=(_arg0); end - - # source://byebug//lib/byebug/processors/command_processor.rb#31 - def printer; end - - # Let the execution continue - # - # source://byebug//lib/byebug/processors/command_processor.rb#87 - def proceed!; end - - # Handle byebug commands. - # - # source://byebug//lib/byebug/processors/command_processor.rb#94 - def process_commands; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prv(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def puts(*args, **_arg1, &block); end - - protected - - # source://byebug//lib/byebug/processors/command_processor.rb#119 - def after_repl; end - - # source://byebug//lib/byebug/processors/command_processor.rb#111 - def before_repl; end - - # Prompt shown before reading a command. - # - # source://byebug//lib/byebug/processors/command_processor.rb#107 - def prompt; end - - # Main byebug's REPL - # - # source://byebug//lib/byebug/processors/command_processor.rb#126 - def repl; end - - private - - # source://byebug//lib/byebug/processors/command_processor.rb#139 - def auto_cmds_for(run_level); end - - # Run permanent commands. - # - # source://byebug//lib/byebug/processors/command_processor.rb#146 - def run_auto_cmds(run_level); end - - # Executes the received input - # - # Instantiates a command matching the input and runs it. If a matching - # command is not found, it evaluates the unknown input. - # - # source://byebug//lib/byebug/processors/command_processor.rb#158 - def run_cmd(input); end - - # source://byebug//lib/byebug/processors/command_processor.rb#167 - def safely; end -end - -# Implements conditions on breakpoints. -# -# Adds the ability to stop on breakpoints only under certain conditions. -# -# source://byebug//lib/byebug/commands/condition.rb#12 -class Byebug::ConditionCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/condition.rb#38 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/condition.rb#21 - def description; end - - # source://byebug//lib/byebug/commands/condition.rb#17 - def regexp; end - - # source://byebug//lib/byebug/commands/condition.rb#34 - def short_description; end - end -end - -# Mantains context information for the debugger and it's the main -# communication point between the library and the C-extension through the -# at_breakpoint, at_catchpoint, at_tracing, at_line and at_return callbacks -# -# source://byebug//lib/byebug/context.rb#14 -class Byebug::Context - include ::Byebug::Helpers::FileHelper - extend ::Byebug::Helpers::PathHelper - extend ::Forwardable - - # Breakpoint handler - # - # source://byebug//lib/byebug/context.rb#113 - def at_breakpoint(breakpoint); end - - # Catchpoint handler - # - # source://byebug//lib/byebug/context.rb#120 - def at_catchpoint(exception); end - - # End of class definition handler - # - # source://byebug//lib/byebug/context.rb#136 - def at_end; end - - # Line handler - # - # source://byebug//lib/byebug/context.rb#94 - def at_line; end - - # Return handler - # - # source://byebug//lib/byebug/context.rb#127 - def at_return(return_value); end - - # Tracing handler - # - # source://byebug//lib/byebug/context.rb#104 - def at_tracing; end - - def backtrace; end - def dead?; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def file(*args, **_arg1, &block); end - - # Reader for the current frame - # - # source://byebug//lib/byebug/context.rb#46 - def frame; end - - # Writer for the current frame - # - # source://byebug//lib/byebug/context.rb#53 - def frame=(pos); end - - def frame_binding(*_arg0); end - def frame_class(*_arg0); end - def frame_file(*_arg0); end - def frame_line(*_arg0); end - def frame_method(*_arg0); end - def frame_self(*_arg0); end - - # Current file, line and source code information - # - # source://byebug//lib/byebug/context.rb#70 - def full_location; end - - def ignored?; end - - # source://byebug//lib/byebug/context.rb#87 - def interrupt; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def line(*args, **_arg1, &block); end - - # Current file & line information - # - # source://byebug//lib/byebug/context.rb#63 - def location; end - - def resume; end - - # Context's stack size - # - # source://byebug//lib/byebug/context.rb#79 - def stack_size; end - - def step_into(*_arg0); end - def step_out(*_arg0); end - def step_over(*_arg0); end - def stop_reason; end - def suspend; end - def suspended?; end - def switch; end - def thnum; end - def thread; end - def tracing; end - def tracing=(_arg0); end - - private - - # Tells whether a file is ignored by the debugger. - # - # @param path [String] filename to be checked. - # @return [Boolean] - # - # source://byebug//lib/byebug/context.rb#153 - def ignored_file?(path); end - - # source://byebug//lib/byebug/context.rb#144 - def processor; end - - class << self - # List of files byebug will ignore while debugging - # - # source://byebug//lib/byebug/context.rb#25 - def ignored_files; end - - # Sets the attribute ignored_files - # - # @param value the value to set the attribute ignored_files to. - # - # source://byebug//lib/byebug/context.rb#20 - def ignored_files=(_arg0); end - - # source://byebug//lib/byebug/context.rb#32 - def interface; end - - # Sets the attribute interface - # - # @param value the value to set the attribute interface to. - # - # source://byebug//lib/byebug/context.rb#30 - def interface=(_arg0); end - - # source://byebug//lib/byebug/context.rb#38 - def processor; end - - # Sets the attribute processor - # - # @param value the value to set the attribute processor to. - # - # source://byebug//lib/byebug/context.rb#36 - def processor=(_arg0); end - end -end - -# Implements the continue command. -# -# Allows the user to continue execution until the next stopping point, a -# specific line number or until program termination. -# -# source://byebug//lib/byebug/commands/continue.rb#13 -class Byebug::ContinueCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/continue.rb#37 - def execute; end - - private - - # source://byebug//lib/byebug/commands/continue.rb#64 - def modifier; end - - # @return [Boolean] - # - # source://byebug//lib/byebug/commands/continue.rb#60 - def unconditionally?; end - - # @return [Boolean] - # - # source://byebug//lib/byebug/commands/continue.rb#56 - def until_line?; end - - class << self - # source://byebug//lib/byebug/commands/continue.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/continue.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/continue.rb#33 - def short_description; end - end -end - -# Processes commands when there's not program running -# -# source://byebug//lib/byebug/processors/control_processor.rb#9 -class Byebug::ControlProcessor < ::Byebug::CommandProcessor - # Available commands - # - # source://byebug//lib/byebug/processors/control_processor.rb#13 - def commands; end - - # Prompt shown before reading a command. - # - # source://byebug//lib/byebug/processors/control_processor.rb#20 - def prompt; end -end - -# Spawns a subdebugger and evaluates the given expression -# -# source://byebug//lib/byebug/commands/debug.rb#10 -class Byebug::DebugCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - - # source://byebug//lib/byebug/commands/debug.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/debug.rb#17 - def description; end - - # source://byebug//lib/byebug/commands/debug.rb#13 - def regexp; end - - # source://byebug//lib/byebug/commands/debug.rb#28 - def short_description; end - end -end - -class Byebug::DebugThread < ::Thread - class << self - def inherited; end - end -end - -# Implements breakpoint deletion. -# -# source://byebug//lib/byebug/commands/delete.rb#10 -class Byebug::DeleteCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/delete.rb#35 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/delete.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/delete.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/delete.rb#31 - def short_description; end - end -end - -# Disabling custom display expressions or breakpoints. -# -# source://byebug//lib/byebug/commands/disable/breakpoints.rb#9 -class Byebug::DisableCommand < ::Byebug::Command - include ::Byebug::Subcommands - extend ::Byebug::Helpers::ReflectionHelper - extend ::Byebug::Subcommands::ClassMethods - - class << self - # source://byebug//lib/byebug/commands/disable.rb#21 - def description; end - - # source://byebug//lib/byebug/commands/disable.rb#17 - def regexp; end - - # source://byebug//lib/byebug/commands/disable.rb#29 - def short_description; end - end -end - -# Disables all or specific breakpoints -# -# source://byebug//lib/byebug/commands/disable/breakpoints.rb#13 -class Byebug::DisableCommand::BreakpointsCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - include ::Byebug::Helpers::ToggleHelper - - # source://byebug//lib/byebug/commands/disable/breakpoints.rb#37 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/disable/breakpoints.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/disable/breakpoints.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/disable/breakpoints.rb#33 - def short_description; end - end -end - -# Enables all or specific displays -# -# source://byebug//lib/byebug/commands/disable/display.rb#13 -class Byebug::DisableCommand::DisplayCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - include ::Byebug::Helpers::ToggleHelper - - # source://byebug//lib/byebug/commands/disable/display.rb#38 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/disable/display.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/disable/display.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/disable/display.rb#34 - def short_description; end - end -end - -# Custom expressions to be displayed every time the debugger stops. -# -# source://byebug//lib/byebug/commands/display.rb#10 -class Byebug::DisplayCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - - # source://byebug//lib/byebug/commands/display.rb#35 - def execute; end - - private - - # source://byebug//lib/byebug/commands/display.rb#44 - def display_expression(exp); end - - # source://byebug//lib/byebug/commands/display.rb#60 - def eval_expr(expression); end - - # source://byebug//lib/byebug/commands/display.rb#50 - def print_display_expressions; end - - class << self - # source://byebug//lib/byebug/commands/display.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/display.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/display.rb#31 - def short_description; end - end -end - -# Move the current frame down in the backtrace. -# -# source://byebug//lib/byebug/commands/down.rb#12 -class Byebug::DownCommand < ::Byebug::Command - include ::Byebug::Helpers::FrameHelper - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/down.rb#36 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/down.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/down.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/down.rb#32 - def short_description; end - end -end - -# Edit a file from byebug's prompt. -# -# source://byebug//lib/byebug/commands/edit.rb#9 -class Byebug::EditCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/edit.rb#33 - def execute; end - - private - - # source://byebug//lib/byebug/commands/edit.rb#65 - def edit_error(type, file); end - - # source://byebug//lib/byebug/commands/edit.rb#61 - def editor; end - - # source://byebug//lib/byebug/commands/edit.rb#45 - def location(matched); end - - class << self - # source://byebug//lib/byebug/commands/edit.rb#17 - def description; end - - # source://byebug//lib/byebug/commands/edit.rb#13 - def regexp; end - - # source://byebug//lib/byebug/commands/edit.rb#29 - def short_description; end - end -end - -# Enabling custom display expressions or breakpoints. -# -# source://byebug//lib/byebug/commands/enable/breakpoints.rb#9 -class Byebug::EnableCommand < ::Byebug::Command - include ::Byebug::Subcommands - extend ::Byebug::Helpers::ReflectionHelper - extend ::Byebug::Subcommands::ClassMethods - - class << self - # source://byebug//lib/byebug/commands/enable.rb#21 - def description; end - - # source://byebug//lib/byebug/commands/enable.rb#17 - def regexp; end - - # source://byebug//lib/byebug/commands/enable.rb#29 - def short_description; end - end -end - -# Enables all or specific breakpoints -# -# source://byebug//lib/byebug/commands/enable/breakpoints.rb#13 -class Byebug::EnableCommand::BreakpointsCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - include ::Byebug::Helpers::ToggleHelper - - # source://byebug//lib/byebug/commands/enable/breakpoints.rb#37 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/enable/breakpoints.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/enable/breakpoints.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/enable/breakpoints.rb#33 - def short_description; end - end -end - -# Enables all or specific displays -# -# source://byebug//lib/byebug/commands/enable/display.rb#13 -class Byebug::EnableCommand::DisplayCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - include ::Byebug::Helpers::ToggleHelper - - # source://byebug//lib/byebug/commands/enable/display.rb#38 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/enable/display.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/enable/display.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/enable/display.rb#34 - def short_description; end - end -end - -# Implements the finish functionality. -# -# Allows the user to continue execution until certain frames are finished. -# -# source://byebug//lib/byebug/commands/finish.rb#12 -class Byebug::FinishCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/finish.rb#37 - def execute; end - - private - - # source://byebug//lib/byebug/commands/finish.rb#53 - def max_frames; end - - class << self - # source://byebug//lib/byebug/commands/finish.rb#21 - def description; end - - # source://byebug//lib/byebug/commands/finish.rb#17 - def regexp; end - - # source://byebug//lib/byebug/commands/finish.rb#33 - def short_description; end - end -end - -# Represents a frame in the stack trace -# -# source://byebug//lib/byebug/frame.rb#9 -class Byebug::Frame - include ::Byebug::Helpers::FileHelper - - # @return [Frame] a new instance of Frame - # - # source://byebug//lib/byebug/frame.rb#14 - def initialize(context, pos); end - - # source://byebug//lib/byebug/frame.rb#31 - def _binding; end - - # source://byebug//lib/byebug/frame.rb#35 - def _class; end - - # source://byebug//lib/byebug/frame.rb#39 - def _method; end - - # source://byebug//lib/byebug/frame.rb#27 - def _self; end - - # Gets current method arguments for the frame. - # - # source://byebug//lib/byebug/frame.rb#62 - def args; end - - # Checks whether the frame is a c-frame - # - # @return [Boolean] - # - # source://byebug//lib/byebug/frame.rb#141 - def c_frame?; end - - # @return [Boolean] - # - # source://byebug//lib/byebug/frame.rb#43 - def current?; end - - # Builds a string containing all available args in the frame number, in a - # verbose or non verbose way according to the value of the +callstyle+ - # setting - # - # source://byebug//lib/byebug/frame.rb#89 - def deco_args; end - - # source://byebug//lib/byebug/frame.rb#76 - def deco_block; end - - # Builds a formatted string containing information about current method call - # - # source://byebug//lib/byebug/frame.rb#106 - def deco_call; end - - # Returns the current class in the frame or an empty string if the current - # +callstyle+ setting is 'short' - # - # source://byebug//lib/byebug/frame.rb#72 - def deco_class; end - - # Formatted filename in frame - # - # source://byebug//lib/byebug/frame.rb#113 - def deco_file; end - - # source://byebug//lib/byebug/frame.rb#80 - def deco_method; end - - # Properly formatted frame number of frame - # - # source://byebug//lib/byebug/frame.rb#120 - def deco_pos; end - - # source://byebug//lib/byebug/frame.rb#19 - def file; end - - # source://byebug//lib/byebug/frame.rb#23 - def line; end - - # Gets local variables for the frame. - # - # source://byebug//lib/byebug/frame.rb#50 - def locals; end - - # Formatted mark for the frame. - # - # --> marks the current frame - # ͱ-- marks c-frames - # marks regular frames - # - # source://byebug//lib/byebug/frame.rb#131 - def mark; end - - # Returns the value of attribute pos. - # - # source://byebug//lib/byebug/frame.rb#12 - def pos; end - - # source://byebug//lib/byebug/frame.rb#145 - def to_hash; end - - private - - # source://byebug//lib/byebug/frame.rb#158 - def c_args; end - - # source://byebug//lib/byebug/frame.rb#178 - def prefix_and_default(arg_type); end - - # source://byebug//lib/byebug/frame.rb#164 - def ruby_args; end - - # @return [Boolean] - # - # source://byebug//lib/byebug/frame.rb#174 - def use_short_style?(arg); end -end - -# Move to specific frames in the backtrace. -# -# source://byebug//lib/byebug/commands/frame.rb#12 -class Byebug::FrameCommand < ::Byebug::Command - include ::Byebug::Helpers::FrameHelper - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/frame.rb#46 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/frame.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/frame.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/frame.rb#42 - def short_description; end - end -end - -# Setting to display full paths in backtraces. -# -# source://byebug//lib/byebug/settings/fullpath.rb#9 -class Byebug::FullpathSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/fullpath.rb#12 - def banner; end -end - -# source://byebug//lib/byebug/settings/fullpath.rb#10 -Byebug::FullpathSetting::DEFAULT = T.let(T.unsafe(nil), TrueClass) - -# Ask for help from byebug's prompt. -# -# source://byebug//lib/byebug/commands/help.rb#10 -class Byebug::HelpCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/help.rb#34 - def execute; end - - private - - # source://byebug//lib/byebug/commands/help.rb#54 - def command; end - - # @raise [CommandNotFound] - # - # source://byebug//lib/byebug/commands/help.rb#48 - def help_for(input, cmd); end - - # source://byebug//lib/byebug/commands/help.rb#44 - def help_for_all; end - - # source://byebug//lib/byebug/commands/help.rb#58 - def subcommand; end - - class << self - # source://byebug//lib/byebug/commands/help.rb#18 - def description; end - - # source://byebug//lib/byebug/commands/help.rb#14 - def regexp; end - - # source://byebug//lib/byebug/commands/help.rb#30 - def short_description; end - end -end - -# source://byebug//lib/byebug/helpers/reflection.rb#4 -module Byebug::Helpers; end - -# Utilities for interaction with executables -# -# source://byebug//lib/byebug/helpers/bin.rb#8 -module Byebug::Helpers::BinHelper - # source://byebug//lib/byebug/helpers/bin.rb#38 - def executable_file_extensions; end - - # source://byebug//lib/byebug/helpers/bin.rb#24 - def find_executable(path, cmd); end - - # @return [Boolean] - # - # source://byebug//lib/byebug/helpers/bin.rb#42 - def real_executable?(file); end - - # source://byebug//lib/byebug/helpers/bin.rb#34 - def search_paths; end - - # Cross-platform way of finding an executable in the $PATH. - # Adapted from: https://gist.github.com/steakknife/88b6c3837a5e90a08296 - # - # source://byebug//lib/byebug/helpers/bin.rb#13 - def which(cmd); end -end - -# Utilities to assist evaluation of code strings -# -# source://byebug//lib/byebug/helpers/eval.rb#8 -module Byebug::Helpers::EvalHelper - # Evaluates a string containing Ruby code in a specific binding, - # handling the errors at an error level. - # - # source://byebug//lib/byebug/helpers/eval.rb#46 - def error_eval(str, binding = T.unsafe(nil)); end - - # Evaluates an +expression+ that might use or defer execution to threads - # other than the current one. - # - # "frozen" so that nothing gets run. So we need to unlock threads prior - # to evaluation or we will run into a deadlock. - # - # @note This is necessary because when in byebug's prompt, every thread is - # @param expression [String] Expression to evaluate - # - # source://byebug//lib/byebug/helpers/eval.rb#30 - def multiple_thread_eval(expression); end - - # Evaluates an +expression+ in a separate thread. - # - # @param expression [String] Expression to evaluate - # - # source://byebug//lib/byebug/helpers/eval.rb#14 - def separate_thread_eval(expression); end - - # Evaluates a string containing Ruby code in a specific binding, - # returning nil in an error happens. - # - # source://byebug//lib/byebug/helpers/eval.rb#38 - def silent_eval(str, binding = T.unsafe(nil)); end - - # Evaluates a string containing Ruby code in a specific binding, - # handling the errors at a warning level. - # - # source://byebug//lib/byebug/helpers/eval.rb#54 - def warning_eval(str, binding = T.unsafe(nil)); end - - private - - # Run block temporarily ignoring all TracePoint events. - # - # Used to evaluate stuff within Byebug's prompt. Otherwise, any code - # creating new threads won't be properly evaluated because new threads - # will get blocked by byebug's main thread. - # - # source://byebug//lib/byebug/helpers/eval.rb#91 - def allowing_other_threads; end - - # source://byebug//lib/byebug/helpers/eval.rb#72 - def error_msg(exception); end - - # Runs the given block in a new thread, waits for it to finish and - # returns the new thread's result. - # - # source://byebug//lib/byebug/helpers/eval.rb#105 - def in_new_thread; end - - # source://byebug//lib/byebug/helpers/eval.rb#66 - def msg(exception); end - - # source://byebug//lib/byebug/helpers/eval.rb#60 - def safe_eval(str, binding); end - - # source://byebug//lib/byebug/helpers/eval.rb#113 - def safe_inspect(var); end - - # source://byebug//lib/byebug/helpers/eval.rb#119 - def safe_to_s(var); end - - # source://byebug//lib/byebug/helpers/eval.rb#80 - def warning_msg(exception); end -end - -# Utilities for interaction with files -# -# source://byebug//lib/byebug/helpers/file.rb#8 -module Byebug::Helpers::FileHelper - # Reads line number +lineno+ from file named +filename+ - # - # source://byebug//lib/byebug/helpers/file.rb#19 - def get_line(filename, lineno); end - - # Reads lines of source file +filename+ into an array - # - # source://byebug//lib/byebug/helpers/file.rb#12 - def get_lines(filename); end - - # Returns the number of lines in file +filename+ in a portable, - # one-line-at-a-time way. - # - # source://byebug//lib/byebug/helpers/file.rb#30 - def n_lines(filename); end - - # Regularize file name. - # - # source://byebug//lib/byebug/helpers/file.rb#37 - def normalize(filename); end - - # A short version of a long path - # - # source://byebug//lib/byebug/helpers/file.rb#48 - def shortpath(fullpath); end - - # True for special files like -e, false otherwise - # - # @return [Boolean] - # - # source://byebug//lib/byebug/helpers/file.rb#58 - def virtual_file?(name); end -end - -# Utilities to assist frame navigation -# -# source://byebug//lib/byebug/helpers/frame.rb#8 -module Byebug::Helpers::FrameHelper - # source://byebug//lib/byebug/helpers/frame.rb#16 - def jump_frames(steps); end - - # source://byebug//lib/byebug/helpers/frame.rb#9 - def switch_to_frame(frame); end - - private - - # source://byebug//lib/byebug/helpers/frame.rb#22 - def adjust_frame(new_frame); end - - # @param step [Integer] A positive or negative integer - # @return [Integer] +1 if step is positive / -1 if negative - # - # source://byebug//lib/byebug/helpers/frame.rb#60 - def direction(step); end - - # source://byebug//lib/byebug/helpers/frame.rb#51 - def frame_err(msg); end - - # Convert a possibly negative index to a positive index from the start - # of the callstack. -1 is the last position in the stack and so on. - # - # @param i [Integer] Integer to be converted in a proper positive index. - # - # source://byebug//lib/byebug/helpers/frame.rb#70 - def index_from_start(index); end - - # source://byebug//lib/byebug/helpers/frame.rb#30 - def navigate_to_frame(jump_no); end - - # @return [Boolean] - # - # source://byebug//lib/byebug/helpers/frame.rb#47 - def out_of_bounds?(pos); end -end - -# Utilities to assist command parsing -# -# source://byebug//lib/byebug/helpers/parse.rb#8 -module Byebug::Helpers::ParseHelper - # Parses +str+ of command +cmd+ as an integer between +min+ and +max+. - # - # If either +min+ or +max+ is nil, that value has no bound. - # - # purpose. - # - # @todo Remove the `cmd` parameter. It has nothing to do with the method's - # - # source://byebug//lib/byebug/helpers/parse.rb#17 - def get_int(str, cmd, min = T.unsafe(nil), max = T.unsafe(nil)); end - - # @return +str+ as an integer or 1 if +str+ is empty. - # - # source://byebug//lib/byebug/helpers/parse.rb#51 - def parse_steps(str, cmd); end - - # @return [Boolean] true if code is syntactically correct for Ruby, false otherwise - # - # source://byebug//lib/byebug/helpers/parse.rb#35 - def syntax_valid?(code); end - - private - - # Temporarily disable output to $stderr - # - # source://byebug//lib/byebug/helpers/parse.rb#65 - def without_stderr; end -end - -# Utilities for managing gem paths -# -# source://byebug//lib/byebug/helpers/path.rb#8 -module Byebug::Helpers::PathHelper - # source://byebug//lib/byebug/helpers/path.rb#29 - def all_files; end - - # source://byebug//lib/byebug/helpers/path.rb#9 - def bin_file; end - - # source://byebug//lib/byebug/helpers/path.rb#25 - def gem_files; end - - # source://byebug//lib/byebug/helpers/path.rb#17 - def lib_files; end - - # source://byebug//lib/byebug/helpers/path.rb#13 - def root_path; end - - # source://byebug//lib/byebug/helpers/path.rb#21 - def test_files; end - - private - - # source://byebug//lib/byebug/helpers/path.rb#35 - def glob_for(dir); end -end - -# Reflection utilitie -# -# source://byebug//lib/byebug/helpers/reflection.rb#8 -module Byebug::Helpers::ReflectionHelper - # List of "command" classes in the including module - # - # source://byebug//lib/byebug/helpers/reflection.rb#12 - def commands; end -end - -# Utilities for interaction with strings -# -# source://byebug//lib/byebug/helpers/string.rb#8 -module Byebug::Helpers::StringHelper - # Converts +str+ from an_underscored-or-dasherized_string to - # ACamelizedString. - # - # source://byebug//lib/byebug/helpers/string.rb#13 - def camelize(str); end - - # Removes a number of leading whitespace for each input line. - # - # source://byebug//lib/byebug/helpers/string.rb#28 - def deindent(str, leading_spaces: T.unsafe(nil)); end - - # Improves indentation and spacing in +str+ for readability in Byebug's - # command prompt. - # - # source://byebug//lib/byebug/helpers/string.rb#21 - def prettify(str); end -end - -# Utilities for thread subcommands -# -# source://byebug//lib/byebug/helpers/thread.rb#8 -module Byebug::Helpers::ThreadHelper - # source://byebug//lib/byebug/helpers/thread.rb#30 - def context_from_thread(thnum); end - - # @return [Boolean] - # - # source://byebug//lib/byebug/helpers/thread.rb#26 - def current_thread?(ctx); end - - # source://byebug//lib/byebug/helpers/thread.rb#9 - def display_context(ctx); end - - # source://byebug//lib/byebug/helpers/thread.rb#13 - def thread_arguments(ctx); end - - private - - # source://byebug//lib/byebug/helpers/thread.rb#62 - def debug_flag(ctx); end - - # @todo Check whether it is Byebug.current_context or context - # - # source://byebug//lib/byebug/helpers/thread.rb#47 - def location(ctx); end - - # source://byebug//lib/byebug/helpers/thread.rb#56 - def status_flag(ctx); end -end - -# Utilities to assist breakpoint/display enabling/disabling. -# -# source://byebug//lib/byebug/helpers/toggle.rb#10 -module Byebug::Helpers::ToggleHelper - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/helpers/toggle.rb#13 - def enable_disable_breakpoints(is_enable, args); end - - # source://byebug//lib/byebug/helpers/toggle.rb#26 - def enable_disable_display(is_enable, args); end - - private - - # source://byebug//lib/byebug/helpers/toggle.rb#57 - def n_displays; end - - # source://byebug//lib/byebug/helpers/toggle.rb#41 - def select_breakpoints(is_enable, args); end -end - -# Utilities for variable subcommands -# -# source://byebug//lib/byebug/helpers/var.rb#10 -module Byebug::Helpers::VarHelper - include ::Byebug::Helpers::EvalHelper - - # source://byebug//lib/byebug/helpers/var.rb#42 - def var_args; end - - # source://byebug//lib/byebug/helpers/var.rb#21 - def var_global; end - - # source://byebug//lib/byebug/helpers/var.rb#29 - def var_instance(str); end - - # source://byebug//lib/byebug/helpers/var.rb#13 - def var_list(ary, binding = T.unsafe(nil)); end - - # source://byebug//lib/byebug/helpers/var.rb#35 - def var_local; end -end - -# Setting to customize the file where byebug's history is saved. -# -# source://byebug//lib/byebug/settings/histfile.rb#9 -class Byebug::HistfileSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/histfile.rb#12 - def banner; end - - # source://byebug//lib/byebug/settings/histfile.rb#16 - def to_s; end -end - -# source://byebug//lib/byebug/settings/histfile.rb#10 -Byebug::HistfileSetting::DEFAULT = T.let(T.unsafe(nil), String) - -# Handles byebug's history of commands. -# -# source://byebug//lib/byebug/history.rb#19 -class Byebug::History - # @return [History] a new instance of History - # - # source://byebug//lib/byebug/history.rb#22 - def initialize; end - - # Array holding the list of commands in history - # - # source://byebug//lib/byebug/history.rb#29 - def buffer; end - - # Discards history. - # - # source://byebug//lib/byebug/history.rb#58 - def clear; end - - # Max number of commands to be displayed when no size has been specified. - # - # Never more than Setting[:histsize]. - # - # source://byebug//lib/byebug/history.rb#105 - def default_max_size; end - - # Whether a specific command should not be stored in history. - # - # For now, empty lines and consecutive duplicates. - # - # @return [Boolean] - # - # source://byebug//lib/byebug/history.rb#123 - def ignore?(buf); end - - # Array of ids of the last +number+ commands. - # - # source://byebug//lib/byebug/history.rb#96 - def last_ids(number); end - - # Removes a command from Readline's history. - # - # source://byebug//lib/byebug/history.rb#75 - def pop; end - - # Adds a new command to Readline's history. - # - # source://byebug//lib/byebug/history.rb#65 - def push(cmd); end - - # Restores history from disk. - # - # source://byebug//lib/byebug/history.rb#36 - def restore; end - - # Saves history to disk. - # - # source://byebug//lib/byebug/history.rb#45 - def save; end - - # Returns the value of attribute size. - # - # source://byebug//lib/byebug/history.rb#20 - def size; end - - # Sets the attribute size - # - # @param value the value to set the attribute size to. - # - # source://byebug//lib/byebug/history.rb#20 - def size=(_arg0); end - - # Max number of commands to be displayed when a size has been specified. - # - # The only bound here is not showing more items than available. - # - # source://byebug//lib/byebug/history.rb#114 - def specific_max_size(number); end - - # Prints the requested numbers of history entries. - # - # source://byebug//lib/byebug/history.rb#83 - def to_s(n_cmds); end -end - -# Show history of byebug commands. -# -# source://byebug//lib/byebug/commands/history.rb#10 -class Byebug::HistoryCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/history.rb#31 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/history.rb#19 - def description; end - - # source://byebug//lib/byebug/commands/history.rb#15 - def regexp; end - - # source://byebug//lib/byebug/commands/history.rb#27 - def short_description; end - end -end - -# Setting to customize the number of byebug commands to be saved in history. -# -# source://byebug//lib/byebug/settings/histsize.rb#9 -class Byebug::HistsizeSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/histsize.rb#12 - def banner; end - - # source://byebug//lib/byebug/settings/histsize.rb#16 - def to_s; end -end - -# source://byebug//lib/byebug/settings/histsize.rb#10 -Byebug::HistsizeSetting::DEFAULT = T.let(T.unsafe(nil), Integer) - -# Shows info about different aspects of the debugger. -# -# source://byebug//lib/byebug/commands/info/breakpoints.rb#7 -class Byebug::InfoCommand < ::Byebug::Command - include ::Byebug::Subcommands - extend ::Byebug::Helpers::ReflectionHelper - extend ::Byebug::Subcommands::ClassMethods - - class << self - # source://byebug//lib/byebug/commands/info.rb#25 - def description; end - - # source://byebug//lib/byebug/commands/info.rb#21 - def regexp; end - - # source://byebug//lib/byebug/commands/info.rb#33 - def short_description; end - end -end - -# Information about current breakpoints -# -# source://byebug//lib/byebug/commands/info/breakpoints.rb#11 -class Byebug::InfoCommand::BreakpointsCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/info/breakpoints.rb#30 - def execute; end - - private - - # source://byebug//lib/byebug/commands/info/breakpoints.rb#47 - def info_breakpoint(brkpt); end - - class << self - # source://byebug//lib/byebug/commands/info/breakpoints.rb#18 - def description; end - - # source://byebug//lib/byebug/commands/info/breakpoints.rb#14 - def regexp; end - - # source://byebug//lib/byebug/commands/info/breakpoints.rb#26 - def short_description; end - end -end - -# Information about display expressions -# -# source://byebug//lib/byebug/commands/info/display.rb#11 -class Byebug::InfoCommand::DisplayCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/info/display.rb#30 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/info/display.rb#18 - def description; end - - # source://byebug//lib/byebug/commands/info/display.rb#14 - def regexp; end - - # source://byebug//lib/byebug/commands/info/display.rb#26 - def short_description; end - end -end - -# Information about a particular source file -# -# source://byebug//lib/byebug/commands/info/file.rb#13 -class Byebug::InfoCommand::FileCommand < ::Byebug::Command - include ::Byebug::Helpers::FileHelper - include ::Byebug::Helpers::StringHelper - - # source://byebug//lib/byebug/commands/info/file.rb#38 - def execute; end - - private - - # source://byebug//lib/byebug/commands/info/file.rb#55 - def info_file_basic(file); end - - # source://byebug//lib/byebug/commands/info/file.rb#63 - def info_file_breakpoints(file); end - - # source://byebug//lib/byebug/commands/info/file.rb#70 - def info_file_mtime(file); end - - # source://byebug//lib/byebug/commands/info/file.rb#74 - def info_file_sha1(file); end - - class << self - # source://byebug//lib/byebug/commands/info/file.rb#23 - def description; end - - # source://byebug//lib/byebug/commands/info/file.rb#19 - def regexp; end - - # source://byebug//lib/byebug/commands/info/file.rb#34 - def short_description; end - end -end - -# Information about current location -# -# source://byebug//lib/byebug/commands/info/line.rb#11 -class Byebug::InfoCommand::LineCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/info/line.rb#30 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/info/line.rb#18 - def description; end - - # source://byebug//lib/byebug/commands/info/line.rb#14 - def regexp; end - - # source://byebug//lib/byebug/commands/info/line.rb#26 - def short_description; end - end -end - -# Information about arguments of the current method/block -# -# source://byebug//lib/byebug/commands/info/program.rb#11 -class Byebug::InfoCommand::ProgramCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/info/program.rb#30 - def execute; end - - private - - # source://byebug//lib/byebug/commands/info/program.rb#37 - def format_stop_reason(stop_reason); end - - class << self - # source://byebug//lib/byebug/commands/info/program.rb#18 - def description; end - - # source://byebug//lib/byebug/commands/info/program.rb#14 - def regexp; end - - # source://byebug//lib/byebug/commands/info/program.rb#26 - def short_description; end - end -end - -# Main Interface class -# -# Contains common functionality to all implemented interfaces. -# -# source://byebug//lib/byebug/interface.rb#16 -class Byebug::Interface - include ::Byebug::Helpers::FileHelper - - # @return [Interface] a new instance of Interface - # - # source://byebug//lib/byebug/interface.rb#22 - def initialize; end - - # Restores history according to +autosave+ setting. - # - # source://byebug//lib/byebug/interface.rb#118 - def autorestore; end - - # Saves or clears history according to +autosave+ setting. - # - # source://byebug//lib/byebug/interface.rb#111 - def autosave; end - - # source://byebug//lib/byebug/interface.rb#105 - def close; end - - # Returns the value of attribute command_queue. - # - # source://byebug//lib/byebug/interface.rb#19 - def command_queue; end - - # Sets the attribute command_queue - # - # @param value the value to set the attribute command_queue to. - # - # source://byebug//lib/byebug/interface.rb#19 - def command_queue=(_arg0); end - - # Confirms user introduced an affirmative response to the input stream. - # - # source://byebug//lib/byebug/interface.rb#101 - def confirm(prompt); end - - # Prints an error message to the error stream. - # - # source://byebug//lib/byebug/interface.rb#80 - def errmsg(message); end - - # Returns the value of attribute error. - # - # source://byebug//lib/byebug/interface.rb#20 - def error; end - - # Returns the value of attribute history. - # - # source://byebug//lib/byebug/interface.rb#19 - def history; end - - # Sets the attribute history - # - # @param value the value to set the attribute history to. - # - # source://byebug//lib/byebug/interface.rb#19 - def history=(_arg0); end - - # Returns the value of attribute input. - # - # source://byebug//lib/byebug/interface.rb#20 - def input; end - - # source://byebug//lib/byebug/interface.rb#28 - def last_if_empty(input); end - - # Returns the value of attribute output. - # - # source://byebug//lib/byebug/interface.rb#20 - def output; end - - # Reads a new line from the interface's input stream. - # - # read now was empty. - # - # @return [String] New string read or the previous string if the string - # - # source://byebug//lib/byebug/interface.rb#70 - def prepare_input(prompt); end - - # Prints an output message to the output stream without a final "\n". - # - # source://byebug//lib/byebug/interface.rb#94 - def print(message); end - - # Prints an output message to the output stream. - # - # source://byebug//lib/byebug/interface.rb#87 - def puts(message); end - - # Pops a command from the input stream. - # - # source://byebug//lib/byebug/interface.rb#35 - def read_command(prompt); end - - # Pushes lines in +filename+ to the command queue. - # - # source://byebug//lib/byebug/interface.rb#44 - def read_file(filename); end - - # Reads a new line from the interface's input stream, parses it into - # commands and saves it to history. - # - # @return [String] Representing something to be run by the debugger. - # - # source://byebug//lib/byebug/interface.rb#54 - def read_input(prompt, save_hist = T.unsafe(nil)); end - - private - - # Splits a command line of the form "cmd1 ; cmd2 ; ... ; cmdN" into an - # array of commands: [cmd1, cmd2, ..., cmdN] - # - # source://byebug//lib/byebug/interface.rb#128 - def split_commands(cmd_line); end -end - -# Interrupting execution of current thread. -# -# source://byebug//lib/byebug/commands/interrupt.rb#9 -class Byebug::InterruptCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/interrupt.rb#28 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/interrupt.rb#16 - def description; end - - # source://byebug//lib/byebug/commands/interrupt.rb#12 - def regexp; end - - # source://byebug//lib/byebug/commands/interrupt.rb#24 - def short_description; end - end -end - -# Enter IRB from byebug's prompt -# -# source://byebug//lib/byebug/commands/irb.rb#11 -class Byebug::IrbCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/irb.rb#30 - def execute; end - - private - - # source://byebug//lib/byebug/commands/irb.rb#40 - def with_clean_argv; end - - class << self - # source://byebug//lib/byebug/commands/irb.rb#18 - def description; end - - # source://byebug//lib/byebug/commands/irb.rb#14 - def regexp; end - - # source://byebug//lib/byebug/commands/irb.rb#26 - def short_description; end - end -end - -# Send custom signals to the debugged program. -# -# source://byebug//lib/byebug/commands/kill.rb#9 -class Byebug::KillCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/kill.rb#30 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/kill.rb#16 - def description; end - - # source://byebug//lib/byebug/commands/kill.rb#12 - def regexp; end - - # source://byebug//lib/byebug/commands/kill.rb#26 - def short_description; end - end -end - -# Setting to enable/disable linetracing. -# -# source://byebug//lib/byebug/settings/linetrace.rb#9 -class Byebug::LinetraceSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/linetrace.rb#10 - def banner; end - - # source://byebug//lib/byebug/settings/linetrace.rb#18 - def value; end - - # source://byebug//lib/byebug/settings/linetrace.rb#14 - def value=(val); end -end - -# List parts of the source code. -# -# source://byebug//lib/byebug/commands/list.rb#12 -class Byebug::ListCommand < ::Byebug::Command - include ::Byebug::Helpers::FileHelper - include ::Byebug::Helpers::ParseHelper - - # source://forwardable/1.3.3/forwardable.rb#231 - def amend_final(*args, **_arg1, &block); end - - # source://byebug//lib/byebug/commands/list.rb#40 - def execute; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def max_line(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def size(*args, **_arg1, &block); end - - private - - # Set line range to be printed by list - # - # @return first line number to list - # @return last line number to list - # - # source://byebug//lib/byebug/commands/list.rb#79 - def auto_range(direction); end - - # Show a range of lines in the current file. - # - # @param min [Integer] Lower bound - # @param max [Integer] Upper bound - # - # source://byebug//lib/byebug/commands/list.rb#115 - def display_lines(min, max); end - - # @param range [String] A string with an integer range format - # @return [String] The lower bound of the given range - # - # source://byebug//lib/byebug/commands/list.rb#126 - def lower_bound(range); end - - # source://byebug//lib/byebug/commands/list.rb#105 - def move(line, size, direction = T.unsafe(nil)); end - - # source://byebug//lib/byebug/commands/list.rb#89 - def parse_range(input); end - - # Line range to be printed by `list`. - # - # If is set, range is parsed from it. - # - # Otherwise it's automatically chosen. - # - # source://byebug//lib/byebug/commands/list.rb#60 - def range(input); end - - # source://byebug//lib/byebug/commands/list.rb#152 - def source_file_formatter; end - - # @param str [String] A string with an integer range format - # @return [Array] The upper & lower bounds of the given range - # - # source://byebug//lib/byebug/commands/list.rb#144 - def split_range(str); end - - # @param range [String] A string with an integer range format - # @return [String] The upper bound of the given range - # - # source://byebug//lib/byebug/commands/list.rb#135 - def upper_bound(range); end - - # @return [Boolean] - # - # source://byebug//lib/byebug/commands/list.rb#69 - def valid_range?(first, last); end - - class << self - # source://byebug//lib/byebug/commands/list.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/list.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/list.rb#36 - def short_description; end - end -end - -# Setting to customize the number of source code lines to be displayed every -# time the "list" command is invoked. -# -# source://byebug//lib/byebug/settings/listsize.rb#10 -class Byebug::ListsizeSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/listsize.rb#13 - def banner; end - - # source://byebug//lib/byebug/settings/listsize.rb#17 - def to_s; end -end - -# source://byebug//lib/byebug/settings/listsize.rb#11 -Byebug::ListsizeSetting::DEFAULT = T.let(T.unsafe(nil), Integer) - -# Interface class for standard byebug use. -# -# source://byebug//lib/byebug/interfaces/local_interface.rb#7 -class Byebug::LocalInterface < ::Byebug::Interface - # @return [LocalInterface] a new instance of LocalInterface - # - # source://byebug//lib/byebug/interfaces/local_interface.rb#10 - def initialize; end - - # Reads a single line of input using Readline. If Ctrl-D is pressed, it - # returns "continue", meaning that program's execution will go on. - # - # @param prompt Prompt to be displayed. - # - # source://byebug//lib/byebug/interfaces/local_interface.rb#23 - def readline(prompt); end - - # Yields the block handling Ctrl-C the following way: if pressed while - # waiting for input, the line is reset to only the prompt and we ask for - # input again. - # - # @note Any external 'INT' traps are overriden during this method. - # - # source://byebug//lib/byebug/interfaces/local_interface.rb#34 - def with_repl_like_sigint; end - - # Disable any Readline completion procs. - # - # Other gems, for example, IRB could've installed completion procs that are - # dependent on them being loaded. Disable those while byebug is the REPL - # making use of Readline. - # - # source://byebug//lib/byebug/interfaces/local_interface.rb#51 - def without_readline_completion; end -end - -# source://byebug//lib/byebug/interfaces/local_interface.rb#8 -Byebug::LocalInterface::EOF_ALIAS = T.let(T.unsafe(nil), String) - -# Show methods of specific classes/modules/objects. -# -# source://byebug//lib/byebug/commands/method.rb#10 -class Byebug::MethodCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - - # source://byebug//lib/byebug/commands/method.rb#37 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/method.rb#19 - def description; end - - # source://byebug//lib/byebug/commands/method.rb#15 - def regexp; end - - # source://byebug//lib/byebug/commands/method.rb#33 - def short_description; end - end -end - -# Implements the next functionality. -# -# Allows the user the continue execution until the next instruction in the -# current frame. -# -# source://byebug//lib/byebug/commands/next.rb#13 -class Byebug::NextCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/next.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/next.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/next.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/next.rb#28 - def short_description; end - end -end - -# Port number used for remote debugging -# -# source://byebug//lib/byebug/remote.rb#13 -Byebug::PORT = T.let(T.unsafe(nil), Integer) - -# Processes commands in post_mortem mode -# -# source://byebug//lib/byebug/processors/post_mortem_processor.rb#9 -class Byebug::PostMortemProcessor < ::Byebug::CommandProcessor - # source://byebug//lib/byebug/processors/post_mortem_processor.rb#10 - def commands; end - - # source://byebug//lib/byebug/processors/post_mortem_processor.rb#14 - def prompt; end -end - -# Setting to enable/disable post_mortem mode, i.e., a debugger prompt after -# program termination by unhandled exception. -# -# source://byebug//lib/byebug/settings/post_mortem.rb#10 -class Byebug::PostMortemSetting < ::Byebug::Setting - # @return [PostMortemSetting] a new instance of PostMortemSetting - # - # source://byebug//lib/byebug/settings/post_mortem.rb#11 - def initialize; end - - # source://byebug//lib/byebug/settings/post_mortem.rb#15 - def banner; end - - # source://byebug//lib/byebug/settings/post_mortem.rb#23 - def value; end - - # source://byebug//lib/byebug/settings/post_mortem.rb#19 - def value=(val); end -end - -# source://byebug//lib/byebug/printers/base.rb#6 -module Byebug::Printers; end - -# Base printer -# -# source://byebug//lib/byebug/printers/base.rb#10 -class Byebug::Printers::Base - # source://byebug//lib/byebug/printers/base.rb#16 - def type; end - - private - - # source://byebug//lib/byebug/printers/base.rb#55 - def array_of_args(collection, &_block); end - - # source://byebug//lib/byebug/printers/base.rb#49 - def contents; end - - # source://byebug//lib/byebug/printers/base.rb#63 - def contents_files; end - - # @raise [MissedPath] - # - # source://byebug//lib/byebug/printers/base.rb#22 - def locate(path); end - - # source://byebug//lib/byebug/printers/base.rb#45 - def parts(path); end - - # source://byebug//lib/byebug/printers/base.rb#35 - def translate(string, args = T.unsafe(nil)); end -end - -# source://byebug//lib/byebug/printers/base.rb#12 -class Byebug::Printers::Base::MissedArgument < ::StandardError; end - -# source://byebug//lib/byebug/printers/base.rb#11 -class Byebug::Printers::Base::MissedPath < ::StandardError; end - -# source://byebug//lib/byebug/printers/base.rb#14 -Byebug::Printers::Base::SEPARATOR = T.let(T.unsafe(nil), String) - -# Plain text printer -# -# source://byebug//lib/byebug/printers/plain.rb#10 -class Byebug::Printers::Plain < ::Byebug::Printers::Base - # source://byebug//lib/byebug/printers/plain.rb#11 - def print(path, args = T.unsafe(nil)); end - - # source://byebug//lib/byebug/printers/plain.rb#17 - def print_collection(path, collection, &block); end - - # source://byebug//lib/byebug/printers/plain.rb#25 - def print_variables(variables, *_unused); end - - private - - # source://byebug//lib/byebug/printers/plain.rb#39 - def contents_files; end -end - -# Enter Pry from byebug's prompt -# -# source://byebug//lib/byebug/commands/pry.rb#10 -class Byebug::PryCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/pry.rb#29 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/pry.rb#17 - def description; end - - # source://byebug//lib/byebug/commands/pry.rb#13 - def regexp; end - - # source://byebug//lib/byebug/commands/pry.rb#25 - def short_description; end - end -end - -# Exit from byebug. -# -# source://byebug//lib/byebug/commands/quit.rb#9 -class Byebug::QuitCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/quit.rb#33 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/quit.rb#17 - def description; end - - # source://byebug//lib/byebug/commands/quit.rb#13 - def regexp; end - - # source://byebug//lib/byebug/commands/quit.rb#29 - def short_description; end - end -end - -# source://byebug//lib/byebug/remote/server.rb#6 -module Byebug::Remote; end - -# Client for remote debugging -# -# source://byebug//lib/byebug/remote/client.rb#10 -class Byebug::Remote::Client - # @return [Client] a new instance of Client - # - # source://byebug//lib/byebug/remote/client.rb#13 - def initialize(interface); end - - # Returns the value of attribute interface. - # - # source://byebug//lib/byebug/remote/client.rb#11 - def interface; end - - # Returns the value of attribute socket. - # - # source://byebug//lib/byebug/remote/client.rb#11 - def socket; end - - # Connects to the remote byebug - # - # source://byebug//lib/byebug/remote/client.rb#21 - def start(host = T.unsafe(nil), port = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://byebug//lib/byebug/remote/client.rb#44 - def started?; end - - private - - # source://byebug//lib/byebug/remote/client.rb#50 - def connect_at(host, port); end -end - -# Server for remote debugging -# -# source://byebug//lib/byebug/remote/server.rb#10 -class Byebug::Remote::Server - # @return [Server] a new instance of Server - # - # source://byebug//lib/byebug/remote/server.rb#13 - def initialize(wait_connection:, &block); end - - # Returns the value of attribute actual_port. - # - # source://byebug//lib/byebug/remote/server.rb#11 - def actual_port; end - - # Start the remote debugging server - # - # source://byebug//lib/byebug/remote/server.rb#22 - def start(host, port); end - - # Returns the value of attribute wait_connection. - # - # source://byebug//lib/byebug/remote/server.rb#11 - def wait_connection; end -end - -# Interface class for remote use of byebug. -# -# source://byebug//lib/byebug/interfaces/remote_interface.rb#9 -class Byebug::RemoteInterface < ::Byebug::Interface - # @return [RemoteInterface] a new instance of RemoteInterface - # - # source://byebug//lib/byebug/interfaces/remote_interface.rb#10 - def initialize(socket); end - - # source://byebug//lib/byebug/interfaces/remote_interface.rb#41 - def close; end - - # source://byebug//lib/byebug/interfaces/remote_interface.rb#23 - def confirm(prompt); end - - # source://byebug//lib/byebug/interfaces/remote_interface.rb#29 - def print(message); end - - # source://byebug//lib/byebug/interfaces/remote_interface.rb#35 - def puts(message); end - - # source://byebug//lib/byebug/interfaces/remote_interface.rb#17 - def read_command(prompt); end - - # source://byebug//lib/byebug/interfaces/remote_interface.rb#45 - def readline(prompt); end -end - -# Restart debugged program from within byebug. -# -# source://byebug//lib/byebug/commands/restart.rb#14 -class Byebug::RestartCommand < ::Byebug::Command - include ::Byebug::Helpers::BinHelper - include ::Byebug::Helpers::PathHelper - - # source://byebug//lib/byebug/commands/restart.rb#40 - def execute; end - - private - - # source://byebug//lib/byebug/commands/restart.rb#54 - def prepend_byebug_bin(cmd); end - - # source://byebug//lib/byebug/commands/restart.rb#59 - def prepend_ruby_bin(cmd); end - - class << self - # source://byebug//lib/byebug/commands/restart.rb#25 - def description; end - - # source://byebug//lib/byebug/commands/restart.rb#21 - def regexp; end - - # source://byebug//lib/byebug/commands/restart.rb#36 - def short_description; end - end -end - -# Save current settings to use them in another debug session. -# -# source://byebug//lib/byebug/commands/save.rb#9 -class Byebug::SaveCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/save.rb#36 - def execute; end - - private - - # source://byebug//lib/byebug/commands/save.rb#50 - def save_breakpoints(file); end - - # source://byebug//lib/byebug/commands/save.rb#56 - def save_catchpoints(file); end - - # source://byebug//lib/byebug/commands/save.rb#62 - def save_displays(file); end - - # source://byebug//lib/byebug/commands/save.rb#66 - def save_settings(file); end - - class << self - # source://byebug//lib/byebug/commands/save.rb#17 - def description; end - - # source://byebug//lib/byebug/commands/save.rb#13 - def regexp; end - - # source://byebug//lib/byebug/commands/save.rb#32 - def short_description; end - end -end - -# Setting to customize the file where byebug's history is saved. -# -# source://byebug//lib/byebug/settings/savefile.rb#9 -class Byebug::SavefileSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/savefile.rb#12 - def banner; end - - # source://byebug//lib/byebug/settings/savefile.rb#16 - def to_s; end -end - -# source://byebug//lib/byebug/settings/savefile.rb#10 -Byebug::SavefileSetting::DEFAULT = T.let(T.unsafe(nil), String) - -# Interface class for command execution from script files. -# -# source://byebug//lib/byebug/interfaces/script_interface.rb#7 -class Byebug::ScriptInterface < ::Byebug::Interface - # @return [ScriptInterface] a new instance of ScriptInterface - # - # source://byebug//lib/byebug/interfaces/script_interface.rb#8 - def initialize(file, verbose = T.unsafe(nil)); end - - # source://byebug//lib/byebug/interfaces/script_interface.rb#20 - def close; end - - # source://byebug//lib/byebug/interfaces/script_interface.rb#16 - def read_command(prompt); end - - # source://byebug//lib/byebug/interfaces/script_interface.rb#24 - def readline(*_arg0); end -end - -# Processes commands from a file -# -# source://byebug//lib/byebug/processors/script_processor.rb#9 -class Byebug::ScriptProcessor < ::Byebug::CommandProcessor - # source://byebug//lib/byebug/processors/script_processor.rb#28 - def after_repl; end - - # Available commands - # - # source://byebug//lib/byebug/processors/script_processor.rb#13 - def commands; end - - # Prompt shown before reading a command. - # - # source://byebug//lib/byebug/processors/script_processor.rb#37 - def prompt; end - - # source://byebug//lib/byebug/processors/script_processor.rb#17 - def repl; end - - private - - # source://byebug//lib/byebug/processors/script_processor.rb#43 - def without_exceptions; end -end - -# Change byebug settings. -# -# source://byebug//lib/byebug/commands/set.rb#10 -class Byebug::SetCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/set.rb#42 - def execute; end - - private - - # source://byebug//lib/byebug/commands/set.rb#66 - def get_onoff(arg, default); end - - class << self - # source://byebug//lib/byebug/commands/set.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/set.rb#38 - def help; end - - # source://byebug//lib/byebug/commands/set.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/set.rb#34 - def short_description; end - end -end - -# Parent class for all byebug settings. -# -# source://byebug//lib/byebug/setting.rb#9 -class Byebug::Setting - # @return [Setting] a new instance of Setting - # - # source://byebug//lib/byebug/setting.rb#14 - def initialize; end - - # @return [Boolean] - # - # source://byebug//lib/byebug/setting.rb#18 - def boolean?; end - - # source://byebug//lib/byebug/setting.rb#28 - def help; end - - # @return [Boolean] - # - # source://byebug//lib/byebug/setting.rb#22 - def integer?; end - - # source://byebug//lib/byebug/setting.rb#37 - def to_s; end - - # source://byebug//lib/byebug/setting.rb#32 - def to_sym; end - - # Returns the value of attribute value. - # - # source://byebug//lib/byebug/setting.rb#10 - def value; end - - # Sets the attribute value - # - # @param value the value to set the attribute value to. - # - # source://byebug//lib/byebug/setting.rb#10 - def value=(_arg0); end - - class << self - # source://byebug//lib/byebug/setting.rb#46 - def [](name); end - - # source://byebug//lib/byebug/setting.rb#50 - def []=(name, value); end - - # source://byebug//lib/byebug/setting.rb#54 - def find(shortcut); end - - # @todo DRY this up. Very similar code exists in the CommandList class - # - # source://byebug//lib/byebug/setting.rb#65 - def help_all; end - - # source://byebug//lib/byebug/setting.rb#42 - def settings; end - end -end - -# source://byebug//lib/byebug/setting.rb#12 -Byebug::Setting::DEFAULT = T.let(T.unsafe(nil), FalseClass) - -# Show byebug settings. -# -# source://byebug//lib/byebug/commands/show.rb#9 -class Byebug::ShowCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/show.rb#35 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/show.rb#17 - def description; end - - # source://byebug//lib/byebug/commands/show.rb#31 - def help; end - - # source://byebug//lib/byebug/commands/show.rb#13 - def regexp; end - - # source://byebug//lib/byebug/commands/show.rb#27 - def short_description; end - end -end - -# Allows the user to continue execution until the next breakpoint, as -# long as it is different from the current one -# -# source://byebug//lib/byebug/commands/skip.rb#11 -class Byebug::SkipCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/skip.rb#70 - def auto_run; end - - # source://byebug//lib/byebug/commands/skip.rb#77 - def execute; end - - # source://byebug//lib/byebug/commands/skip.rb#53 - def initialize_attributes; end - - # source://byebug//lib/byebug/commands/skip.rb#60 - def keep_execution; end - - # source://byebug//lib/byebug/commands/skip.rb#64 - def reset_attributes; end - - class << self - # source://byebug//lib/byebug/commands/skip.rb#41 - def description; end - - # source://byebug//lib/byebug/commands/skip.rb#18 - def file_line; end - - # Sets the attribute file_line - # - # @param value the value to set the attribute file_line to. - # - # source://byebug//lib/byebug/commands/skip.rb#15 - def file_line=(_arg0); end - - # source://byebug//lib/byebug/commands/skip.rb#22 - def file_path; end - - # Sets the attribute file_path - # - # @param value the value to set the attribute file_path to. - # - # source://byebug//lib/byebug/commands/skip.rb#15 - def file_path=(_arg0); end - - # Returns the value of attribute previous_autolist. - # - # source://byebug//lib/byebug/commands/skip.rb#16 - def previous_autolist; end - - # source://byebug//lib/byebug/commands/skip.rb#37 - def regexp; end - - # source://byebug//lib/byebug/commands/skip.rb#31 - def restore_autolist; end - - # source://byebug//lib/byebug/commands/skip.rb#26 - def setup_autolist(value); end - - # source://byebug//lib/byebug/commands/skip.rb#49 - def short_description; end - end -end - -# Execute a file containing byebug commands. -# -# It can be used to restore a previously saved debugging session. -# -# source://byebug//lib/byebug/commands/source.rb#11 -class Byebug::SourceCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/source.rb#31 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/source.rb#19 - def description; end - - # source://byebug//lib/byebug/commands/source.rb#15 - def regexp; end - - # source://byebug//lib/byebug/commands/source.rb#27 - def short_description; end - end -end - -# Formats specific line ranges in a source file -# -# source://byebug//lib/byebug/source_file_formatter.rb#10 -class Byebug::SourceFileFormatter - include ::Byebug::Helpers::FileHelper - - # @return [SourceFileFormatter] a new instance of SourceFileFormatter - # - # source://byebug//lib/byebug/source_file_formatter.rb#15 - def initialize(file, annotator); end - - # source://byebug//lib/byebug/source_file_formatter.rb#67 - def amend(line, ceiling); end - - # source://byebug//lib/byebug/source_file_formatter.rb#51 - def amend_final(line); end - - # source://byebug//lib/byebug/source_file_formatter.rb#47 - def amend_initial(line); end - - # Returns the value of attribute annotator. - # - # source://byebug//lib/byebug/source_file_formatter.rb#13 - def annotator; end - - # Returns the value of attribute file. - # - # source://byebug//lib/byebug/source_file_formatter.rb#13 - def file; end - - # source://byebug//lib/byebug/source_file_formatter.rb#20 - def lines(min, max); end - - # source://byebug//lib/byebug/source_file_formatter.rb#33 - def lines_around(center); end - - # source://byebug//lib/byebug/source_file_formatter.rb#55 - def max_initial_line; end - - # source://byebug//lib/byebug/source_file_formatter.rb#59 - def max_line; end - - # source://byebug//lib/byebug/source_file_formatter.rb#37 - def range_around(center); end - - # source://byebug//lib/byebug/source_file_formatter.rb#41 - def range_from(min); end - - # source://byebug//lib/byebug/source_file_formatter.rb#63 - def size; end -end - -# Setting to enable/disable the display of backtraces when evaluations raise -# errors. -# -# source://byebug//lib/byebug/settings/stack_on_error.rb#10 -class Byebug::StackOnErrorSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/stack_on_error.rb#11 - def banner; end -end - -# Implements the step functionality. -# -# Allows the user the continue execution until the next instruction, possibily -# in a different frame. Use step to step into method calls or blocks. -# -# source://byebug//lib/byebug/commands/step.rb#13 -class Byebug::StepCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/step.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/step.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/step.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/step.rb#28 - def short_description; end - end -end - -# Subcommand additions. -# -# source://byebug//lib/byebug/subcommands.rb#12 -module Byebug::Subcommands - extend ::Forwardable - - mixes_in_class_methods ::Byebug::Subcommands::ClassMethods - - # Delegates to subcommands or prints help if no subcommand specified. - # - # @raise [CommandNotFound] - # - # source://byebug//lib/byebug/subcommands.rb#23 - def execute; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def subcommand_list(*args, **_arg1, &block); end - - class << self - # @private - # - # source://byebug//lib/byebug/subcommands.rb#13 - def included(command); end - end -end - -# Class methods added to subcommands -# -# source://byebug//lib/byebug/subcommands.rb#36 -module Byebug::Subcommands::ClassMethods - include ::Byebug::Helpers::ReflectionHelper - - # Default help text for a command with subcommands - # - # source://byebug//lib/byebug/subcommands.rb#42 - def help; end - - # Command's subcommands. - # - # source://byebug//lib/byebug/subcommands.rb#49 - def subcommand_list; end -end - -# Manipulation of Ruby threads -# -# source://byebug//lib/byebug/commands/thread/current.rb#9 -class Byebug::ThreadCommand < ::Byebug::Command - include ::Byebug::Subcommands - extend ::Byebug::Helpers::ReflectionHelper - extend ::Byebug::Subcommands::ClassMethods - - class << self - # source://byebug//lib/byebug/commands/thread.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/thread.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/thread.rb#30 - def short_description; end - end -end - -# Information about the current thread -# -# source://byebug//lib/byebug/commands/thread/current.rb#13 -class Byebug::ThreadCommand::CurrentCommand < ::Byebug::Command - include ::Byebug::Helpers::ThreadHelper - - # source://byebug//lib/byebug/commands/thread/current.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/thread/current.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/thread/current.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/thread/current.rb#28 - def short_description; end - end -end - -# Information about threads -# -# source://byebug//lib/byebug/commands/thread/list.rb#13 -class Byebug::ThreadCommand::ListCommand < ::Byebug::Command - include ::Byebug::Helpers::ThreadHelper - - # source://byebug//lib/byebug/commands/thread/list.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/thread/list.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/thread/list.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/thread/list.rb#28 - def short_description; end - end -end - -# Resumes the specified thread -# -# source://byebug//lib/byebug/commands/thread/resume.rb#13 -class Byebug::ThreadCommand::ResumeCommand < ::Byebug::Command - include ::Byebug::Helpers::ThreadHelper - - # source://byebug//lib/byebug/commands/thread/resume.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/thread/resume.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/thread/resume.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/thread/resume.rb#28 - def short_description; end - end -end - -# Stops the specified thread -# -# source://byebug//lib/byebug/commands/thread/stop.rb#13 -class Byebug::ThreadCommand::StopCommand < ::Byebug::Command - include ::Byebug::Helpers::ThreadHelper - - # source://byebug//lib/byebug/commands/thread/stop.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/thread/stop.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/thread/stop.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/thread/stop.rb#28 - def short_description; end - end -end - -# Switches to the specified thread -# -# source://byebug//lib/byebug/commands/thread/switch.rb#13 -class Byebug::ThreadCommand::SwitchCommand < ::Byebug::Command - include ::Byebug::Helpers::ThreadHelper - - # source://byebug//lib/byebug/commands/thread/switch.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/thread/switch.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/thread/switch.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/thread/switch.rb#28 - def short_description; end - end -end - -class Byebug::ThreadsTable; end - -# Show (and possibily stop) at every line that changes a global variable. -# -# source://byebug//lib/byebug/commands/tracevar.rb#9 -class Byebug::TracevarCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/tracevar.rb#32 - def execute; end - - private - - # source://byebug//lib/byebug/commands/tracevar.rb#48 - def on_change(name, value, stop); end - - class << self - # source://byebug//lib/byebug/commands/tracevar.rb#16 - def description; end - - # source://byebug//lib/byebug/commands/tracevar.rb#10 - def regexp; end - - # source://byebug//lib/byebug/commands/tracevar.rb#28 - def short_description; end - end -end - -# Remove expressions from display list. -# -# source://byebug//lib/byebug/commands/undisplay.rb#10 -class Byebug::UndisplayCommand < ::Byebug::Command - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/undisplay.rb#35 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/undisplay.rb#19 - def description; end - - # source://byebug//lib/byebug/commands/undisplay.rb#15 - def regexp; end - - # source://byebug//lib/byebug/commands/undisplay.rb#31 - def short_description; end - end -end - -# Stop tracing a global variable. -# -# source://byebug//lib/byebug/commands/untracevar.rb#9 -class Byebug::UntracevarCommand < ::Byebug::Command - # source://byebug//lib/byebug/commands/untracevar.rb#26 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/untracevar.rb#14 - def description; end - - # source://byebug//lib/byebug/commands/untracevar.rb#10 - def regexp; end - - # source://byebug//lib/byebug/commands/untracevar.rb#22 - def short_description; end - end -end - -# Move the current frame up in the backtrace. -# -# source://byebug//lib/byebug/commands/up.rb#12 -class Byebug::UpCommand < ::Byebug::Command - include ::Byebug::Helpers::FrameHelper - include ::Byebug::Helpers::ParseHelper - - # source://byebug//lib/byebug/commands/up.rb#36 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/up.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/up.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/up.rb#32 - def short_description; end - end -end - -# Shows variables and its values -# -# source://byebug//lib/byebug/commands/var/all.rb#9 -class Byebug::VarCommand < ::Byebug::Command - include ::Byebug::Subcommands - extend ::Byebug::Helpers::ReflectionHelper - extend ::Byebug::Subcommands::ClassMethods - - class << self - # source://byebug//lib/byebug/commands/var.rb#25 - def description; end - - # source://byebug//lib/byebug/commands/var.rb#21 - def regexp; end - - # source://byebug//lib/byebug/commands/var.rb#33 - def short_description; end - end -end - -# Shows global, instance and local variables -# -# source://byebug//lib/byebug/commands/var/all.rb#13 -class Byebug::VarCommand::AllCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - include ::Byebug::Helpers::VarHelper - - # source://byebug//lib/byebug/commands/var/all.rb#34 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/var/all.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/var/all.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/var/all.rb#30 - def short_description; end - end -end - -# Information about arguments of the current method/block -# -# source://byebug//lib/byebug/commands/var/args.rb#13 -class Byebug::VarCommand::ArgsCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - include ::Byebug::Helpers::VarHelper - - # source://byebug//lib/byebug/commands/var/args.rb#34 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/var/args.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/var/args.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/var/args.rb#30 - def short_description; end - end -end - -# Shows constants -# -# source://byebug//lib/byebug/commands/var/const.rb#13 -class Byebug::VarCommand::ConstCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - - # source://byebug//lib/byebug/commands/var/const.rb#34 - def execute; end - - private - - # source://byebug//lib/byebug/commands/var/const.rb#44 - def str_obj; end - - class << self - # source://byebug//lib/byebug/commands/var/const.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/var/const.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/var/const.rb#30 - def short_description; end - end -end - -# Shows global variables -# -# source://byebug//lib/byebug/commands/var/global.rb#11 -class Byebug::VarCommand::GlobalCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - include ::Byebug::Helpers::VarHelper - - # source://byebug//lib/byebug/commands/var/global.rb#32 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/var/global.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/var/global.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/var/global.rb#28 - def short_description; end - end -end - -# Shows instance variables -# -# source://byebug//lib/byebug/commands/var/instance.rb#13 -class Byebug::VarCommand::InstanceCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - include ::Byebug::Helpers::VarHelper - - # source://byebug//lib/byebug/commands/var/instance.rb#34 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/var/instance.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/var/instance.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/var/instance.rb#30 - def short_description; end - end -end - -# Shows local variables in current scope -# -# source://byebug//lib/byebug/commands/var/local.rb#13 -class Byebug::VarCommand::LocalCommand < ::Byebug::Command - include ::Byebug::Helpers::EvalHelper - include ::Byebug::Helpers::VarHelper - - # source://byebug//lib/byebug/commands/var/local.rb#34 - def execute; end - - class << self - # source://byebug//lib/byebug/commands/var/local.rb#22 - def description; end - - # source://byebug//lib/byebug/commands/var/local.rb#18 - def regexp; end - - # source://byebug//lib/byebug/commands/var/local.rb#30 - def short_description; end - end -end - -# Show current backtrace. -# -# source://byebug//lib/byebug/commands/where.rb#11 -class Byebug::WhereCommand < ::Byebug::Command - include ::Byebug::Helpers::FrameHelper - - # source://byebug//lib/byebug/commands/where.rb#39 - def execute; end - - private - - # source://byebug//lib/byebug/commands/where.rb#45 - def print_backtrace; end - - class << self - # source://byebug//lib/byebug/commands/where.rb#20 - def description; end - - # source://byebug//lib/byebug/commands/where.rb#16 - def regexp; end - - # source://byebug//lib/byebug/commands/where.rb#35 - def short_description; end - end -end - -# Setting to customize the maximum width of byebug's output. -# -# source://byebug//lib/byebug/settings/width.rb#9 -class Byebug::WidthSetting < ::Byebug::Setting - # source://byebug//lib/byebug/settings/width.rb#12 - def banner; end - - # source://byebug//lib/byebug/settings/width.rb#16 - def to_s; end -end - -# source://byebug//lib/byebug/settings/width.rb#10 -Byebug::WidthSetting::DEFAULT = T.let(T.unsafe(nil), Integer) - -# Extends the extension class to be able to pass information about the -# debugging environment from the c-extension to the user. -# -# source://byebug//lib/byebug/core.rb#113 -class Exception - # Returns the value of attribute __bb_context. - # - # source://byebug//lib/byebug/core.rb#114 - def __bb_context; end -end - -# Adds a `byebug` method to the Kernel module. -# -# Dropping a `byebug` call anywhere in your code, you get a debug prompt. -# -# source://byebug//lib/byebug/attacher.rb#34 -module Kernel - # source://byebug//lib/byebug/attacher.rb#35 - def byebug; end - - # source://byebug//lib/byebug/attacher.rb#35 - def debugger; end - - # source://byebug//lib/byebug/attacher.rb#41 - def remote_byebug(host = T.unsafe(nil), port = T.unsafe(nil)); end -end diff --git a/sorbet/rbi/gems/coderay@1.1.3.rbi b/sorbet/rbi/gems/coderay@1.1.3.rbi deleted file mode 100644 index 76870c11..00000000 --- a/sorbet/rbi/gems/coderay@1.1.3.rbi +++ /dev/null @@ -1,3426 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `coderay` gem. -# Please instead update this file by running `bin/tapioca gem coderay`. - -# = CodeRay Library -# -# CodeRay is a Ruby library for syntax highlighting. -# -# I try to make CodeRay easy to use and intuitive, but at the same time fully -# featured, complete, fast and efficient. -# -# See README. -# -# It consists mainly of -# * the main engine: CodeRay (Scanners::Scanner, Tokens, Encoders::Encoder) -# * the plugin system: PluginHost, Plugin -# * the scanners in CodeRay::Scanners -# * the encoders in CodeRay::Encoders -# * the styles in CodeRay::Styles -# -# Here's a fancy graphic to light up this gray docu: -# -# http://cycnus.de/raindark/coderay/scheme.png -# -# == Documentation -# -# See CodeRay, Encoders, Scanners, Tokens. -# -# == Usage -# -# Remember you need RubyGems to use CodeRay, unless you have it in your load -# path. Run Ruby with -rubygems option if required. -# -# === Highlight Ruby code in a string as html -# -# require 'coderay' -# print CodeRay.scan('puts "Hello, world!"', :ruby).html -# -# # prints something like this: -# puts "Hello, world!" -# -# -# === Highlight C code from a file in a html div -# -# require 'coderay' -# print CodeRay.scan(File.read('ruby.h'), :c).div -# print CodeRay.scan_file('ruby.h').html.div -# -# You can include this div in your page. The used CSS styles can be printed with -# -# % coderay_stylesheet -# -# === Highlight without typing too much -# -# If you are one of the hasty (or lazy, or extremely curious) people, just run this file: -# -# % ruby -rubygems /path/to/coderay/coderay.rb > example.html -# -# and look at the file it created in your browser. -# -# = CodeRay Module -# -# The CodeRay module provides convenience methods for the engine. -# -# * The +lang+ and +format+ arguments select Scanner and Encoder to use. These are -# simply lower-case symbols, like :python or :html. -# * All methods take an optional hash as last parameter, +options+, that is send to -# the Encoder / Scanner. -# * Input and language are always sorted in this order: +code+, +lang+. -# (This is in alphabetical order, if you need a mnemonic ;) -# -# You should be able to highlight everything you want just using these methods; -# so there is no need to dive into CodeRay's deep class hierarchy. -# -# The examples in the demo directory demonstrate common cases using this interface. -# -# = Basic Access Ways -# -# Read this to get a general view what CodeRay provides. -# -# == Scanning -# -# Scanning means analysing an input string, splitting it up into Tokens. -# Each Token knows about what type it is: string, comment, class name, etc. -# -# Each +lang+ (language) has its own Scanner; for example, :ruby code is -# handled by CodeRay::Scanners::Ruby. -# -# CodeRay.scan:: Scan a string in a given language into Tokens. -# This is the most common method to use. -# CodeRay.scan_file:: Scan a file and guess the language using FileType. -# -# The Tokens object you get from these methods can encode itself; see Tokens. -# -# == Encoding -# -# Encoding means compiling Tokens into an output. This can be colored HTML or -# LaTeX, a textual statistic or just the number of non-whitespace tokens. -# -# Each Encoder provides output in a specific +format+, so you select Encoders via -# formats like :html or :statistic. -# -# CodeRay.encode:: Scan and encode a string in a given language. -# CodeRay.encode_tokens:: Encode the given tokens. -# CodeRay.encode_file:: Scan a file, guess the language using FileType and encode it. -# -# == All-in-One Encoding -# -# CodeRay.encode:: Highlight a string with a given input and output format. -# -# == Instanciating -# -# You can use an Encoder instance to highlight multiple inputs. This way, the setup -# for this Encoder must only be done once. -# -# CodeRay.encoder:: Create an Encoder instance with format and options. -# CodeRay.scanner:: Create an Scanner instance for lang, with '' as default code. -# -# To make use of CodeRay.scanner, use CodeRay::Scanner::code=. -# -# The scanning methods provide more flexibility; we recommend to use these. -# -# == Reusing Scanners and Encoders -# -# If you want to re-use scanners and encoders (because that is faster), see -# CodeRay::Duo for the most convenient (and recommended) interface. -# -# source://coderay//lib/coderay.rb#126 -module CodeRay - class << self - # Assuming the path is a subpath of lib/coderay/ - # - # source://coderay//lib/coderay.rb#133 - def coderay_path(*path); end - - # Encode a string. - # - # This scans +code+ with the the Scanner for +lang+ and then - # encodes it with the Encoder for +format+. - # +options+ will be passed to the Encoder. - # - # See CodeRay::Encoder.encode. - # - # source://coderay//lib/coderay.rb#196 - def encode(code, lang, format, options = T.unsafe(nil)); end - - # Encodes +filename+ (a path to a code file) with the Scanner for +lang+. - # - # See CodeRay.scan_file. - # Notice that the second argument is the output +format+, not the input language. - # - # Example: - # require 'coderay' - # page = CodeRay.encode_file 'some_c_code.c', :html - # - # source://coderay//lib/coderay.rb#221 - def encode_file(filename, format, options = T.unsafe(nil)); end - - # Encode pre-scanned Tokens. - # Use this together with CodeRay.scan: - # - # require 'coderay' - # - # # Highlight a short Ruby code example in a HTML span - # tokens = CodeRay.scan '1 + 2', :ruby - # puts CodeRay.encode_tokens(tokens, :span) - # - # source://coderay//lib/coderay.rb#209 - def encode_tokens(tokens, format, options = T.unsafe(nil)); end - - # Finds the Encoder class for +format+ and creates an instance, passing - # +options+ to it. - # - # Example: - # require 'coderay' - # - # stats = CodeRay.encoder(:statistic) - # stats.encode("puts 17 + 4\n", :ruby) - # - # puts '%d out of %d tokens have the kind :integer.' % [ - # stats.type_stats[:integer].count, - # stats.real_token_count - # ] - # #-> 2 out of 4 tokens have the kind :integer. - # - # source://coderay//lib/coderay.rb#260 - def encoder(format, options = T.unsafe(nil)); end - - # Extract the options for the scanner from the +options+ hash. - # - # Returns an empty Hash if :scanner_options is not set. - # - # This is used if a method like CodeRay.encode has to provide options - # for Encoder _and_ scanner. - # - # source://coderay//lib/coderay.rb#278 - def get_scanner_options(options); end - - # Highlight a string into a HTML
. - # - # CSS styles use classes, so you have to include a stylesheet - # in your output. - # - # See encode. - # - # source://coderay//lib/coderay.rb#232 - def highlight(code, lang, options = T.unsafe(nil), format = T.unsafe(nil)); end - - # Highlight a file into a HTML
. - # - # CSS styles use classes, so you have to include a stylesheet - # in your output. - # - # See encode. - # - # source://coderay//lib/coderay.rb#242 - def highlight_file(filename, options = T.unsafe(nil), format = T.unsafe(nil)); end - - # Scans the given +code+ (a String) with the Scanner for +lang+. - # - # This is a simple way to use CodeRay. Example: - # require 'coderay' - # page = CodeRay.scan("puts 'Hello, world!'", :ruby).html - # - # See also demo/demo_simple. - # - # source://coderay//lib/coderay.rb#168 - def scan(code, lang, options = T.unsafe(nil), &block); end - - # Scans +filename+ (a path to a code file) with the Scanner for +lang+. - # - # If +lang+ is :auto or omitted, the CodeRay::FileType module is used to - # determine it. If it cannot find out what type it is, it uses - # CodeRay::Scanners::Text. - # - # Calls CodeRay.scan. - # - # Example: - # require 'coderay' - # page = CodeRay.scan_file('some_c_code.c').html - # - # source://coderay//lib/coderay.rb#183 - def scan_file(filename, lang = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # Finds the Scanner class for +lang+ and creates an instance, passing - # +options+ to it. - # - # See Scanner.new. - # - # source://coderay//lib/coderay.rb#268 - def scanner(lang, options = T.unsafe(nil), &block); end - end -end - -# source://coderay//lib/coderay.rb#130 -CodeRay::CODERAY_PATH = T.let(T.unsafe(nil), String) - -# = Duo -# -# A Duo is a convenient way to use CodeRay. You just create a Duo, -# giving it a lang (language of the input code) and a format (desired -# output format), and call Duo#highlight with the code. -# -# Duo makes it easy to re-use both scanner and encoder for a repetitive -# task. It also provides a very easy interface syntax: -# -# require 'coderay' -# CodeRay::Duo[:python, :div].highlight 'import this' -# -# Until you want to do uncommon things with CodeRay, I recommend to use -# this method, since it takes care of everything. -# -# source://coderay//lib/coderay/duo.rb#17 -class CodeRay::Duo - # Create a new Duo, holding a lang and a format to highlight code. - # - # simple: - # CodeRay::Duo[:ruby, :html].highlight 'bla 42' - # - # with options: - # CodeRay::Duo[:ruby, :html, :hint => :debug].highlight '????::??' - # - # alternative syntax without options: - # CodeRay::Duo[:ruby => :statistic].encode 'class << self; end' - # - # alternative syntax with options: - # CodeRay::Duo[{ :ruby => :statistic }, :do => :something].encode 'abc' - # - # The options are forwarded to scanner and encoder - # (see CodeRay.get_scanner_options). - # - # @return [Duo] a new instance of Duo - # - # source://coderay//lib/coderay/duo.rb#37 - def initialize(lang = T.unsafe(nil), format = T.unsafe(nil), options = T.unsafe(nil)); end - - # Tokenize and highlight the code using +scanner+ and +encoder+. - # Allows to use Duo like a proc object: - # - # CodeRay::Duo[:python => :yaml].call(code) - # - # or, in Ruby 1.9 and later: - # - # CodeRay::Duo[:python => :yaml].(code) - # - # source://coderay//lib/coderay/duo.rb#64 - def call(code, options = T.unsafe(nil)); end - - # Tokenize and highlight the code using +scanner+ and +encoder+. - # - # source://coderay//lib/coderay/duo.rb#64 - def encode(code, options = T.unsafe(nil)); end - - # The encoder of the duo. Only created once. - # - # source://coderay//lib/coderay/duo.rb#59 - def encoder; end - - # Returns the value of attribute format. - # - # source://coderay//lib/coderay/duo.rb#19 - def format; end - - # Sets the attribute format - # - # @param value the value to set the attribute format to. - # - # source://coderay//lib/coderay/duo.rb#19 - def format=(_arg0); end - - # Tokenize and highlight the code using +scanner+ and +encoder+. - # - # source://coderay//lib/coderay/duo.rb#64 - def highlight(code, options = T.unsafe(nil)); end - - # Returns the value of attribute lang. - # - # source://coderay//lib/coderay/duo.rb#19 - def lang; end - - # Sets the attribute lang - # - # @param value the value to set the attribute lang to. - # - # source://coderay//lib/coderay/duo.rb#19 - def lang=(_arg0); end - - # Returns the value of attribute options. - # - # source://coderay//lib/coderay/duo.rb#19 - def options; end - - # Sets the attribute options - # - # @param value the value to set the attribute options to. - # - # source://coderay//lib/coderay/duo.rb#19 - def options=(_arg0); end - - # The scanner of the duo. Only created once. - # - # source://coderay//lib/coderay/duo.rb#54 - def scanner; end - - class << self - # To allow calls like Duo[:ruby, :html].highlight. - def [](*_arg0); end - end -end - -# This module holds the Encoder class and its subclasses. -# For example, the HTML encoder is named CodeRay::Encoders::HTML -# can be found in coderay/encoders/html. -# -# Encoders also provides methods and constants for the register -# mechanism and the [] method that returns the Encoder class -# belonging to the given format. -# -# source://coderay//lib/coderay/encoders.rb#10 -module CodeRay::Encoders - extend ::CodeRay::PluginHost -end - -# A simple Filter that removes all tokens of the :comment kind. -# -# Alias: +remove_comments+ -# -# Usage: -# CodeRay.scan('print # foo', :ruby).comment_filter.text -# #-> "print " -# -# See also: TokenKindFilter, LinesOfCode -# -# source://coderay//lib/coderay/encoders/comment_filter.rb#15 -class CodeRay::Encoders::CommentFilter < ::CodeRay::Encoders::TokenKindFilter; end - -# source://coderay//lib/coderay/encoders/comment_filter.rb#19 -CodeRay::Encoders::CommentFilter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# Returns the number of tokens. -# -# Text and block tokens are counted. -# -# source://coderay//lib/coderay/encoders/count.rb#7 -class CodeRay::Encoders::Count < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/count.rb#29 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/count.rb#29 - def begin_line(kind); end - - # source://coderay//lib/coderay/encoders/count.rb#29 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/count.rb#29 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/count.rb#25 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/count.rb#19 - def finish(options); end - - # source://coderay//lib/coderay/encoders/count.rb#13 - def setup(options); end -end - -# = Debug Encoder -# -# Fast encoder producing simple debug output. -# -# It is readable and diff-able and is used for testing. -# -# You cannot fully restore the tokens information from the -# output, because consecutive :space tokens are merged. -# -# See also: Scanners::Debug -# -# source://coderay//lib/coderay/encoders/debug.rb#14 -class CodeRay::Encoders::Debug < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/debug.rb#30 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/debug.rb#38 - def begin_line(kind); end - - # source://coderay//lib/coderay/encoders/debug.rb#34 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/debug.rb#42 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/debug.rb#20 - def text_token(text, kind); end -end - -# source://coderay//lib/coderay/encoders/debug.rb#18 -CodeRay::Encoders::Debug::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# = Debug Lint Encoder -# -# Debug encoder with additional checks for: -# -# - empty tokens -# - incorrect nesting -# -# It will raise an InvalidTokenStream exception when any of the above occurs. -# -# See also: Encoders::Debug -# -# source://coderay//lib/coderay/encoders/debug_lint.rb#16 -class CodeRay::Encoders::DebugLint < ::CodeRay::Encoders::Debug - # source://coderay//lib/coderay/encoders/debug_lint.rb#26 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/debug_lint.rb#37 - def begin_line(kind); end - - # @raise [Lint::IncorrectTokenGroupNesting] - # - # source://coderay//lib/coderay/encoders/debug_lint.rb#31 - def end_group(kind); end - - # @raise [Lint::IncorrectTokenGroupNesting] - # - # source://coderay//lib/coderay/encoders/debug_lint.rb#42 - def end_line(kind); end - - # @raise [Lint::EmptyToken] - # - # source://coderay//lib/coderay/encoders/debug_lint.rb#20 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/debug_lint.rb#55 - def finish(options); end - - # source://coderay//lib/coderay/encoders/debug_lint.rb#50 - def setup(options); end -end - -# Wraps HTML output into a DIV element, using inline styles by default. -# -# See Encoders::HTML for available options. -# -# source://coderay//lib/coderay/encoders/div.rb#9 -class CodeRay::Encoders::Div < ::CodeRay::Encoders::HTML; end - -# source://coderay//lib/coderay/encoders/div.rb#15 -CodeRay::Encoders::Div::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/div.rb#11 -CodeRay::Encoders::Div::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# = Encoder -# -# The Encoder base class. Together with Scanner and -# Tokens, it forms the highlighting triad. -# -# Encoder instances take a Tokens object and do something with it. -# -# The most common Encoder is surely the HTML encoder -# (CodeRay::Encoders::HTML). It highlights the code in a colorful -# html page. -# If you want the highlighted code in a div or a span instead, -# use its subclasses Div and Span. -# -# source://coderay//lib/coderay/encoders/encoder.rb#16 -class CodeRay::Encoders::Encoder - extend ::CodeRay::Plugin - - # Creates a new Encoder. - # +options+ is saved and used for all encode operations, as long - # as you don't overwrite it there by passing additional options. - # - # Encoder objects provide three encode methods: - # - encode simply takes a +code+ string and a +lang+ - # - encode_tokens expects a +tokens+ object instead - # - # Each method has an optional +options+ parameter. These are - # added to the options you passed at creation. - # - # @return [Encoder] a new instance of Encoder - # - # source://coderay//lib/coderay/encoders/encoder.rb#55 - def initialize(options = T.unsafe(nil)); end - - # source://coderay//lib/coderay/encoders/encoder.rb#87 - def <<(token); end - - # Starts a token group with the given +kind+. - # - # source://coderay//lib/coderay/encoders/encoder.rb#123 - def begin_group(kind); end - - # Starts a new line token group with the given +kind+. - # - # source://coderay//lib/coderay/encoders/encoder.rb#131 - def begin_line(kind); end - - # Encode the given +code+ using the Scanner for +lang+. - # - # source://coderay//lib/coderay/encoders/encoder.rb#70 - def encode(code, lang, options = T.unsafe(nil)); end - - # Encode a Tokens object. - # - # source://coderay//lib/coderay/encoders/encoder.rb#61 - def encode_tokens(tokens, options = T.unsafe(nil)); end - - # Ends a token group with the given +kind+. - # - # source://coderay//lib/coderay/encoders/encoder.rb#127 - def end_group(kind); end - - # Ends a new line token group with the given +kind+. - # - # source://coderay//lib/coderay/encoders/encoder.rb#135 - def end_line(kind); end - - # The default file extension for this encoder. - # - # source://coderay//lib/coderay/encoders/encoder.rb#83 - def file_extension; end - - # Encode the given +code+ using the Scanner for +lang+. - # You can use highlight instead of encode, if that seems - # more clear to you. - # - # source://coderay//lib/coderay/encoders/encoder.rb#70 - def highlight(code, lang, options = T.unsafe(nil)); end - - # The options you gave the Encoder at creating. - # - # source://coderay//lib/coderay/encoders/encoder.rb#43 - def options; end - - # The options you gave the Encoder at creating. - # - # source://coderay//lib/coderay/encoders/encoder.rb#43 - def options=(_arg0); end - - # The options you gave the Encoder at creating. - # - # source://coderay//lib/coderay/encoders/encoder.rb#43 - def scanner; end - - # The options you gave the Encoder at creating. - # - # source://coderay//lib/coderay/encoders/encoder.rb#43 - def scanner=(_arg0); end - - # Called for each text token ([text, kind]), where text is a String. - # - # source://coderay//lib/coderay/encoders/encoder.rb#118 - def text_token(text, kind); end - - # Called with +content+ and +kind+ of the currently scanned token. - # For simple scanners, it's enougth to implement this method. - # - # By default, it calls text_token, begin_group, end_group, begin_line, - # or end_line, depending on the +content+. - # - # source://coderay//lib/coderay/encoders/encoder.rb#100 - def token(content, kind); end - - # Do the encoding. - # - # The already created +tokens+ object must be used; it must be a - # Tokens object. - # - # source://coderay//lib/coderay/encoders/encoder.rb#168 - def tokens(tokens, options = T.unsafe(nil)); end - - protected - - # Do the encoding. - # - # The already created +tokens+ object must be used; it must be a - # Tokens object. - # - # source://coderay//lib/coderay/encoders/encoder.rb#168 - def compile(tokens, options = T.unsafe(nil)); end - - # Called with merged options after encoding starts. - # The return value is the result of encoding, typically @out. - # - # source://coderay//lib/coderay/encoders/encoder.rb#160 - def finish(options); end - - # source://coderay//lib/coderay/encoders/encoder.rb#148 - def get_output(options); end - - # Append data.to_s to the output. Returns the argument. - # - # source://coderay//lib/coderay/encoders/encoder.rb#153 - def output(data); end - - # Called with merged options before encoding starts. - # Sets @out to an empty string. - # - # See the HTML Encoder for an example of option caching. - # - # source://coderay//lib/coderay/encoders/encoder.rb#144 - def setup(options); end - - class << self - # If FILE_EXTENSION isn't defined, this method returns the - # downcase class name instead. - # - # source://coderay//lib/coderay/encoders/encoder.rb#24 - def const_missing(sym); end - - # The default file extension for output file of this encoder class. - # - # source://coderay//lib/coderay/encoders/encoder.rb#33 - def file_extension; end - end -end - -# Subclasses are to store their default options in this constant. -# -# source://coderay//lib/coderay/encoders/encoder.rb#40 -CodeRay::Encoders::Encoder::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/helpers/plugin.rb#41 -CodeRay::Encoders::Encoder::PLUGIN_HOST = CodeRay::Encoders - -# A Filter encoder has another Tokens instance as output. -# It can be subclass to select, remove, or modify tokens in the stream. -# -# Subclasses of Filter are called "Filters" and can be chained. -# -# == Options -# -# === :tokens -# -# The Tokens object which will receive the output. -# -# Default: Tokens.new -# -# See also: TokenKindFilter -# -# source://coderay//lib/coderay/encoders/filter.rb#18 -class CodeRay::Encoders::Filter < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/filter.rb#39 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/filter.rb#43 - def begin_line(kind); end - - # source://coderay//lib/coderay/encoders/filter.rb#47 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/filter.rb#51 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/filter.rb#35 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/filter.rb#29 - def finish(options); end - - # source://coderay//lib/coderay/encoders/filter.rb#23 - def setup(options); end -end - -# = HTML Encoder -# -# This is CodeRay's most important highlighter: -# It provides save, fast XHTML generation and CSS support. -# -# == Usage -# -# require 'coderay' -# puts CodeRay.scan('Some /code/', :ruby).html #-> a HTML page -# puts CodeRay.scan('Some /code/', :ruby).html(:wrap => :span) -# #-> Some /code/ -# puts CodeRay.scan('Some /code/', :ruby).span #-> the same -# -# puts CodeRay.scan('Some code', :ruby).html( -# :wrap => nil, -# :line_numbers => :inline, -# :css => :style -# ) -# -# == Options -# -# === :tab_width -# Convert \t characters to +n+ spaces (a number or false.) -# false will keep tab characters untouched. -# -# Default: 8 -# -# === :css -# How to include the styles; can be :class or :style. -# -# Default: :class -# -# === :wrap -# Wrap in :page, :div, :span or nil. -# -# You can also use Encoders::Div and Encoders::Span. -# -# Default: nil -# -# === :title -# -# The title of the HTML page (works only when :wrap is set to :page.) -# -# Default: 'CodeRay output' -# -# === :break_lines -# -# Split multiline blocks at line breaks. -# Forced to true if :line_numbers option is set to :inline. -# -# Default: false -# -# === :line_numbers -# Include line numbers in :table, :inline, or nil (no line numbers) -# -# Default: nil -# -# === :line_number_anchors -# Adds anchors and links to the line numbers. Can be false (off), true (on), -# or a prefix string that will be prepended to the anchor name. -# -# The prefix must consist only of letters, digits, and underscores. -# -# Default: true, default prefix name: "line" -# -# === :line_number_start -# Where to start with line number counting. -# -# Default: 1 -# -# === :bold_every -# Make every +n+-th number appear bold. -# -# Default: 10 -# -# === :highlight_lines -# -# Highlights certain line numbers. -# Can be any Enumerable, typically just an Array or Range, of numbers. -# -# Bolding is deactivated when :highlight_lines is set. It only makes sense -# in combination with :line_numbers. -# -# Default: nil -# -# === :hint -# Include some information into the output using the title attribute. -# Can be :info (show token kind on mouse-over), :info_long (with full path) -# or :debug (via inspect). -# -# Default: false -# -# source://coderay//lib/coderay/encoders/html.rb#97 -class CodeRay::Encoders::HTML < ::CodeRay::Encoders::Encoder - # token groups, eg. strings - # - # source://coderay//lib/coderay/encoders/html.rb#235 - def begin_group(kind); end - - # whole lines to be highlighted, eg. a deleted line in a diff - # - # source://coderay//lib/coderay/encoders/html.rb#247 - def begin_line(kind); end - - # Returns the value of attribute css. - # - # source://coderay//lib/coderay/encoders/html.rb#126 - def css; end - - # source://coderay//lib/coderay/encoders/html.rb#241 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/html.rb#261 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/html.rb#221 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/html.rb#316 - def break_lines(text, style); end - - # source://coderay//lib/coderay/encoders/html.rb#310 - def check_group_nesting(name, kind); end - - # source://coderay//lib/coderay/encoders/html.rb#268 - def check_options!(options); end - - # source://coderay//lib/coderay/encoders/html.rb#324 - def close_span; end - - # source://coderay//lib/coderay/encoders/html.rb#280 - def css_class_for_kinds(kinds); end - - # source://coderay//lib/coderay/encoders/html.rb#195 - def finish(options); end - - # source://coderay//lib/coderay/encoders/html.rb#289 - def make_span_for_kinds(method, hint); end - - # source://coderay//lib/coderay/encoders/html.rb#172 - def setup(options); end - - # source://coderay//lib/coderay/encoders/html.rb#284 - def style_for_kinds(kinds); end - - class << self - # source://coderay//lib/coderay/encoders/html.rb#130 - def make_html_escape_hash; end - - # Generate a hint about the given +kinds+ in a +hint+ style. - # - # +hint+ may be :info, :info_long or :debug. - # - # source://coderay//lib/coderay/encoders/html.rb#157 - def token_path_to_hint(hint, kinds); end - end -end - -# source://coderay//lib/coderay/encoders/html/css.rb#5 -class CodeRay::Encoders::HTML::CSS - # @return [CSS] a new instance of CSS - # - # source://coderay//lib/coderay/encoders/html/css.rb#13 - def initialize(style = T.unsafe(nil)); end - - # source://coderay//lib/coderay/encoders/html/css.rb#23 - def get_style_for_css_classes(css_classes); end - - # Returns the value of attribute stylesheet. - # - # source://coderay//lib/coderay/encoders/html/css.rb#7 - def stylesheet; end - - private - - # source://coderay//lib/coderay/encoders/html/css.rb#49 - def parse(stylesheet); end - - class << self - # source://coderay//lib/coderay/encoders/html/css.rb#9 - def load_stylesheet(style = T.unsafe(nil)); end - end -end - -# source://coderay//lib/coderay/encoders/html/css.rb#36 -CodeRay::Encoders::HTML::CSS::CSS_CLASS_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/encoders/html.rb#103 -CodeRay::Encoders::HTML::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/html.rb#101 -CodeRay::Encoders::HTML::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# source://coderay//lib/coderay/encoders/html.rb#143 -CodeRay::Encoders::HTML::HTML_ESCAPE = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/html.rb#144 -CodeRay::Encoders::HTML::HTML_ESCAPE_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/encoders/html/numbering.rb#6 -module CodeRay::Encoders::HTML::Numbering - class << self - # source://coderay//lib/coderay/encoders/html/numbering.rb#8 - def number!(output, mode = T.unsafe(nil), options = T.unsafe(nil)); end - end -end - -# This module is included in the output String of the HTML Encoder. -# -# It provides methods like wrap, div, page etc. -# -# Remember to use #clone instead of #dup to keep the modules the object was -# extended with. -# -# TODO: Rewrite this without monkey patching. -# -# source://coderay//lib/coderay/encoders/html/output.rb#14 -module CodeRay::Encoders::HTML::Output - # source://coderay//lib/coderay/encoders/html/output.rb#57 - def apply_title!(title); end - - # Returns the value of attribute css. - # - # source://coderay//lib/coderay/encoders/html/output.rb#16 - def css; end - - # Sets the attribute css - # - # @param value the value to set the attribute css to. - # - # source://coderay//lib/coderay/encoders/html/output.rb#16 - def css=(_arg0); end - - # source://coderay//lib/coderay/encoders/html/output.rb#86 - def stylesheet(in_tag = T.unsafe(nil)); end - - # source://coderay//lib/coderay/encoders/html/output.rb#62 - def wrap!(element, *args); end - - # source://coderay//lib/coderay/encoders/html/output.rb#52 - def wrap_in!(template); end - - # source://coderay//lib/coderay/encoders/html/output.rb#47 - def wrapped_in; end - - # Sets the attribute wrapped_in - # - # @param value the value to set the attribute wrapped_in to. - # - # source://coderay//lib/coderay/encoders/html/output.rb#50 - def wrapped_in=(_arg0); end - - # @return [Boolean] - # - # source://coderay//lib/coderay/encoders/html/output.rb#43 - def wrapped_in?(element); end - - class << self - # Raises an exception if an object that doesn't respond to to_str is extended by Output, - # to prevent users from misuse. Use Module#remove_method to disable. - # - # source://coderay//lib/coderay/encoders/html/output.rb#22 - def extended(o); end - - # source://coderay//lib/coderay/encoders/html/output.rb#26 - def make_stylesheet(css, in_tag = T.unsafe(nil)); end - - # source://coderay//lib/coderay/encoders/html/output.rb#36 - def page_template_for_css(css); end - end -end - -# source://coderay//lib/coderay/encoders/html/output.rb#117 -CodeRay::Encoders::HTML::Output::DIV = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) - -# source://coderay//lib/coderay/encoders/html/output.rb#130 -CodeRay::Encoders::HTML::Output::PAGE = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) - -# source://coderay//lib/coderay/encoders/html/output.rb#115 -CodeRay::Encoders::HTML::Output::SPAN = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) - -# source://coderay//lib/coderay/encoders/html/output.rb#123 -CodeRay::Encoders::HTML::Output::TABLE = T.let(T.unsafe(nil), CodeRay::Encoders::HTML::Output::Template) - -# -- don't include the templates in docu -# -# source://coderay//lib/coderay/encoders/html/output.rb#92 -class CodeRay::Encoders::HTML::Output::Template < ::String - # source://coderay//lib/coderay/encoders/html/output.rb#104 - def apply(target, replacement); end - - class << self - # source://coderay//lib/coderay/encoders/html/output.rb#94 - def wrap!(str, template, target); end - end -end - -# source://coderay//lib/coderay/encoders/html.rb#146 -CodeRay::Encoders::HTML::TOKEN_KIND_TO_INFO = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/html.rb#150 -CodeRay::Encoders::HTML::TRANSPARENT_TOKEN_KINDS = T.let(T.unsafe(nil), Set) - -# A simple JSON Encoder. -# -# Example: -# CodeRay.scan('puts "Hello world!"', :ruby).json -# yields -# [ -# {"type"=>"text", "text"=>"puts", "kind"=>"ident"}, -# {"type"=>"text", "text"=>" ", "kind"=>"space"}, -# {"type"=>"block", "action"=>"open", "kind"=>"string"}, -# {"type"=>"text", "text"=>"\"", "kind"=>"delimiter"}, -# {"type"=>"text", "text"=>"Hello world!", "kind"=>"content"}, -# {"type"=>"text", "text"=>"\"", "kind"=>"delimiter"}, -# {"type"=>"block", "action"=>"close", "kind"=>"string"}, -# ] -# -# source://coderay//lib/coderay/encoders/json.rb#18 -class CodeRay::Encoders::JSON < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/json.rb#64 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/json.rb#72 - def begin_line(kind); end - - # source://coderay//lib/coderay/encoders/json.rb#68 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/json.rb#76 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/json.rb#60 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/json.rb#49 - def append(data); end - - # source://coderay//lib/coderay/encoders/json.rb#45 - def finish(options); end - - # source://coderay//lib/coderay/encoders/json.rb#38 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/json.rb#35 -CodeRay::Encoders::JSON::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# Counts the LoC (Lines of Code). Returns an Integer >= 0. -# -# Alias: +loc+ -# -# Everything that is not comment, markup, doctype/shebang, or an empty line, -# is considered to be code. -# -# For example, -# * HTML files not containing JavaScript have 0 LoC -# * in a Java class without comments, LoC is the number of non-empty lines -# -# A Scanner class should define the token kinds that are not code in the -# KINDS_NOT_LOC constant, which defaults to [:comment, :doctype]. -# -# source://coderay//lib/coderay/encoders/lines_of_code.rb#17 -class CodeRay::Encoders::LinesOfCode < ::CodeRay::Encoders::TokenKindFilter - protected - - # source://coderay//lib/coderay/encoders/lines_of_code.rb#38 - def finish(options); end - - # source://coderay//lib/coderay/encoders/lines_of_code.rb#25 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/lines_of_code.rb#21 -CodeRay::Encoders::LinesOfCode::NON_EMPTY_LINE = T.let(T.unsafe(nil), Regexp) - -# = Lint Encoder -# -# Checks for: -# -# - empty tokens -# - incorrect nesting -# -# It will raise an InvalidTokenStream exception when any of the above occurs. -# -# See also: Encoders::DebugLint -# -# source://coderay//lib/coderay/encoders/lint.rb#14 -class CodeRay::Encoders::Lint < ::CodeRay::Encoders::Debug - # source://coderay//lib/coderay/encoders/lint.rb#28 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/lint.rb#37 - def begin_line(kind); end - - # @raise [IncorrectTokenGroupNesting] - # - # source://coderay//lib/coderay/encoders/lint.rb#32 - def end_group(kind); end - - # @raise [IncorrectTokenGroupNesting] - # - # source://coderay//lib/coderay/encoders/lint.rb#41 - def end_line(kind); end - - # @raise [EmptyToken] - # - # source://coderay//lib/coderay/encoders/lint.rb#23 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/lint.rb#52 - def finish(options); end - - # source://coderay//lib/coderay/encoders/lint.rb#48 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/lint.rb#19 -class CodeRay::Encoders::Lint::EmptyToken < ::CodeRay::Encoders::Lint::InvalidTokenStream; end - -# source://coderay//lib/coderay/encoders/lint.rb#21 -class CodeRay::Encoders::Lint::IncorrectTokenGroupNesting < ::CodeRay::Encoders::Lint::InvalidTokenStream; end - -# source://coderay//lib/coderay/encoders/lint.rb#18 -class CodeRay::Encoders::Lint::InvalidTokenStream < ::StandardError; end - -# source://coderay//lib/coderay/encoders/lint.rb#20 -class CodeRay::Encoders::Lint::UnknownTokenKind < ::CodeRay::Encoders::Lint::InvalidTokenStream; end - -# = Null Encoder -# -# Does nothing and returns an empty string. -# -# source://coderay//lib/coderay/encoders/null.rb#7 -class CodeRay::Encoders::Null < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/null.rb#11 - def text_token(text, kind); end -end - -# Wraps the output into a HTML page, using CSS classes and -# line numbers in the table format by default. -# -# See Encoders::HTML for available options. -# -# source://coderay//lib/coderay/encoders/page.rb#10 -class CodeRay::Encoders::Page < ::CodeRay::Encoders::HTML; end - -# source://coderay//lib/coderay/encoders/page.rb#16 -CodeRay::Encoders::Page::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/page.rb#12 -CodeRay::Encoders::Page::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# Wraps HTML output into a SPAN element, using inline styles by default. -# -# See Encoders::HTML for available options. -# -# source://coderay//lib/coderay/encoders/span.rb#9 -class CodeRay::Encoders::Span < ::CodeRay::Encoders::HTML; end - -# source://coderay//lib/coderay/encoders/span.rb#15 -CodeRay::Encoders::Span::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/span.rb#11 -CodeRay::Encoders::Span::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# Makes a statistic for the given tokens. -# -# Alias: +stats+ -# -# source://coderay//lib/coderay/encoders/statistic.rb#7 -class CodeRay::Encoders::Statistic < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/statistic.rb#70 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/statistic.rb#78 - def begin_line(kind); end - - # source://coderay//lib/coderay/encoders/statistic.rb#86 - def block_token(action, kind); end - - # source://coderay//lib/coderay/encoders/statistic.rb#74 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/statistic.rb#82 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/statistic.rb#11 - def real_token_count; end - - # source://coderay//lib/coderay/encoders/statistic.rb#62 - def text_token(text, kind); end - - # source://coderay//lib/coderay/encoders/statistic.rb#11 - def type_stats; end - - protected - - # source://coderay//lib/coderay/encoders/statistic.rb#42 - def finish(options); end - - # source://coderay//lib/coderay/encoders/statistic.rb#17 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/statistic.rb#24 -CodeRay::Encoders::Statistic::STATS = T.let(T.unsafe(nil), String) - -# source://coderay//lib/coderay/encoders/statistic.rb#38 -CodeRay::Encoders::Statistic::TOKEN_TYPES_ROW = T.let(T.unsafe(nil), String) - -# source://coderay//lib/coderay/encoders/statistic.rb#13 -class CodeRay::Encoders::Statistic::TypeStats < ::Struct - # Returns the value of attribute count - # - # @return [Object] the current value of count - def count; end - - # Sets the attribute count - # - # @param value [Object] the value to set the attribute count to. - # @return [Object] the newly set value - def count=(_); end - - # Returns the value of attribute size - # - # @return [Object] the current value of size - def size; end - - # Sets the attribute size - # - # @param value [Object] the value to set the attribute size to. - # @return [Object] the newly set value - def size=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://coderay//lib/coderay/encoders/terminal.rb#17 -class CodeRay::Encoders::Terminal < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/terminal.rb#156 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/terminal.rb#156 - def begin_line(kind); end - - # source://coderay//lib/coderay/encoders/terminal.rb#162 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/terminal.rb#172 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/terminal.rb#141 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/terminal.rb#133 - def setup(options); end - - private - - # source://coderay//lib/coderay/encoders/terminal.rb#179 - def open_token(kind); end -end - -# source://coderay//lib/coderay/encoders/terminal.rb#21 -CodeRay::Encoders::Terminal::TOKEN_COLORS = T.let(T.unsafe(nil), Hash) - -# Concats the tokens into a single string, resulting in the original -# code string if no tokens were removed. -# -# Alias: +plain+, +plaintext+ -# -# == Options -# -# === :separator -# A separator string to join the tokens. -# -# Default: empty String -# -# source://coderay//lib/coderay/encoders/text.rb#15 -class CodeRay::Encoders::Text < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/text.rb#25 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/text.rb#36 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/text.rb#21 -CodeRay::Encoders::Text::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/text.rb#19 -CodeRay::Encoders::Text::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# A Filter that selects tokens based on their token kind. -# -# == Options -# -# === :exclude -# -# One or many symbols (in an Array) which shall be excluded. -# -# Default: [] -# -# === :include -# -# One or many symbols (in an array) which shall be included. -# -# Default: :all, which means all tokens are included. -# -# Exclusion wins over inclusion. -# -# See also: CommentFilter -# -# source://coderay//lib/coderay/encoders/token_kind_filter.rb#25 -class CodeRay::Encoders::TokenKindFilter < ::CodeRay::Encoders::Filter - # Add the token group to the output stream if +kind+ matches the - # conditions. - # - # If it does not, all tokens inside the group are excluded from the - # stream, even if their kinds match. - # - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#66 - def begin_group(kind); end - - # See +begin_group+. - # - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#77 - def begin_line(kind); end - - # Take care of re-enabling the delegation of tokens to the output stream - # if an exluded group has ended. - # - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#89 - def end_group(kind); end - - # See +end_group+. - # - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#99 - def end_line(kind); end - - # Add the token to the output stream if +kind+ matches the conditions. - # - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#57 - def text_token(text, kind); end - - protected - - # @return [Boolean] - # - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#49 - def include_group?(kind); end - - # @return [Boolean] - # - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#45 - def include_text_token?(text, kind); end - - # source://coderay//lib/coderay/encoders/token_kind_filter.rb#35 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/token_kind_filter.rb#29 -CodeRay::Encoders::TokenKindFilter::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# = XML Encoder -# -# Uses REXML. Very slow. -# -# source://coderay//lib/coderay/encoders/xml.rb#7 -class CodeRay::Encoders::XML < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/xml.rb#58 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/xml.rb#62 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/xml.rb#38 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/xml.rb#31 - def finish(options); end - - # source://coderay//lib/coderay/encoders/xml.rb#22 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/xml.rb#15 -CodeRay::Encoders::XML::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/encoders/xml.rb#11 -CodeRay::Encoders::XML::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# = YAML Encoder -# -# Slow. -# -# source://coderay//lib/coderay/encoders/yaml.rb#9 -class CodeRay::Encoders::YAML < ::CodeRay::Encoders::Encoder - # source://coderay//lib/coderay/encoders/yaml.rb#31 - def begin_group(kind); end - - # source://coderay//lib/coderay/encoders/yaml.rb#39 - def begin_line(kind); end - - # source://coderay//lib/coderay/encoders/yaml.rb#35 - def end_group(kind); end - - # source://coderay//lib/coderay/encoders/yaml.rb#43 - def end_line(kind); end - - # source://coderay//lib/coderay/encoders/yaml.rb#27 - def text_token(text, kind); end - - protected - - # source://coderay//lib/coderay/encoders/yaml.rb#22 - def finish(options); end - - # source://coderay//lib/coderay/encoders/yaml.rb#16 - def setup(options); end -end - -# source://coderay//lib/coderay/encoders/yaml.rb#13 -CodeRay::Encoders::YAML::FILE_EXTENSION = T.let(T.unsafe(nil), String) - -# = FileType -# -# A simple filetype recognizer. -# -# == Usage -# -# # determine the type of the given -# lang = FileType[file_name] -# -# # return :text if the file type is unknown -# lang = FileType.fetch file_name, :text -# -# # try the shebang line, too -# lang = FileType.fetch file_name, :text, true -# -# source://coderay//lib/coderay/helpers/file_type.rb#17 -module CodeRay::FileType - class << self - # Try to determine the file type of the file. - # - # +filename+ is a relative or absolute path to a file. - # - # The file itself is only accessed when +read_shebang+ is set to true. - # That means you can get filetypes from files that don't exist. - # - # source://coderay//lib/coderay/helpers/file_type.rb#29 - def [](filename, read_shebang = T.unsafe(nil)); end - - # This works like Hash#fetch. - # - # If the filetype cannot be found, the +default+ value - # is returned. - # - # source://coderay//lib/coderay/helpers/file_type.rb#50 - def fetch(filename, default = T.unsafe(nil), read_shebang = T.unsafe(nil)); end - - protected - - # source://coderay//lib/coderay/helpers/file_type.rb#66 - def type_from_shebang(filename); end - end -end - -# source://coderay//lib/coderay/helpers/file_type.rb#79 -CodeRay::FileType::TypeFromExt = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/helpers/file_type.rb#139 -CodeRay::FileType::TypeFromName = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/helpers/file_type.rb#137 -CodeRay::FileType::TypeFromShebang = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/helpers/file_type.rb#19 -class CodeRay::FileType::UnknownFileType < ::Exception; end - -# = Plugin -# -# Plugins have to include this module. -# -# IMPORTANT: Use extend for this module. -# -# See CodeRay::PluginHost for examples. -# -# source://coderay//lib/coderay/helpers/plugin.rb#10 -module CodeRay::Plugin - # source://coderay//lib/coderay/helpers/plugin.rb#46 - def aliases; end - - # The PluginHost for this Plugin class. - # - # source://coderay//lib/coderay/helpers/plugin.rb#39 - def plugin_host(host = T.unsafe(nil)); end - - # Returns the value of attribute plugin_id. - # - # source://coderay//lib/coderay/helpers/plugin.rb#12 - def plugin_id; end - - # Register this class for the given +id+. - # - # Example: - # class MyPlugin < PluginHost::BaseClass - # register_for :my_id - # ... - # end - # - # See PluginHost.register. - # - # source://coderay//lib/coderay/helpers/plugin.rb#23 - def register_for(id); end - - # Returns the title of the plugin, or sets it to the - # optional argument +title+. - # - # source://coderay//lib/coderay/helpers/plugin.rb#30 - def title(title = T.unsafe(nil)); end -end - -# = PluginHost -# -# A simple subclass/subfolder plugin system. -# -# Example: -# class Generators -# extend PluginHost -# plugin_path 'app/generators' -# end -# -# class Generator -# extend Plugin -# PLUGIN_HOST = Generators -# end -# -# class FancyGenerator < Generator -# register_for :fancy -# end -# -# Generators[:fancy] #-> FancyGenerator -# # or -# CodeRay.require_plugin 'Generators/fancy' -# # or -# Generators::Fancy -# -# source://coderay//lib/coderay/helpers/plugin_host.rb#27 -module CodeRay::PluginHost - # Returns the Plugin for +id+. - # - # Example: - # yaml_plugin = MyPluginHost[:yaml] - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#49 - def [](id, *args, &blk); end - - # Returns an array of all Plugins. - # - # Note: This loads all plugins using load_all. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#151 - def all_plugins; end - - # Tries to +load+ the missing plugin by translating +const+ to the - # underscore form (eg. LinesOfCode becomes lines_of_code). - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#61 - def const_missing(const); end - - # Define the default plugin to use when no plugin is found - # for a given id, or return the default plugin. - # - # See also map. - # - # class MyColorHost < PluginHost - # map :navy => :dark_blue - # default :gray - # end - # - # MyColorHost.default # loads and returns the Gray plugin - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#114 - def default(id = T.unsafe(nil)); end - - # Returns an array of all .rb files in the plugin path. - # - # The extension .rb is not included. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#140 - def list; end - - # Returns the Plugin for +id+. - # - # Example: - # yaml_plugin = MyPluginHost[:yaml] - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#49 - def load(id, *args, &blk); end - - # Loads all plugins using list and load. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#39 - def load_all; end - - # Loads the map file (see map). - # - # This is done automatically when plugin_path is called. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#159 - def load_plugin_map; end - - # Map a plugin_id to another. - # - # Usage: Put this in a file plugin_path/_map.rb. - # - # class MyColorHost < PluginHost - # map :navy => :dark_blue, - # :maroon => :brown, - # :luna => :moon - # end - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#95 - def map(hash); end - - # A Hash of plugion_id => Plugin pairs. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#133 - def plugin_hash; end - - # The path where the plugins can be found. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#79 - def plugin_path(*args); end - - # Every plugin must register itself for +id+ by calling register_for, - # which calls this method. - # - # See Plugin#register_for. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#128 - def register(plugin, id); end - - protected - - # Return a plugin hash that automatically loads plugins. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#172 - def make_plugin_hash; end - - # Returns the expected path to the plugin file for the given id. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#196 - def path_to(plugin_id); end - - # Converts +id+ to a valid plugin ID String, or returns +nil+. - # - # Raises +ArgumentError+ for all other objects, or if the - # given String includes non-alphanumeric characters (\W). - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#204 - def validate_id(id); end - - class << self - # Adds the module/class to the PLUGIN_HOSTS list. - # - # source://coderay//lib/coderay/helpers/plugin_host.rb#72 - def extended(mod); end - end -end - -# source://coderay//lib/coderay/helpers/plugin_host.rb#33 -class CodeRay::PluginHost::HostNotFound < ::LoadError; end - -# source://coderay//lib/coderay/helpers/plugin_host.rb#35 -CodeRay::PluginHost::PLUGIN_HOSTS = T.let(T.unsafe(nil), Array) - -# dummy hash -# -# source://coderay//lib/coderay/helpers/plugin_host.rb#36 -CodeRay::PluginHost::PLUGIN_HOSTS_BY_ID = T.let(T.unsafe(nil), Hash) - -# Raised if Encoders::[] fails because: -# * a file could not be found -# * the requested Plugin is not registered -# -# source://coderay//lib/coderay/helpers/plugin_host.rb#32 -class CodeRay::PluginHost::PluginNotFound < ::LoadError; end - -# = Scanners -# -# This module holds the Scanner class and its subclasses. -# For example, the Ruby scanner is named CodeRay::Scanners::Ruby -# can be found in coderay/scanners/ruby. -# -# Scanner also provides methods and constants for the register -# mechanism and the [] method that returns the Scanner class -# belonging to the given lang. -# -# See PluginHost. -# -# source://coderay//lib/coderay/scanners.rb#18 -module CodeRay::Scanners - extend ::CodeRay::PluginHost -end - -# Scanner for C. -# -# source://coderay//lib/coderay/scanners/c.rb#5 -class CodeRay::Scanners::C < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/c.rb#44 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/c.rb#27 -CodeRay::Scanners::C::DIRECTIVES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/c.rb#39 -CodeRay::Scanners::C::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/c.rb#33 -CodeRay::Scanners::C::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/c.rb#10 -CodeRay::Scanners::C::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/c.rb#23 -CodeRay::Scanners::C::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/c.rb#17 -CodeRay::Scanners::C::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/c.rb#40 -CodeRay::Scanners::C::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# Scanner for C++. -# -# Aliases: +cplusplus+, c++ -CodeRay::Scanners::CPlusPlus = CodeRay::Scanners::Text - -# source://coderay//lib/coderay/scanners/css.rb#4 -class CodeRay::Scanners::CSS < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/css.rb#55 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/css.rb#50 - def setup; end -end - -# source://coderay//lib/coderay/scanners/css.rb#8 -CodeRay::Scanners::CSS::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/css.rb#16 -module CodeRay::Scanners::CSS::RE; end - -# source://coderay//lib/coderay/scanners/css.rb#31 -CodeRay::Scanners::CSS::RE::AtKeyword = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#45 -CodeRay::Scanners::CSS::RE::AttributeSelector = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#43 -CodeRay::Scanners::CSS::RE::Class = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#38 -CodeRay::Scanners::CSS::RE::Dimension = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#19 -CodeRay::Scanners::CSS::RE::Escape = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#40 -CodeRay::Scanners::CSS::RE::Function = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#17 -CodeRay::Scanners::CSS::RE::Hex = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#26 -CodeRay::Scanners::CSS::RE::HexColor = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#42 -CodeRay::Scanners::CSS::RE::Id = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#30 -CodeRay::Scanners::CSS::RE::Ident = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#20 -CodeRay::Scanners::CSS::RE::NMChar = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#21 -CodeRay::Scanners::CSS::RE::NMStart = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#29 -CodeRay::Scanners::CSS::RE::Name = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#28 -CodeRay::Scanners::CSS::RE::Num = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#32 -CodeRay::Scanners::CSS::RE::Percentage = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#44 -CodeRay::Scanners::CSS::RE::PseudoClass = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#24 -CodeRay::Scanners::CSS::RE::String = T.let(T.unsafe(nil), Regexp) - -# TODO: buggy regexp -# -# source://coderay//lib/coderay/scanners/css.rb#22 -CodeRay::Scanners::CSS::RE::String1 = T.let(T.unsafe(nil), Regexp) - -# TODO: buggy regexp -# -# source://coderay//lib/coderay/scanners/css.rb#23 -CodeRay::Scanners::CSS::RE::String2 = T.let(T.unsafe(nil), Regexp) - -# differs from standard because it allows uppercase hex too -# -# source://coderay//lib/coderay/scanners/css.rb#18 -CodeRay::Scanners::CSS::RE::Unicode = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/css.rb#36 -CodeRay::Scanners::CSS::RE::Unit = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#6 -class CodeRay::Scanners::Clojure < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/clojure.rb#145 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/clojure.rb#95 -CodeRay::Scanners::Clojure::BASIC_IDENTIFIER = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#133 -CodeRay::Scanners::Clojure::COMPLEX10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#134 -CodeRay::Scanners::Clojure::COMPLEX16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#136 -CodeRay::Scanners::Clojure::COMPLEX2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#135 -CodeRay::Scanners::Clojure::COMPLEX8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#16 -CodeRay::Scanners::Clojure::CORE_FORMS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/clojure.rb#120 -CodeRay::Scanners::Clojure::DECIMAL = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#98 -CodeRay::Scanners::Clojure::DIGIT = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#99 -CodeRay::Scanners::Clojure::DIGIT10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#100 -CodeRay::Scanners::Clojure::DIGIT16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#102 -CodeRay::Scanners::Clojure::DIGIT2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#101 -CodeRay::Scanners::Clojure::DIGIT8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#107 -CodeRay::Scanners::Clojure::EXACTNESS = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#110 -CodeRay::Scanners::Clojure::EXP = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#109 -CodeRay::Scanners::Clojure::EXP_MARK = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#96 -CodeRay::Scanners::Clojure::IDENTIFIER = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#85 -CodeRay::Scanners::Clojure::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/clojure.rb#129 -CodeRay::Scanners::Clojure::IMAG10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#130 -CodeRay::Scanners::Clojure::IMAG16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#132 -CodeRay::Scanners::Clojure::IMAG2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#131 -CodeRay::Scanners::Clojure::IMAG8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#90 -CodeRay::Scanners::Clojure::KEYWORD_NEXT_TOKEN_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/clojure.rb#141 -CodeRay::Scanners::Clojure::NUM = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#137 -CodeRay::Scanners::Clojure::NUM10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#138 -CodeRay::Scanners::Clojure::NUM16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#140 -CodeRay::Scanners::Clojure::NUM2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#139 -CodeRay::Scanners::Clojure::NUM8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#78 -CodeRay::Scanners::Clojure::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/clojure.rb#112 -CodeRay::Scanners::Clojure::PREFIX10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#113 -CodeRay::Scanners::Clojure::PREFIX16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#115 -CodeRay::Scanners::Clojure::PREFIX2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#114 -CodeRay::Scanners::Clojure::PREFIX8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#106 -CodeRay::Scanners::Clojure::RADIX10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#103 -CodeRay::Scanners::Clojure::RADIX16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#105 -CodeRay::Scanners::Clojure::RADIX2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#104 -CodeRay::Scanners::Clojure::RADIX8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#125 -CodeRay::Scanners::Clojure::REAL10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#126 -CodeRay::Scanners::Clojure::REAL16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#128 -CodeRay::Scanners::Clojure::REAL2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#127 -CodeRay::Scanners::Clojure::REAL8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#108 -CodeRay::Scanners::Clojure::SIGN = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#11 -CodeRay::Scanners::Clojure::SPECIAL_FORMS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/clojure.rb#111 -CodeRay::Scanners::Clojure::SUFFIX = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#97 -CodeRay::Scanners::Clojure::SYMBOL = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#116 -CodeRay::Scanners::Clojure::UINT10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#117 -CodeRay::Scanners::Clojure::UINT16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#119 -CodeRay::Scanners::Clojure::UINT2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#118 -CodeRay::Scanners::Clojure::UINT8 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#121 -CodeRay::Scanners::Clojure::UREAL10 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#122 -CodeRay::Scanners::Clojure::UREAL16 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#124 -CodeRay::Scanners::Clojure::UREAL2 = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/clojure.rb#123 -CodeRay::Scanners::Clojure::UREAL8 = T.let(T.unsafe(nil), Regexp) - -# = Debug Scanner -# -# Interprets the output of the Encoders::Debug encoder (basically the inverse function). -# -# source://coderay//lib/coderay/scanners/debug.rb#9 -class CodeRay::Scanners::Debug < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/debug.rb#21 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/debug.rb#16 - def setup; end -end - -# Scanner for the Delphi language (Object Pascal). -# -# Alias: +pascal+ -# -# source://coderay//lib/coderay/scanners/delphi.rb#7 -class CodeRay::Scanners::Delphi < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/delphi.rb#45 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/delphi.rb#25 -CodeRay::Scanners::Delphi::DIRECTIVES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/delphi.rb#36 -CodeRay::Scanners::Delphi::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) - -# source://coderay//lib/coderay/scanners/delphi.rb#12 -CodeRay::Scanners::Delphi::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/delphi.rb#40 -CodeRay::Scanners::Delphi::NAME_FOLLOWS = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) - -# Scanner for output of the diff command. -# -# Alias: +patch+ -# -# source://coderay//lib/coderay/scanners/diff.rb#7 -class CodeRay::Scanners::Diff < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/diff.rb#19 - def scan_tokens(encoder, options); end - - private - - # source://coderay//lib/coderay/scanners/diff.rb#204 - def diff(a, b); end -end - -# source://coderay//lib/coderay/scanners/diff.rb#12 -CodeRay::Scanners::Diff::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# Scanner for HTML ERB templates. -# -# source://coderay//lib/coderay/scanners/erb.rb#8 -class CodeRay::Scanners::ERB < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/erb.rb#38 - def reset_instance; end - - # source://coderay//lib/coderay/scanners/erb.rb#43 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/erb.rb#33 - def setup; end -end - -# source://coderay//lib/coderay/scanners/erb.rb#15 -CodeRay::Scanners::ERB::ERB_RUBY_BLOCK = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/erb.rb#13 -CodeRay::Scanners::ERB::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/erb.rb#27 -CodeRay::Scanners::ERB::START_OF_ERB = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/go.rb#4 -class CodeRay::Scanners::Go < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/go.rb#50 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/go.rb#45 -CodeRay::Scanners::Go::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/go.rb#39 -CodeRay::Scanners::Go::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# http://golang.org/ref/spec#Keywords -# -# source://coderay//lib/coderay/scanners/go.rb#10 -CodeRay::Scanners::Go::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/go.rb#29 -CodeRay::Scanners::Go::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/go.rb#34 -CodeRay::Scanners::Go::PREDEFINED_FUNCTIONS = T.let(T.unsafe(nil), Array) - -# http://golang.org/ref/spec#Types -# -# source://coderay//lib/coderay/scanners/go.rb#19 -CodeRay::Scanners::Go::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/go.rb#46 -CodeRay::Scanners::Go::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# Scanner for Groovy. -# -# source://coderay//lib/coderay/scanners/groovy.rb#7 -class CodeRay::Scanners::Groovy < ::CodeRay::Scanners::Java - protected - - # source://coderay//lib/coderay/scanners/groovy.rb#43 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/groovy.rb#39 - def setup; end -end - -# source://coderay//lib/coderay/scanners/groovy.rb#24 -CodeRay::Scanners::Groovy::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# TODO: check list of keywords -# -# source://coderay//lib/coderay/scanners/groovy.rb#12 -CodeRay::Scanners::Groovy::GROOVY_KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/groovy.rb#18 -CodeRay::Scanners::Groovy::GROOVY_MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/groovy.rb#20 -CodeRay::Scanners::Groovy::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/groovy.rb#15 -CodeRay::Scanners::Groovy::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/groovy.rb#26 -CodeRay::Scanners::Groovy::REGEXP_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# TODO: interpretation inside ', ", / -# -# source://coderay//lib/coderay/scanners/groovy.rb#29 -CodeRay::Scanners::Groovy::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/groovy.rb#25 -CodeRay::Scanners::Groovy::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/haml.rb#8 -class CodeRay::Scanners::HAML < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/haml.rb#24 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/haml.rb#17 - def setup; end -end - -# source://coderay//lib/coderay/scanners/haml.rb#13 -CodeRay::Scanners::HAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# HTML Scanner -# -# Alias: +xhtml+ -# -# See also: Scanners::XML -# -# source://coderay//lib/coderay/scanners/html.rb#9 -class CodeRay::Scanners::HTML < ::CodeRay::Scanners::Scanner - # source://coderay//lib/coderay/scanners/html.rb#62 - def reset; end - - protected - - # source://coderay//lib/coderay/scanners/html.rb#83 - def scan_css(encoder, code, state = T.unsafe(nil)); end - - # source://coderay//lib/coderay/scanners/html.rb#76 - def scan_java_script(encoder, code); end - - # source://coderay//lib/coderay/scanners/html.rb#90 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/html.rb#70 - def setup; end -end - -# source://coderay//lib/coderay/scanners/html.rb#39 -CodeRay::Scanners::HTML::ATTR_NAME = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/html.rb#42 -CodeRay::Scanners::HTML::ENTITY = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/html.rb#20 -CodeRay::Scanners::HTML::EVENT_ATTRIBUTES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/html.rb#41 -CodeRay::Scanners::HTML::HEX = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/html.rb#35 -CodeRay::Scanners::HTML::IN_ATTRIBUTE = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) - -# source://coderay//lib/coderay/scanners/html.rb#13 -CodeRay::Scanners::HTML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/html.rb#57 -CodeRay::Scanners::HTML::PLAIN_STRING_CONTENT = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/html.rb#40 -CodeRay::Scanners::HTML::TAG_END = T.let(T.unsafe(nil), Regexp) - -# Scanner for JSON (JavaScript Object Notation). -# -# source://coderay//lib/coderay/scanners/json.rb#5 -class CodeRay::Scanners::JSON < ::CodeRay::Scanners::Scanner - protected - - # See http://json.org/ for a definition of the JSON lexic/grammar. - # - # source://coderay//lib/coderay/scanners/json.rb#26 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/json.rb#21 - def setup; end -end - -# source://coderay//lib/coderay/scanners/json.rb#15 -CodeRay::Scanners::JSON::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/json.rb#17 -CodeRay::Scanners::JSON::KEY = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/json.rb#10 -CodeRay::Scanners::JSON::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/json.rb#16 -CodeRay::Scanners::JSON::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# Scanner for Java. -# -# source://coderay//lib/coderay/scanners/java.rb#5 -class CodeRay::Scanners::Java < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/java.rb#51 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/java/builtin_types.rb#4 -module CodeRay::Scanners::Java::BuiltinTypes; end - -# source://coderay//lib/coderay/scanners/java/builtin_types.rb#7 -CodeRay::Scanners::Java::BuiltinTypes::List = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java.rb#19 -CodeRay::Scanners::Java::CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java.rb#25 -CodeRay::Scanners::Java::DIRECTIVES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java.rb#40 -CodeRay::Scanners::Java::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/java.rb#47 -CodeRay::Scanners::Java::IDENT = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/java.rb#30 -CodeRay::Scanners::Java::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html -# -# source://coderay//lib/coderay/scanners/java.rb#12 -CodeRay::Scanners::Java::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java.rb#20 -CodeRay::Scanners::Java::MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java.rb#18 -CodeRay::Scanners::Java::RESERVED = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java.rb#42 -CodeRay::Scanners::Java::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/java.rb#21 -CodeRay::Scanners::Java::TYPES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java.rb#41 -CodeRay::Scanners::Java::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# Scanner for JavaScript. -# -# Aliases: +ecmascript+, +ecma_script+, +javascript+ -# -# source://coderay//lib/coderay/scanners/java_script.rb#7 -class CodeRay::Scanners::JavaScript < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/java_script.rb#224 - def reset_instance; end - - # source://coderay//lib/coderay/scanners/java_script.rb#61 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/java_script.rb#57 - def setup; end - - # source://coderay//lib/coderay/scanners/java_script.rb#229 - def xml_scanner; end -end - -# source://coderay//lib/coderay/scanners/java_script.rb#42 -CodeRay::Scanners::JavaScript::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/java_script.rb#36 -CodeRay::Scanners::JavaScript::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# The actual JavaScript keywords. -# -# source://coderay//lib/coderay/scanners/java_script.rb#13 -CodeRay::Scanners::JavaScript::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java_script.rb#24 -CodeRay::Scanners::JavaScript::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/java_script.rb#50 -CodeRay::Scanners::JavaScript::KEY_CHECK_PATTERN = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/java_script.rb#22 -CodeRay::Scanners::JavaScript::MAGIC_VARIABLES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java_script.rb#18 -CodeRay::Scanners::JavaScript::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java_script.rb#44 -CodeRay::Scanners::JavaScript::REGEXP_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# Reserved for future use. -# -# source://coderay//lib/coderay/scanners/java_script.rb#29 -CodeRay::Scanners::JavaScript::RESERVED_WORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/java_script.rb#45 -CodeRay::Scanners::JavaScript::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/java_script.rb#43 -CodeRay::Scanners::JavaScript::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# Scanner for the Lua[http://lua.org] programming lanuage. -# -# The language’s complete syntax is defined in -# {the Lua manual}[http://www.lua.org/manual/5.2/manual.html], -# which is what this scanner tries to conform to. -# -# source://coderay//lib/coderay/scanners/lua.rb#11 -class CodeRay::Scanners::Lua < ::CodeRay::Scanners::Scanner - protected - - # CodeRay entry hook. Starts parsing. - # - # source://coderay//lib/coderay/scanners/lua.rb#60 - def scan_tokens(encoder, options); end - - # Scanner initialization. - # - # source://coderay//lib/coderay/scanners/lua.rb#54 - def setup; end -end - -# Automatic token kind selection for normal words. -# -# source://coderay//lib/coderay/scanners/lua.rb#46 -CodeRay::Scanners::Lua::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# Keywords used in Lua. -# -# source://coderay//lib/coderay/scanners/lua.rb#18 -CodeRay::Scanners::Lua::KEYWORDS = T.let(T.unsafe(nil), Array) - -# Constants set by the Lua core. -# -# source://coderay//lib/coderay/scanners/lua.rb#25 -CodeRay::Scanners::Lua::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# The expressions contained in this array are parts of Lua’s `basic' -# library. Although it’s not entirely necessary to load that library, -# it is highly recommended and one would have to provide own implementations -# of some of these expressions if one does not do so. They however aren’t -# keywords, neither are they constants, but nearly predefined, so they -# get tagged as `predefined' rather than anything else. -# -# This list excludes values of form `_UPPERCASE' because the Lua manual -# requires such identifiers to be reserved by Lua anyway and they are -# highlighted directly accordingly, without the need for specific -# identifiers to be listed here. -# -# source://coderay//lib/coderay/scanners/lua.rb#38 -CodeRay::Scanners::Lua::PREDEFINED_EXPRESSIONS = T.let(T.unsafe(nil), Array) - -# Scanner for PHP. -# -# Original by Stefan Walk. -# -# source://coderay//lib/coderay/scanners/php.rb#10 -class CodeRay::Scanners::PHP < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/php.rb#23 - def reset_instance; end - - # source://coderay//lib/coderay/scanners/php.rb#234 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/php.rb#19 - def setup; end -end - -# source://coderay//lib/coderay/scanners/php.rb#15 -CodeRay::Scanners::PHP::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#197 -module CodeRay::Scanners::PHP::RE; end - -# source://coderay//lib/coderay/scanners/php.rb#211 -CodeRay::Scanners::PHP::RE::HTML_INDICATOR = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/php.rb#213 -CodeRay::Scanners::PHP::RE::IDENTIFIER = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/php.rb#216 -CodeRay::Scanners::PHP::RE::OPERATOR = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/php.rb#206 -CodeRay::Scanners::PHP::RE::PHP_END = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/php.rb#199 -CodeRay::Scanners::PHP::RE::PHP_START = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/php.rb#214 -CodeRay::Scanners::PHP::RE::VARIABLE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/php.rb#28 -module CodeRay::Scanners::PHP::Words; end - -# according to http://php.net/quickref.php on 2009-04-21; -# all functions with _ excluded (module functions) and selected additional functions -# -# source://coderay//lib/coderay/scanners/php.rb#50 -CodeRay::Scanners::PHP::Words::BUILTIN_FUNCTIONS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#46 -CodeRay::Scanners::PHP::Words::CLASSES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#145 -CodeRay::Scanners::PHP::Words::CONSTANTS = T.let(T.unsafe(nil), Array) - -# TODO: more built-in PHP functions? -# -# source://coderay//lib/coderay/scanners/php.rb#140 -CodeRay::Scanners::PHP::Words::EXCEPTIONS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#184 -CodeRay::Scanners::PHP::Words::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) - -# according to http://www.php.net/manual/en/reserved.keywords.php -# -# source://coderay//lib/coderay/scanners/php.rb#31 -CodeRay::Scanners::PHP::Words::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#41 -CodeRay::Scanners::PHP::Words::LANGUAGE_CONSTRUCTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#178 -CodeRay::Scanners::PHP::Words::PREDEFINED = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#39 -CodeRay::Scanners::PHP::Words::TYPES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/php.rb#193 -CodeRay::Scanners::PHP::Words::VARIABLE_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# Scanner for Python. Supports Python 3. -# -# Based on pygments' PythonLexer, see -# http://dev.pocoo.org/projects/pygments/browser/pygments/lexers/agile.py. -# -# source://coderay//lib/coderay/scanners/python.rb#8 -class CodeRay::Scanners::Python < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/python.rb#103 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/python.rb#86 -CodeRay::Scanners::Python::DEF_NEW_STATE = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/python.rb#91 -CodeRay::Scanners::Python::DESCRIPTOR = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/python.rb#97 -CodeRay::Scanners::Python::DOCSTRING_COMING = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/python.rb#65 -CodeRay::Scanners::Python::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/python.rb#57 -CodeRay::Scanners::Python::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/python.rb#13 -CodeRay::Scanners::Python::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/python.rb#64 -CodeRay::Scanners::Python::NAME = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/python.rb#21 -CodeRay::Scanners::Python::OLD_KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/python.rb#68 -CodeRay::Scanners::Python::OPERATOR = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/python.rb#37 -CodeRay::Scanners::Python::PREDEFINED_EXCEPTIONS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/python.rb#25 -CodeRay::Scanners::Python::PREDEFINED_METHODS_AND_TYPES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/python.rb#52 -CodeRay::Scanners::Python::PREDEFINED_VARIABLES_AND_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/python.rb#82 -CodeRay::Scanners::Python::STRING_CONTENT_REGEXP = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/python.rb#78 -CodeRay::Scanners::Python::STRING_DELIMITER_REGEXP = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/python.rb#66 -CodeRay::Scanners::Python::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# = Raydebug Scanner -# -# Highlights the output of the Encoders::Debug encoder. -# -# source://coderay//lib/coderay/scanners/raydebug.rb#9 -class CodeRay::Scanners::Raydebug < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/raydebug.rb#22 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/raydebug.rb#17 - def setup; end -end - -# This scanner is really complex, since Ruby _is_ a complex language! -# -# It tries to highlight 100% of all common code, -# and 90% of strange codes. -# -# It is optimized for HTML highlighting, and is not very useful for -# parsing or pretty printing. -# -# source://coderay//lib/coderay/scanners/ruby.rb#11 -class CodeRay::Scanners::Ruby < ::CodeRay::Scanners::Scanner - # source://coderay//lib/coderay/scanners/ruby.rb#19 - def interpreted_string_state; end - - protected - - # source://coderay//lib/coderay/scanners/ruby.rb#29 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/ruby.rb#25 - def setup; end -end - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#5 -module CodeRay::Scanners::Ruby::Patterns; end - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#72 -CodeRay::Scanners::Ruby::Patterns::BINARY = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#106 -CodeRay::Scanners::Ruby::Patterns::CHARACTER = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#55 -CodeRay::Scanners::Ruby::Patterns::CLASS_VARIABLE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#96 -CodeRay::Scanners::Ruby::Patterns::CONTROL_META_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#132 -CodeRay::Scanners::Ruby::Patterns::DATA = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#69 -CodeRay::Scanners::Ruby::Patterns::DECIMAL = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#102 -CodeRay::Scanners::Ruby::Patterns::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#74 -CodeRay::Scanners::Ruby::Patterns::EXPONENT = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#168 -CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_INTERPRETED = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#161 -CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_KIND = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#160 -CodeRay::Scanners::Ruby::Patterns::FANCY_STRING_START = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#76 -CodeRay::Scanners::Ruby::Patterns::FLOAT_OR_INT = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#75 -CodeRay::Scanners::Ruby::Patterns::FLOAT_SUFFIX = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#57 -CodeRay::Scanners::Ruby::Patterns::GLOBAL_VARIABLE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#116 -CodeRay::Scanners::Ruby::Patterns::HEREDOC_OPEN = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#71 -CodeRay::Scanners::Ruby::Patterns::HEXADECIMAL = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#38 -CodeRay::Scanners::Ruby::Patterns::IDENT = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#28 -CodeRay::Scanners::Ruby::Patterns::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#54 -CodeRay::Scanners::Ruby::Patterns::INSTANCE_VARIABLE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#7 -CodeRay::Scanners::Ruby::Patterns::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#151 -CodeRay::Scanners::Ruby::Patterns::KEYWORDS_EXPECTING_VALUE = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#32 -CodeRay::Scanners::Ruby::Patterns::KEYWORD_NEW_STATE = T.let(T.unsafe(nil), CodeRay::WordList) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#53 -CodeRay::Scanners::Ruby::Patterns::METHOD_AFTER_DOT = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#40 -CodeRay::Scanners::Ruby::Patterns::METHOD_NAME = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#52 -CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_EX = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#41 -CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_OPERATOR = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#87 -CodeRay::Scanners::Ruby::Patterns::METHOD_NAME_OR_SYMBOL = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#51 -CodeRay::Scanners::Ruby::Patterns::METHOD_SUFFIX = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#77 -CodeRay::Scanners::Ruby::Patterns::NUMERIC = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#56 -CodeRay::Scanners::Ruby::Patterns::OBJECT_VARIABLE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#70 -CodeRay::Scanners::Ruby::Patterns::OCTAL = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#17 -CodeRay::Scanners::Ruby::Patterns::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#58 -CodeRay::Scanners::Ruby::Patterns::PREFIX_VARIABLE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#61 -CodeRay::Scanners::Ruby::Patterns::QUOTE_TO_TYPE = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#67 -CodeRay::Scanners::Ruby::Patterns::REGEXP_MODIFIERS = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#126 -CodeRay::Scanners::Ruby::Patterns::RUBYDOC = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#138 -CodeRay::Scanners::Ruby::Patterns::RUBYDOC_OR_DATA = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#89 -CodeRay::Scanners::Ruby::Patterns::SIMPLE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#79 -CodeRay::Scanners::Ruby::Patterns::SYMBOL = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#142 -CodeRay::Scanners::Ruby::Patterns::VALUE_FOLLOWS = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/patterns.rb#59 -CodeRay::Scanners::Ruby::Patterns::VARIABLE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/ruby/string_state.rb#8 -class CodeRay::Scanners::Ruby::StringState < ::Struct - # @return [StringState] a new instance of StringState - # - # source://coderay//lib/coderay/scanners/ruby/string_state.rb#48 - def initialize(kind, interpreted, delim, heredoc = T.unsafe(nil)); end - - # source://coderay//lib/coderay/scanners/ruby/string_state.rb#63 - def heredoc_pattern(delim, interpreted, indented); end - - class << self - # source://coderay//lib/coderay/scanners/ruby/string_state.rb#40 - def simple_key_pattern(delim); end - end -end - -# source://coderay//lib/coderay/scanners/ruby/string_state.rb#10 -CodeRay::Scanners::Ruby::StringState::CLOSING_PAREN = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/ruby/string_state.rb#17 -CodeRay::Scanners::Ruby::StringState::STRING_PATTERN = T.let(T.unsafe(nil), Hash) - -# by Josh Goebel -# -# source://coderay//lib/coderay/scanners/sql.rb#5 -class CodeRay::Scanners::SQL < ::CodeRay::Scanners::Scanner - # source://coderay//lib/coderay/scanners/sql.rb#66 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/sql.rb#23 -CodeRay::Scanners::SQL::COMMANDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/sql.rb#38 -CodeRay::Scanners::SQL::DIRECTIVES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/sql.rb#55 -CodeRay::Scanners::SQL::ESCAPE = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/sql.rb#46 -CodeRay::Scanners::SQL::IDENT_KIND = T.let(T.unsafe(nil), CodeRay::WordList::CaseIgnoring) - -# source://coderay//lib/coderay/scanners/sql.rb#9 -CodeRay::Scanners::SQL::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/sql.rb#18 -CodeRay::Scanners::SQL::OBJECTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/sql.rb#44 -CodeRay::Scanners::SQL::PREDEFINED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/sql.rb#36 -CodeRay::Scanners::SQL::PREDEFINED_FUNCTIONS = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/sql.rb#28 -CodeRay::Scanners::SQL::PREDEFINED_TYPES = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/scanners/sql.rb#60 -CodeRay::Scanners::SQL::STRING_CONTENT_PATTERN = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/sql.rb#58 -CodeRay::Scanners::SQL::STRING_PREFIXES = T.let(T.unsafe(nil), Regexp) - -# source://coderay//lib/coderay/scanners/sql.rb#56 -CodeRay::Scanners::SQL::UNICODE_ESCAPE = T.let(T.unsafe(nil), Regexp) - -# A scanner for Sass. -# -# source://coderay//lib/coderay/scanners/sass.rb#5 -class CodeRay::Scanners::Sass < ::CodeRay::Scanners::CSS - protected - - # source://coderay//lib/coderay/scanners/sass.rb#16 - def scan_tokens(encoder, options); end - - # source://coderay//lib/coderay/scanners/sass.rb#12 - def setup; end -end - -# = Scanner -# -# The base class for all Scanners. -# -# It is a subclass of Ruby's great +StringScanner+, which -# makes it easy to access the scanning methods inside. -# -# It is also +Enumerable+, so you can use it like an Array of -# Tokens: -# -# require 'coderay' -# -# c_scanner = CodeRay::Scanners[:c].new "if (*p == '{') nest++;" -# -# for text, kind in c_scanner -# puts text if kind == :operator -# end -# -# # prints: (*==)++; -# -# OK, this is a very simple example :) -# You can also use +map+, +any?+, +find+ and even +sort_by+, -# if you want. -# -# source://coderay//lib/coderay/scanners/scanner.rb#29 -class CodeRay::Scanners::Scanner < ::StringScanner - include ::Enumerable - extend ::CodeRay::Plugin - - # Create a new Scanner. - # - # * +code+ is the input String and is handled by the superclass - # StringScanner. - # * +options+ is a Hash with Symbols as keys. - # It is merged with the default options of the class (you can - # overwrite default options here.) - # - # Else, a Tokens object is used. - # - # @return [Scanner] a new instance of Scanner - # - # source://coderay//lib/coderay/scanners/scanner.rb#125 - def initialize(code = T.unsafe(nil), options = T.unsafe(nil)); end - - # The string in binary encoding. - # - # To be used with #pos, which is the index of the byte the scanner - # will scan next. - # - # source://coderay//lib/coderay/scanners/scanner.rb#218 - def binary_string; end - - # The current column position of the scanner, starting with 1. - # See also: #line. - # - # source://coderay//lib/coderay/scanners/scanner.rb#209 - def column(pos = T.unsafe(nil)); end - - # Traverse the tokens. - # - # source://coderay//lib/coderay/scanners/scanner.rb#192 - def each(&block); end - - # the default file extension for this scanner - # - # source://coderay//lib/coderay/scanners/scanner.rb#160 - def file_extension; end - - # the Plugin ID for this scanner - # - # source://coderay//lib/coderay/scanners/scanner.rb#155 - def lang; end - - # The current line position of the scanner, starting with 1. - # See also: #column. - # - # Beware, this is implemented inefficiently. It should be used - # for debugging only. - # - # source://coderay//lib/coderay/scanners/scanner.rb#202 - def line(pos = T.unsafe(nil)); end - - # Sets back the scanner. Subclasses should redefine the reset_instance - # method instead of this one. - # - # source://coderay//lib/coderay/scanners/scanner.rb#142 - def reset; end - - # Returns the value of attribute state. - # - # source://coderay//lib/coderay/scanners/scanner.rb#44 - def state; end - - # Sets the attribute state - # - # @param value the value to set the attribute state to. - # - # source://coderay//lib/coderay/scanners/scanner.rb#44 - def state=(_arg0); end - - # Set a new string to be scanned. - # - # source://coderay//lib/coderay/scanners/scanner.rb#148 - def string=(code); end - - # Scan the code and returns all tokens in a Tokens object. - # - # source://coderay//lib/coderay/scanners/scanner.rb#165 - def tokenize(source = T.unsafe(nil), options = T.unsafe(nil)); end - - # Cache the result of tokenize. - # - # source://coderay//lib/coderay/scanners/scanner.rb#187 - def tokens; end - - protected - - # Scanner error with additional status information - # - # @raise [ScanError] - # - # source://coderay//lib/coderay/scanners/scanner.rb#314 - def raise_inspect(message, tokens, state = T.unsafe(nil), ambit = T.unsafe(nil), backtrace = T.unsafe(nil)); end - - # source://coderay//lib/coderay/scanners/scanner.rb#289 - def raise_inspect_arguments(message, tokens, state, ambit); end - - # Resets the scanner. - # - # source://coderay//lib/coderay/scanners/scanner.rb#265 - def reset_instance; end - - # Shorthand for scan_until(/\z/). - # This method also avoids a JRuby 1.9 mode bug. - # - # source://coderay//lib/coderay/scanners/scanner.rb#328 - def scan_rest; end - - # This is the central method, and commonly the only one a - # subclass implements. - # - # Subclasses must implement this method; it must return +tokens+ - # and must only use Tokens#<< for storing scanned tokens! - # - # @raise [NotImplementedError] - # - # source://coderay//lib/coderay/scanners/scanner.rb#260 - def scan_tokens(tokens, options); end - - # source://coderay//lib/coderay/scanners/scanner.rb#305 - def scanner_state_info(state); end - - # source://coderay//lib/coderay/scanners/scanner.rb#239 - def set_string_from_source(source); end - - # source://coderay//lib/coderay/scanners/scanner.rb#250 - def set_tokens_from_options(options); end - - # Can be implemented by subclasses to do some initialization - # that has to be done once per instance. - # - # Use reset for initialization that has to be done once per - # scan. - # - # source://coderay//lib/coderay/scanners/scanner.rb#236 - def setup; end - - # source://coderay//lib/coderay/scanners/scanner.rb#322 - def tokens_last(tokens, n); end - - # source://coderay//lib/coderay/scanners/scanner.rb#318 - def tokens_size(tokens); end - - class << self - # The encoding used internally by this scanner. - # - # source://coderay//lib/coderay/scanners/scanner.rb#71 - def encoding(name = T.unsafe(nil)); end - - # The typical filename suffix for this scanner's language. - # - # source://coderay//lib/coderay/scanners/scanner.rb#66 - def file_extension(extension = T.unsafe(nil)); end - - # The lang of this Scanner class, which is equal to its Plugin ID. - # - # source://coderay//lib/coderay/scanners/scanner.rb#76 - def lang; end - - # Normalizes the given code into a string with UNIX newlines, in the - # scanner's internal encoding, with invalid and undefined charachters - # replaced by placeholders. Always returns a new object. - # - # source://coderay//lib/coderay/scanners/scanner.rb#51 - def normalize(code); end - - protected - - # source://coderay//lib/coderay/scanners/scanner.rb#82 - def encode_with_encoding(code, target_encoding); end - - # source://coderay//lib/coderay/scanners/scanner.rb#100 - def guess_encoding(s); end - - # source://coderay//lib/coderay/scanners/scanner.rb#96 - def to_unix(code); end - end -end - -# The default options for all scanner classes. -# -# Define @default_options for subclasses. -# -# source://coderay//lib/coderay/scanners/scanner.rb#40 -CodeRay::Scanners::Scanner::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/scanners/scanner.rb#42 -CodeRay::Scanners::Scanner::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# source://coderay//lib/coderay/helpers/plugin.rb#41 -CodeRay::Scanners::Scanner::PLUGIN_HOST = CodeRay::Scanners - -# source://coderay//lib/coderay/scanners/scanner.rb#299 -CodeRay::Scanners::Scanner::SCANNER_STATE_INFO = T.let(T.unsafe(nil), String) - -# source://coderay//lib/coderay/scanners/scanner.rb#271 -CodeRay::Scanners::Scanner::SCAN_ERROR_MESSAGE = T.let(T.unsafe(nil), String) - -# Raised if a Scanner fails while scanning -# -# source://coderay//lib/coderay/scanners/scanner.rb#35 -class CodeRay::Scanners::Scanner::ScanError < ::StandardError; end - -# source://coderay//lib/coderay/scanners/taskpaper.rb#4 -class CodeRay::Scanners::Taskpaper < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/taskpaper.rb#11 - def scan_tokens(encoder, options); end -end - -# Scanner for plain text. -# -# Yields just one token of the kind :plain. -# -# Alias: +plaintext+, +plain+ -# -# source://coderay//lib/coderay/scanners/text.rb#9 -class CodeRay::Scanners::Text < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/text.rb#18 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/text.rb#14 -CodeRay::Scanners::Text::KINDS_NOT_LOC = T.let(T.unsafe(nil), Array) - -# Scanner for XML. -# -# Currently this is the same scanner as Scanners::HTML. -# -# source://coderay//lib/coderay/scanners/xml.rb#9 -class CodeRay::Scanners::XML < ::CodeRay::Scanners::HTML; end - -# Scanner for YAML. -# -# Based on the YAML scanner from Syntax by Jamis Buck. -# -# source://coderay//lib/coderay/scanners/yaml.rb#7 -class CodeRay::Scanners::YAML < ::CodeRay::Scanners::Scanner - protected - - # source://coderay//lib/coderay/scanners/yaml.rb#16 - def scan_tokens(encoder, options); end -end - -# source://coderay//lib/coderay/scanners/yaml.rb#12 -CodeRay::Scanners::YAML::KINDS_NOT_LOC = T.let(T.unsafe(nil), Symbol) - -# This module holds the Style class and its subclasses. -# -# See Plugin. -# -# source://coderay//lib/coderay/styles.rb#6 -module CodeRay::Styles - extend ::CodeRay::PluginHost -end - -# A colorful theme using CSS 3 colors (with alpha channel). -# -# source://coderay//lib/coderay/styles/alpha.rb#5 -class CodeRay::Styles::Alpha < ::CodeRay::Styles::Style; end - -# source://coderay//lib/coderay/styles/alpha.rb#14 -CodeRay::Styles::Alpha::CSS_MAIN_STYLES = T.let(T.unsafe(nil), String) - -# source://coderay//lib/coderay/styles/alpha.rb#53 -CodeRay::Styles::Alpha::TOKEN_COLORS = T.let(T.unsafe(nil), String) - -# Base class for styles. -# -# Styles are used by Encoders::HTML to colorize tokens. -# -# source://coderay//lib/coderay/styles/style.rb#8 -class CodeRay::Styles::Style - extend ::CodeRay::Plugin -end - -# source://coderay//lib/coderay/styles/style.rb#12 -CodeRay::Styles::Style::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://coderay//lib/coderay/helpers/plugin.rb#41 -CodeRay::Styles::Style::PLUGIN_HOST = CodeRay::Styles - -# A Hash of all known token kinds and their associated CSS classes. -# -# source://coderay//lib/coderay/token_kinds.rb#4 -CodeRay::TokenKinds = T.let(T.unsafe(nil), Hash) - -# The Tokens class represents a list of tokens returned from -# a Scanner. It's actually just an Array with a few helper methods. -# -# A token itself is not a special object, just two elements in an Array: -# * the _token_ _text_ (the original source of the token in a String) or -# a _token_ _action_ (begin_group, end_group, begin_line, end_line) -# * the _token_ _kind_ (a Symbol representing the type of the token) -# -# It looks like this: -# -# ..., '# It looks like this', :comment, ... -# ..., '3.1415926', :float, ... -# ..., '$^', :error, ... -# -# Some scanners also yield sub-tokens, represented by special -# token actions, for example :begin_group and :end_group. -# -# The Ruby scanner, for example, splits "a string" into: -# -# [ -# :begin_group, :string, -# '"', :delimiter, -# 'a string', :content, -# '"', :delimiter, -# :end_group, :string -# ] -# -# Tokens can be used to save the output of a Scanners in a simple -# Ruby object that can be send to an Encoder later: -# -# tokens = CodeRay.scan('price = 2.59', :ruby).tokens -# tokens.encode(:html) -# tokens.html -# CodeRay.encoder(:html).encode_tokens(tokens) -# -# Tokens gives you the power to handle pre-scanned code very easily: -# You can serialize it to a JSON string and store it in a database, pass it -# around to encode it more than once, send it to other algorithms... -# -# source://coderay//lib/coderay/tokens.rb#41 -class CodeRay::Tokens < ::Array - # source://coderay//lib/coderay/tokens.rb#156 - def begin_group(kind); end - - # source://coderay//lib/coderay/tokens.rb#158 - def begin_line(kind); end - - # Return the actual number of tokens. - # - # source://coderay//lib/coderay/tokens.rb#151 - def count; end - - # Encode the tokens using encoder. - # - # encoder can be - # * a plugin name like :html oder 'statistic' - # * an Encoder object - # - # options are passed to the encoder. - # - # source://coderay//lib/coderay/tokens.rb#56 - def encode(encoder, options = T.unsafe(nil)); end - - # source://coderay//lib/coderay/tokens.rb#157 - def end_group(kind); end - - # source://coderay//lib/coderay/tokens.rb#159 - def end_line(kind); end - - # Redirects unknown methods to encoder calls. - # - # For example, if you call +tokens.html+, the HTML encoder - # is used to highlight the tokens. - # - # source://coderay//lib/coderay/tokens.rb#70 - def method_missing(meth, options = T.unsafe(nil)); end - - # The Scanner instance that created the tokens. - # - # source://coderay//lib/coderay/tokens.rb#47 - def scanner; end - - # The Scanner instance that created the tokens. - # - # source://coderay//lib/coderay/tokens.rb#47 - def scanner=(_arg0); end - - # Split the tokens into parts of the given +sizes+. - # - # The result will be an Array of Tokens objects. The parts have - # the text size specified by the parameter. In addition, each - # part closes all opened tokens. This is useful to insert tokens - # betweem them. - # - # This method is used by @Scanner#tokenize@ when called with an Array - # of source strings. The Diff encoder uses it for inline highlighting. - # - # source://coderay//lib/coderay/tokens.rb#85 - def split_into_parts(*sizes); end - - def text_token(*_arg0); end - - # Turn tokens into a string by concatenating them. - # - # source://coderay//lib/coderay/tokens.rb#62 - def to_s; end - - def tokens(*_arg0); end -end - -# The result of a scan operation is a TokensProxy, but should act like Tokens. -# -# This proxy makes it possible to use the classic CodeRay.scan.encode API -# while still providing the benefits of direct streaming. -# -# source://coderay//lib/coderay/tokens_proxy.rb#7 -class CodeRay::TokensProxy - # Create a new TokensProxy with the arguments of CodeRay.scan. - # - # @return [TokensProxy] a new instance of TokensProxy - # - # source://coderay//lib/coderay/tokens_proxy.rb#12 - def initialize(input, lang, options = T.unsafe(nil), block = T.unsafe(nil)); end - - # Returns the value of attribute block. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def block; end - - # Sets the attribute block - # - # @param value the value to set the attribute block to. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def block=(_arg0); end - - # Overwrite Struct#each. - # - # source://coderay//lib/coderay/tokens_proxy.rb#48 - def each(*args, &blk); end - - # Call CodeRay.encode if +encoder+ is a Symbol; - # otherwise, convert the receiver to tokens and call encoder.encode_tokens. - # - # source://coderay//lib/coderay/tokens_proxy.rb#21 - def encode(encoder, options = T.unsafe(nil)); end - - # Returns the value of attribute input. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def input; end - - # Sets the attribute input - # - # @param value the value to set the attribute input to. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def input=(_arg0); end - - # Returns the value of attribute lang. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def lang; end - - # Sets the attribute lang - # - # @param value the value to set the attribute lang to. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def lang=(_arg0); end - - # Tries to call encode; - # delegates to tokens otherwise. - # - # source://coderay//lib/coderay/tokens_proxy.rb#31 - def method_missing(method, *args, &blk); end - - # Returns the value of attribute options. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def options; end - - # Sets the attribute options - # - # @param value the value to set the attribute options to. - # - # source://coderay//lib/coderay/tokens_proxy.rb#9 - def options=(_arg0); end - - # A (cached) scanner instance to use for the scan task. - # - # source://coderay//lib/coderay/tokens_proxy.rb#43 - def scanner; end - - # The (cached) result of the tokenized input; a Tokens instance. - # - # source://coderay//lib/coderay/tokens_proxy.rb#38 - def tokens; end -end - -# source://coderay//lib/coderay/version.rb#2 -CodeRay::VERSION = T.let(T.unsafe(nil), String) - -# = WordList -# -# A Hash subclass designed for mapping word lists to token types. -# -# A WordList is a Hash with some additional features. -# It is intended to be used for keyword recognition. -# -# WordList is optimized to be used in Scanners, -# typically to decide whether a given ident is a special token. -# -# For case insensitive words use WordList::CaseIgnoring. -# -# Example: -# -# # define word arrays -# RESERVED_WORDS = %w[ -# asm break case continue default do else -# ] -# -# PREDEFINED_TYPES = %w[ -# int long short char void -# ] -# -# # make a WordList -# IDENT_KIND = WordList.new(:ident). -# add(RESERVED_WORDS, :reserved). -# add(PREDEFINED_TYPES, :predefined_type) -# -# ... -# -# def scan_tokens tokens, options -# ... -# -# elsif scan(/[A-Za-z_][A-Za-z_0-9]*/) -# # use it -# kind = IDENT_KIND[match] -# ... -# -# source://coderay//lib/coderay/helpers/word_list.rb#40 -class CodeRay::WordList < ::Hash - # Create a new WordList with +default+ as default value. - # - # @return [WordList] a new instance of WordList - # - # source://coderay//lib/coderay/helpers/word_list.rb#43 - def initialize(default = T.unsafe(nil)); end - - # Add words to the list and associate them with +value+. - # - # Returns +self+, so you can concat add calls. - # - # source://coderay//lib/coderay/helpers/word_list.rb#50 - def add(words, value = T.unsafe(nil)); end -end - -# A CaseIgnoring WordList is like a WordList, only that -# keys are compared case-insensitively (normalizing keys using +downcase+). -# -# source://coderay//lib/coderay/helpers/word_list.rb#60 -class CodeRay::WordList::CaseIgnoring < ::CodeRay::WordList - # source://coderay//lib/coderay/helpers/word_list.rb#62 - def [](key); end - - # source://coderay//lib/coderay/helpers/word_list.rb#66 - def []=(key, value); end -end diff --git a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi b/sorbet/rbi/gems/diff-lcs@1.5.0.rbi deleted file mode 100644 index 4e1f7915..00000000 --- a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +++ /dev/null @@ -1,1083 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `diff-lcs` gem. -# Please instead update this file by running `bin/tapioca gem diff-lcs`. - -# source://diff-lcs//lib/diff/lcs.rb#3 -module Diff; end - -# source://diff-lcs//lib/diff/lcs.rb#51 -module Diff::LCS - # Returns the difference set between +self+ and +other+. See Diff::LCS#diff. - # - # source://diff-lcs//lib/diff/lcs.rb#75 - def diff(other, callbacks = T.unsafe(nil), &block); end - - # Returns an Array containing the longest common subsequence(s) between - # +self+ and +other+. See Diff::LCS#lcs. - # - # lcs = seq1.lcs(seq2) - # - # A note when using objects: Diff::LCS only works properly when each object - # can be used as a key in a Hash, which typically means that the objects must - # implement Object#eql? in a way that two identical values compare - # identically for key purposes. That is: - # - # O.new('a').eql?(O.new('a')) == true - # - # source://diff-lcs//lib/diff/lcs.rb#70 - def lcs(other, &block); end - - # Attempts to patch +self+ with the provided +patchset+. A new sequence based - # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts - # to autodiscover the direction of the patch. - # - # source://diff-lcs//lib/diff/lcs.rb#101 - def patch(patchset); end - - # Attempts to patch +self+ with the provided +patchset+. A new sequence based - # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Does no - # patch direction autodiscovery. - # - # source://diff-lcs//lib/diff/lcs.rb#109 - def patch!(patchset); end - - # Attempts to patch +self+ with the provided +patchset+, using #patch!. If - # the sequence this is used on supports #replace, the value of +self+ will be - # replaced. See Diff::LCS#patch. Does no patch direction autodiscovery. - # - # source://diff-lcs//lib/diff/lcs.rb#123 - def patch_me(patchset); end - - # Returns the balanced ("side-by-side") difference set between +self+ and - # +other+. See Diff::LCS#sdiff. - # - # source://diff-lcs//lib/diff/lcs.rb#81 - def sdiff(other, callbacks = T.unsafe(nil), &block); end - - # Traverses the discovered longest common subsequences between +self+ and - # +other+ using the alternate, balanced algorithm. See - # Diff::LCS#traverse_balanced. - # - # source://diff-lcs//lib/diff/lcs.rb#94 - def traverse_balanced(other, callbacks = T.unsafe(nil), &block); end - - # Traverses the discovered longest common subsequences between +self+ and - # +other+. See Diff::LCS#traverse_sequences. - # - # source://diff-lcs//lib/diff/lcs.rb#87 - def traverse_sequences(other, callbacks = T.unsafe(nil), &block); end - - # Attempts to patch +self+ with the provided +patchset+. A new sequence based - # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts - # to autodiscover the direction of the patch. - # - # source://diff-lcs//lib/diff/lcs.rb#101 - def unpatch(patchset); end - - # Attempts to unpatch +self+ with the provided +patchset+. A new sequence - # based on +self+ and the +patchset+ will be created. See Diff::LCS#unpatch. - # Does no patch direction autodiscovery. - # - # source://diff-lcs//lib/diff/lcs.rb#116 - def unpatch!(patchset); end - - # Attempts to unpatch +self+ with the provided +patchset+, using #unpatch!. - # If the sequence this is used on supports #replace, the value of +self+ will - # be replaced. See Diff::LCS#unpatch. Does no patch direction autodiscovery. - # - # source://diff-lcs//lib/diff/lcs.rb#134 - def unpatch_me(patchset); end - - class << self - # :yields seq1[i] for each matched: - # - # source://diff-lcs//lib/diff/lcs.rb#144 - def LCS(seq1, seq2, &block); end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#52 - def callbacks_for(callbacks); end - - # #diff computes the smallest set of additions and deletions necessary to - # turn the first sequence into the second, and returns a description of these - # changes. - # - # See Diff::LCS::DiffCallbacks for the default behaviour. An alternate - # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a - # Class argument is provided for +callbacks+, #diff will attempt to - # initialise it. If the +callbacks+ object (possibly initialised) responds to - # #finish, it will be called. - # - # source://diff-lcs//lib/diff/lcs.rb#168 - def diff(seq1, seq2, callbacks = T.unsafe(nil), &block); end - - # :yields seq1[i] for each matched: - # - # source://diff-lcs//lib/diff/lcs.rb#144 - def lcs(seq1, seq2, &block); end - - # Applies a +patchset+ to the sequence +src+ according to the +direction+ - # (:patch or :unpatch), producing a new sequence. - # - # If the +direction+ is not specified, Diff::LCS::patch will attempt to - # discover the direction of the +patchset+. - # - # A +patchset+ can be considered to apply forward (:patch) if the - # following expression is true: - # - # patch(s1, diff(s1, s2)) -> s2 - # - # A +patchset+ can be considered to apply backward (:unpatch) if the - # following expression is true: - # - # patch(s2, diff(s1, s2)) -> s1 - # - # If the +patchset+ contains no changes, the +src+ value will be returned as - # either src.dup or +src+. A +patchset+ can be deemed as having no - # changes if the following predicate returns true: - # - # patchset.empty? or - # patchset.flatten(1).all? { |change| change.unchanged? } - # - # === Patchsets - # - # A +patchset+ is always an enumerable sequence of changes, hunks of changes, - # or a mix of the two. A hunk of changes is an enumerable sequence of - # changes: - # - # [ # patchset - # # change - # [ # hunk - # # change - # ] - # ] - # - # The +patch+ method accepts patchsets that are enumerable sequences - # containing either Diff::LCS::Change objects (or a subclass) or the array - # representations of those objects. Prior to application, array - # representations of Diff::LCS::Change objects will be reified. - # - # source://diff-lcs//lib/diff/lcs.rb#624 - def patch(src, patchset, direction = T.unsafe(nil)); end - - # Given a set of patchset, convert the current version to the next version. - # Does no auto-discovery. - # - # source://diff-lcs//lib/diff/lcs.rb#734 - def patch!(src, patchset); end - - # #sdiff computes all necessary components to show two sequences and their - # minimized differences side by side, just like the Unix utility - # sdiff does: - # - # old < - - # same same - # before | after - # - > new - # - # See Diff::LCS::SDiffCallbacks for the default behaviour. An alternate - # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a - # Class argument is provided for +callbacks+, #diff will attempt to - # initialise it. If the +callbacks+ object (possibly initialised) responds to - # #finish, it will be called. - # - # Each element of a returned array is a Diff::LCS::ContextChange object, - # which can be implicitly converted to an array. - # - # Diff::LCS.sdiff(a, b).each do |action, (old_pos, old_element), (new_pos, new_element)| - # case action - # when '!' - # # replace - # when '-' - # # delete - # when '+' - # # insert - # end - # end - # - # source://diff-lcs//lib/diff/lcs.rb#200 - def sdiff(seq1, seq2, callbacks = T.unsafe(nil), &block); end - - # #traverse_balanced is an alternative to #traverse_sequences. It uses a - # different algorithm to iterate through the entries in the computed longest - # common subsequence. Instead of viewing the changes as insertions or - # deletions from one of the sequences, #traverse_balanced will report - # changes between the sequences. - # - # The arguments to #traverse_balanced are the two sequences to traverse and a - # callback object, like this: - # - # traverse_balanced(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new) - # - # #sdiff is implemented with #traverse_balanced. - # - # == Callback Methods - # - # Optional callback methods are emphasized. - # - # callbacks#match:: Called when +a+ and +b+ are pointing to - # common elements in +A+ and +B+. - # callbacks#discard_a:: Called when +a+ is pointing to an - # element not in +B+. - # callbacks#discard_b:: Called when +b+ is pointing to an - # element not in +A+. - # callbacks#change:: Called when +a+ and +b+ are pointing to - # the same relative position, but - # A[a] and B[b] are not - # the same; a change has - # occurred. - # - # #traverse_balanced might be a bit slower than #traverse_sequences, - # noticable only while processing huge amounts of data. - # - # == Algorithm - # - # a---+ - # v - # A = a b c e h j l m n p - # B = b c d e f j k l m r s t - # ^ - # b---+ - # - # === Matches - # - # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+ - # and +B+, the arrows will initially point to the first elements of their - # respective sequences. #traverse_sequences will advance the arrows through - # the sequences one element at a time, calling a method on the user-specified - # callback object before each advance. It will advance the arrows in such a - # way that if there are elements A[i] and B[j] which are - # both equal and part of the longest common subsequence, there will be some - # moment during the execution of #traverse_sequences when arrow +a+ is - # pointing to A[i] and arrow +b+ is pointing to B[j]. When - # this happens, #traverse_sequences will call callbacks#match and - # then it will advance both arrows. - # - # === Discards - # - # Otherwise, one of the arrows is pointing to an element of its sequence that - # is not part of the longest common subsequence. #traverse_sequences will - # advance that arrow and will call callbacks#discard_a or - # callbacks#discard_b, depending on which arrow it advanced. - # - # === Changes - # - # If both +a+ and +b+ point to elements that are not part of the longest - # common subsequence, then #traverse_sequences will try to call - # callbacks#change and advance both arrows. If - # callbacks#change is not implemented, then - # callbacks#discard_a and callbacks#discard_b will be - # called in turn. - # - # The methods for callbacks#match, callbacks#discard_a, - # callbacks#discard_b, and callbacks#change are invoked - # with an event comprising the action ("=", "+", "-", or "!", respectively), - # the indicies +i+ and +j+, and the elements A[i] and B[j]. - # Return values are discarded by #traverse_balanced. - # - # === Context - # - # Note that +i+ and +j+ may not be the same index position, even if +a+ and - # +b+ are considered to be pointing to matching or changed elements. - # - # source://diff-lcs//lib/diff/lcs.rb#475 - def traverse_balanced(seq1, seq2, callbacks = T.unsafe(nil)); end - - # #traverse_sequences is the most general facility provided by this module; - # #diff and #lcs are implemented as calls to it. - # - # The arguments to #traverse_sequences are the two sequences to traverse, and - # a callback object, like this: - # - # traverse_sequences(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new) - # - # == Callback Methods - # - # Optional callback methods are emphasized. - # - # callbacks#match:: Called when +a+ and +b+ are pointing to - # common elements in +A+ and +B+. - # callbacks#discard_a:: Called when +a+ is pointing to an - # element not in +B+. - # callbacks#discard_b:: Called when +b+ is pointing to an - # element not in +A+. - # callbacks#finished_a:: Called when +a+ has reached the end of - # sequence +A+. - # callbacks#finished_b:: Called when +b+ has reached the end of - # sequence +B+. - # - # == Algorithm - # - # a---+ - # v - # A = a b c e h j l m n p - # B = b c d e f j k l m r s t - # ^ - # b---+ - # - # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+ - # and +B+, the arrows will initially point to the first elements of their - # respective sequences. #traverse_sequences will advance the arrows through - # the sequences one element at a time, calling a method on the user-specified - # callback object before each advance. It will advance the arrows in such a - # way that if there are elements A[i] and B[j] which are - # both equal and part of the longest common subsequence, there will be some - # moment during the execution of #traverse_sequences when arrow +a+ is - # pointing to A[i] and arrow +b+ is pointing to B[j]. When - # this happens, #traverse_sequences will call callbacks#match and - # then it will advance both arrows. - # - # Otherwise, one of the arrows is pointing to an element of its sequence that - # is not part of the longest common subsequence. #traverse_sequences will - # advance that arrow and will call callbacks#discard_a or - # callbacks#discard_b, depending on which arrow it advanced. If both - # arrows point to elements that are not part of the longest common - # subsequence, then #traverse_sequences will advance arrow +a+ and call the - # appropriate callback, then it will advance arrow +b+ and call the appropriate - # callback. - # - # The methods for callbacks#match, callbacks#discard_a, and - # callbacks#discard_b are invoked with an event comprising the - # action ("=", "+", or "-", respectively), the indicies +i+ and +j+, and the - # elements A[i] and B[j]. Return values are discarded by - # #traverse_sequences. - # - # === End of Sequences - # - # If arrow +a+ reaches the end of its sequence before arrow +b+ does, - # #traverse_sequence will try to call callbacks#finished_a with the - # last index and element of +A+ (A[-1]) and the current index and - # element of +B+ (B[j]). If callbacks#finished_a does not - # exist, then callbacks#discard_b will be called on each element of - # +B+ until the end of the sequence is reached (the call will be done with - # A[-1] and B[j] for each element). - # - # If +b+ reaches the end of +B+ before +a+ reaches the end of +A+, - # callbacks#finished_b will be called with the current index and - # element of +A+ (A[i]) and the last index and element of +B+ - # (A[-1]). Again, if callbacks#finished_b does not exist on - # the callback object, then callbacks#discard_a will be called on - # each element of +A+ until the end of the sequence is reached (A[i] - # and B[-1]). - # - # There is a chance that one additional callbacks#discard_a or - # callbacks#discard_b will be called after the end of the sequence - # is reached, if +a+ has not yet reached the end of +A+ or +b+ has not yet - # reached the end of +B+. - # - # source://diff-lcs//lib/diff/lcs.rb#285 - def traverse_sequences(seq1, seq2, callbacks = T.unsafe(nil)); end - - # Given a set of patchset, convert the current version to the prior version. - # Does no auto-discovery. - # - # source://diff-lcs//lib/diff/lcs.rb#728 - def unpatch!(src, patchset); end - - private - - # source://diff-lcs//lib/diff/lcs/internals.rb#4 - def diff_traversal(method, seq1, seq2, callbacks, &block); end - end -end - -# An alias for DefaultCallbacks that is used in -# Diff::LCS#traverse_balanced. -# -# Diff::LCS.LCS(seq1, seq2, Diff::LCS::BalancedCallbacks) -# -# source://diff-lcs//lib/diff/lcs/callbacks.rb#50 -Diff::LCS::BalancedCallbacks = Diff::LCS::DefaultCallbacks - -# A block is an operation removing, adding, or changing a group of items. -# Basically, this is just a list of changes, where each change adds or -# deletes a single item. Used by bin/ldiff. -# -# source://diff-lcs//lib/diff/lcs/block.rb#6 -class Diff::LCS::Block - # @return [Block] a new instance of Block - # - # source://diff-lcs//lib/diff/lcs/block.rb#9 - def initialize(chunk); end - - # Returns the value of attribute changes. - # - # source://diff-lcs//lib/diff/lcs/block.rb#7 - def changes; end - - # source://diff-lcs//lib/diff/lcs/block.rb#21 - def diff_size; end - - # Returns the value of attribute insert. - # - # source://diff-lcs//lib/diff/lcs/block.rb#7 - def insert; end - - # source://diff-lcs//lib/diff/lcs/block.rb#25 - def op; end - - # Returns the value of attribute remove. - # - # source://diff-lcs//lib/diff/lcs/block.rb#7 - def remove; end -end - -# Represents a simplistic (non-contextual) change. Represents the removal or -# addition of an element from either the old or the new sequenced -# enumerable. -# -# source://diff-lcs//lib/diff/lcs/change.rb#6 -class Diff::LCS::Change - include ::Comparable - - # @return [Change] a new instance of Change - # - # source://diff-lcs//lib/diff/lcs/change.rb#27 - def initialize(*args); end - - # source://diff-lcs//lib/diff/lcs/change.rb#65 - def <=>(other); end - - # source://diff-lcs//lib/diff/lcs/change.rb#58 - def ==(other); end - - # Returns the action this Change represents. - # - # source://diff-lcs//lib/diff/lcs/change.rb#20 - def action; end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#72 - def adding?; end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#84 - def changed?; end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#76 - def deleting?; end - - # Returns the sequence element of the Change. - # - # source://diff-lcs//lib/diff/lcs/change.rb#25 - def element; end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#88 - def finished_a?; end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#92 - def finished_b?; end - - # source://diff-lcs//lib/diff/lcs/change.rb#34 - def inspect(*_args); end - - # Returns the position of the Change. - # - # source://diff-lcs//lib/diff/lcs/change.rb#23 - def position; end - - # source://diff-lcs//lib/diff/lcs/change.rb#38 - def to_a; end - - # source://diff-lcs//lib/diff/lcs/change.rb#38 - def to_ary; end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#80 - def unchanged?; end - - class << self - # source://diff-lcs//lib/diff/lcs/change.rb#44 - def from_a(arr); end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/change.rb#15 - def valid_action?(action); end - end -end - -# source://diff-lcs//lib/diff/lcs/change.rb#7 -Diff::LCS::Change::IntClass = Integer - -# The only actions valid for changes are '+' (add), '-' (delete), '=' -# (no change), '!' (changed), '<' (tail changes from first sequence), or -# '>' (tail changes from second sequence). The last two ('<>') are only -# found with Diff::LCS::diff and Diff::LCS::sdiff. -# -# source://diff-lcs//lib/diff/lcs/change.rb#13 -Diff::LCS::Change::VALID_ACTIONS = T.let(T.unsafe(nil), Array) - -# Represents a contextual change. Contains the position and values of the -# elements in the old and the new sequenced enumerables as well as the action -# taken. -# -# source://diff-lcs//lib/diff/lcs/change.rb#100 -class Diff::LCS::ContextChange < ::Diff::LCS::Change - # @return [ContextChange] a new instance of ContextChange - # - # source://diff-lcs//lib/diff/lcs/change.rb#114 - def initialize(*args); end - - # source://diff-lcs//lib/diff/lcs/change.rb#166 - def <=>(other); end - - # source://diff-lcs//lib/diff/lcs/change.rb#157 - def ==(other); end - - # Returns the new element being changed. - # - # source://diff-lcs//lib/diff/lcs/change.rb#112 - def new_element; end - - # Returns the new position being changed. - # - # source://diff-lcs//lib/diff/lcs/change.rb#108 - def new_position; end - - # Returns the old element being changed. - # - # source://diff-lcs//lib/diff/lcs/change.rb#110 - def old_element; end - - # Returns the old position being changed. - # - # source://diff-lcs//lib/diff/lcs/change.rb#106 - def old_position; end - - # source://diff-lcs//lib/diff/lcs/change.rb#122 - def to_a; end - - # source://diff-lcs//lib/diff/lcs/change.rb#122 - def to_ary; end - - class << self - # source://diff-lcs//lib/diff/lcs/change.rb#132 - def from_a(arr); end - - # Simplifies a context change for use in some diff callbacks. '<' actions - # are converted to '-' and '>' actions are converted to '+'. - # - # source://diff-lcs//lib/diff/lcs/change.rb#138 - def simplify(event); end - end -end - -# This will produce a compound array of contextual diff change objects. Each -# element in the #diffs array is a "hunk" array, where each element in each -# "hunk" array is a single change. Each change is a Diff::LCS::ContextChange -# that contains both the old index and new index values for the change. The -# "hunk" provides the full context for the changes. Both old and new objects -# will be presented for changed objects. +nil+ will be substituted for a -# discarded object. -# -# seq1 = %w(a b c e h j l m n p) -# seq2 = %w(b c d e f j k l m r s t) -# -# diffs = Diff::LCS.diff(seq1, seq2, Diff::LCS::ContextDiffCallbacks) -# # This example shows a simplified array format. -# # [ [ [ '-', [ 0, 'a' ], [ 0, nil ] ] ], # 1 -# # [ [ '+', [ 3, nil ], [ 2, 'd' ] ] ], # 2 -# # [ [ '-', [ 4, 'h' ], [ 4, nil ] ], # 3 -# # [ '+', [ 5, nil ], [ 4, 'f' ] ] ], -# # [ [ '+', [ 6, nil ], [ 6, 'k' ] ] ], # 4 -# # [ [ '-', [ 8, 'n' ], [ 9, nil ] ], # 5 -# # [ '+', [ 9, nil ], [ 9, 'r' ] ], -# # [ '-', [ 9, 'p' ], [ 10, nil ] ], -# # [ '+', [ 10, nil ], [ 10, 's' ] ], -# # [ '+', [ 10, nil ], [ 11, 't' ] ] ] ] -# -# The five hunks shown are comprised of individual changes; if there is a -# related set of changes, they are still shown individually. -# -# This callback can also be used with Diff::LCS#sdiff, which will produce -# results like: -# -# diffs = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextCallbacks) -# # This example shows a simplified array format. -# # [ [ [ "-", [ 0, "a" ], [ 0, nil ] ] ], # 1 -# # [ [ "+", [ 3, nil ], [ 2, "d" ] ] ], # 2 -# # [ [ "!", [ 4, "h" ], [ 4, "f" ] ] ], # 3 -# # [ [ "+", [ 6, nil ], [ 6, "k" ] ] ], # 4 -# # [ [ "!", [ 8, "n" ], [ 9, "r" ] ], # 5 -# # [ "!", [ 9, "p" ], [ 10, "s" ] ], -# # [ "+", [ 10, nil ], [ 11, "t" ] ] ] ] -# -# The five hunks are still present, but are significantly shorter in total -# presentation, because changed items are shown as changes ("!") instead of -# potentially "mismatched" pairs of additions and deletions. -# -# The result of this operation is similar to that of -# Diff::LCS::SDiffCallbacks. They may be compared as: -# -# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } -# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) -# -# s == c # -> true -# -# === Use -# -# This callback object must be initialised and can be used by the -# Diff::LCS#diff or Diff::LCS#sdiff methods. -# -# cbo = Diff::LCS::ContextDiffCallbacks.new -# Diff::LCS.LCS(seq1, seq2, cbo) -# cbo.finish -# -# Note that the call to #finish is absolutely necessary, or the last set of -# changes will not be visible. Alternatively, can be used as: -# -# cbo = Diff::LCS::ContextDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } -# -# The necessary #finish call will be made. -# -# === Simplified Array Format -# -# The simplified array format used in the example above can be obtained -# with: -# -# require 'pp' -# pp diffs.map { |e| e.map { |f| f.to_a } } -# -# source://diff-lcs//lib/diff/lcs/callbacks.rb#223 -class Diff::LCS::ContextDiffCallbacks < ::Diff::LCS::DiffCallbacks - # source://diff-lcs//lib/diff/lcs/callbacks.rb#232 - def change(event); end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#224 - def discard_a(event); end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#228 - def discard_b(event); end -end - -# This callback object implements the default set of callback events, -# which only returns the event itself. Note that #finished_a and -# #finished_b are not implemented -- I haven't yet figured out where they -# would be useful. -# -# Note that this is intended to be called as is, e.g., -# -# Diff::LCS.LCS(seq1, seq2, Diff::LCS::DefaultCallbacks) -# -# source://diff-lcs//lib/diff/lcs/callbacks.rb#14 -class Diff::LCS::DefaultCallbacks - class << self - # Called when both the old and new values have changed. - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#32 - def change(event); end - - # Called when the old value is discarded in favour of the new value. - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#22 - def discard_a(event); end - - # Called when the new value is discarded in favour of the old value. - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#27 - def discard_b(event); end - - # Called when two items match. - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#17 - def match(event); end - - private - - def new(*_arg0); end - end -end - -# This will produce a compound array of simple diff change objects. Each -# element in the #diffs array is a +hunk+ or +hunk+ array, where each -# element in each +hunk+ array is a single Change object representing the -# addition or removal of a single element from one of the two tested -# sequences. The +hunk+ provides the full context for the changes. -# -# diffs = Diff::LCS.diff(seq1, seq2) -# # This example shows a simplified array format. -# # [ [ [ '-', 0, 'a' ] ], # 1 -# # [ [ '+', 2, 'd' ] ], # 2 -# # [ [ '-', 4, 'h' ], # 3 -# # [ '+', 4, 'f' ] ], -# # [ [ '+', 6, 'k' ] ], # 4 -# # [ [ '-', 8, 'n' ], # 5 -# # [ '-', 9, 'p' ], -# # [ '+', 9, 'r' ], -# # [ '+', 10, 's' ], -# # [ '+', 11, 't' ] ] ] -# -# There are five hunks here. The first hunk says that the +a+ at position 0 -# of the first sequence should be deleted ('-'). The second hunk -# says that the +d+ at position 2 of the second sequence should be inserted -# ('+'). The third hunk says that the +h+ at position 4 of the -# first sequence should be removed and replaced with the +f+ from position 4 -# of the second sequence. The other two hunks are described similarly. -# -# === Use -# -# This callback object must be initialised and is used by the Diff::LCS#diff -# method. -# -# cbo = Diff::LCS::DiffCallbacks.new -# Diff::LCS.LCS(seq1, seq2, cbo) -# cbo.finish -# -# Note that the call to #finish is absolutely necessary, or the last set of -# changes will not be visible. Alternatively, can be used as: -# -# cbo = Diff::LCS::DiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } -# -# The necessary #finish call will be made. -# -# === Simplified Array Format -# -# The simplified array format used in the example above can be obtained -# with: -# -# require 'pp' -# pp diffs.map { |e| e.map { |f| f.to_a } } -# -# source://diff-lcs//lib/diff/lcs/callbacks.rb#106 -class Diff::LCS::DiffCallbacks - # :yields self: - # - # @return [DiffCallbacks] a new instance of DiffCallbacks - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#110 - def initialize; end - - # Returns the difference set collected during the diff process. - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#108 - def diffs; end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#133 - def discard_a(event); end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#137 - def discard_b(event); end - - # Finalizes the diff process. If an unprocessed hunk still exists, then it - # is appended to the diff list. - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#125 - def finish; end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#129 - def match(_event); end - - private - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#141 - def finish_hunk; end -end - -# A Hunk is a group of Blocks which overlap because of the context surrounding -# each block. (So if we're not using context, every hunk will contain one -# block.) Used in the diff program (bin/ldiff). -# -# source://diff-lcs//lib/diff/lcs/hunk.rb#8 -class Diff::LCS::Hunk - # Create a hunk using references to both the old and new data, as well as the - # piece of data. - # - # @return [Hunk] a new instance of Hunk - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#16 - def initialize(data_old, data_new, piece, flag_context, file_length_difference); end - - # Returns the value of attribute blocks. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#63 - def blocks; end - - # Returns a diff string based on a format. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#116 - def diff(format, last = T.unsafe(nil)); end - - # Returns the value of attribute end_new. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#65 - def end_new; end - - # Returns the value of attribute end_old. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#65 - def end_old; end - - # Returns the value of attribute file_length_difference. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#66 - def file_length_difference; end - - # Change the "start" and "end" fields to note that context should be added - # to this hunk. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#70 - def flag_context; end - - # source://diff-lcs//lib/diff/lcs/hunk.rb#72 - def flag_context=(context); end - - # Merges this hunk and the provided hunk together if they overlap. Returns - # a truthy value so that if there is no overlap, you can know the merge - # was skipped. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#98 - def merge(hunk); end - - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#326 - def missing_last_newline?(data); end - - # Determines whether there is an overlap between this hunk and the - # provided hunk. This will be true if the difference between the two hunks - # start or end positions is within one position of each other. - # - # @return [Boolean] - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#110 - def overlaps?(hunk); end - - # Returns the value of attribute start_new. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#64 - def start_new; end - - # Returns the value of attribute start_old. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#64 - def start_old; end - - # Merges this hunk and the provided hunk together if they overlap. Returns - # a truthy value so that if there is no overlap, you can know the merge - # was skipped. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#98 - def unshift(hunk); end - - private - - # source://diff-lcs//lib/diff/lcs/hunk.rb#213 - def context_diff(last = T.unsafe(nil)); end - - # Generate a range of item numbers to print. Only print 1 number if the - # range has only one item in it. Otherwise, it's 'start,end' - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#293 - def context_range(mode, op, last = T.unsafe(nil)); end - - # source://diff-lcs//lib/diff/lcs/hunk.rb#271 - def ed_diff(format, _last = T.unsafe(nil)); end - - # source://diff-lcs//lib/diff/lcs/hunk.rb#339 - def encode(literal, target_encoding = T.unsafe(nil)); end - - # source://diff-lcs//lib/diff/lcs/hunk.rb#343 - def encode_as(string, *args); end - - # Note that an old diff can't have any context. Therefore, we know that - # there's only one block in the hunk. - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#135 - def old_diff(_last = T.unsafe(nil)); end - - # source://diff-lcs//lib/diff/lcs/hunk.rb#160 - def unified_diff(last = T.unsafe(nil)); end - - # Generate a range of item numbers to print for unified diff. Print number - # where block starts, followed by number of lines in the block - # (don't print number of lines if it's 1) - # - # source://diff-lcs//lib/diff/lcs/hunk.rb#311 - def unified_range(mode, last); end -end - -# source://diff-lcs//lib/diff/lcs/hunk.rb#10 -Diff::LCS::Hunk::ED_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash) - -# source://diff-lcs//lib/diff/lcs/hunk.rb#9 -Diff::LCS::Hunk::OLD_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash) - -# source://diff-lcs//lib/diff/lcs/internals.rb#29 -module Diff::LCS::Internals - class << self - # This method will analyze the provided patchset to provide a single-pass - # normalization (conversion of the array form of Diff::LCS::Change objects to - # the object form of same) and detection of whether the patchset represents - # changes to be made. - # - # source://diff-lcs//lib/diff/lcs/internals.rb#102 - def analyze_patchset(patchset, depth = T.unsafe(nil)); end - - # Examine the patchset and the source to see in which direction the - # patch should be applied. - # - # WARNING: By default, this examines the whole patch, so this could take - # some time. This also works better with Diff::LCS::ContextChange or - # Diff::LCS::Change as its source, as an array will cause the creation - # of one of the above. - # - # source://diff-lcs//lib/diff/lcs/internals.rb#147 - def intuit_diff_direction(src, patchset, limit = T.unsafe(nil)); end - - # Compute the longest common subsequence between the sequenced - # Enumerables +a+ and +b+. The result is an array whose contents is such - # that - # - # result = Diff::LCS::Internals.lcs(a, b) - # result.each_with_index do |e, i| - # assert_equal(a[i], b[e]) unless e.nil? - # end - # - # source://diff-lcs//lib/diff/lcs/internals.rb#41 - def lcs(a, b); end - - private - - # If +vector+ maps the matching elements of another collection onto this - # Enumerable, compute the inverse of +vector+ that maps this Enumerable - # onto the collection. (Currently unused.) - # - # source://diff-lcs//lib/diff/lcs/internals.rb#286 - def inverse_vector(a, vector); end - - # Returns a hash mapping each element of an Enumerable to the set of - # positions it occupies in the Enumerable, optionally restricted to the - # elements specified in the range of indexes specified by +interval+. - # - # source://diff-lcs//lib/diff/lcs/internals.rb#298 - def position_hash(enum, interval); end - - # Find the place at which +value+ would normally be inserted into the - # Enumerable. If that place is already occupied by +value+, do nothing - # and return +nil+. If the place does not exist (i.e., it is off the end - # of the Enumerable), add it to the end. Otherwise, replace the element - # at that point with +value+. It is assumed that the Enumerable's values - # are numeric. - # - # This operation preserves the sort order. - # - # source://diff-lcs//lib/diff/lcs/internals.rb#252 - def replace_next_larger(enum, value, last_index = T.unsafe(nil)); end - end -end - -# This will produce a simple array of diff change objects. Each element in -# the #diffs array is a single ContextChange. In the set of #diffs provided -# by SDiffCallbacks, both old and new objects will be presented for both -# changed and unchanged objects. +nil+ will be substituted -# for a discarded object. -# -# The diffset produced by this callback, when provided to Diff::LCS#sdiff, -# will compute and display the necessary components to show two sequences -# and their minimized differences side by side, just like the Unix utility -# +sdiff+. -# -# same same -# before | after -# old < - -# - > new -# -# seq1 = %w(a b c e h j l m n p) -# seq2 = %w(b c d e f j k l m r s t) -# -# diffs = Diff::LCS.sdiff(seq1, seq2) -# # This example shows a simplified array format. -# # [ [ "-", [ 0, "a"], [ 0, nil ] ], -# # [ "=", [ 1, "b"], [ 0, "b" ] ], -# # [ "=", [ 2, "c"], [ 1, "c" ] ], -# # [ "+", [ 3, nil], [ 2, "d" ] ], -# # [ "=", [ 3, "e"], [ 3, "e" ] ], -# # [ "!", [ 4, "h"], [ 4, "f" ] ], -# # [ "=", [ 5, "j"], [ 5, "j" ] ], -# # [ "+", [ 6, nil], [ 6, "k" ] ], -# # [ "=", [ 6, "l"], [ 7, "l" ] ], -# # [ "=", [ 7, "m"], [ 8, "m" ] ], -# # [ "!", [ 8, "n"], [ 9, "r" ] ], -# # [ "!", [ 9, "p"], [ 10, "s" ] ], -# # [ "+", [ 10, nil], [ 11, "t" ] ] ] -# -# The result of this operation is similar to that of -# Diff::LCS::ContextDiffCallbacks. They may be compared as: -# -# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } -# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) -# -# s == c # -> true -# -# === Use -# -# This callback object must be initialised and is used by the Diff::LCS#sdiff -# method. -# -# cbo = Diff::LCS::SDiffCallbacks.new -# Diff::LCS.LCS(seq1, seq2, cbo) -# -# As with the other initialisable callback objects, -# Diff::LCS::SDiffCallbacks can be initialised with a block. As there is no -# "fininishing" to be done, this has no effect on the state of the object. -# -# cbo = Diff::LCS::SDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } -# -# === Simplified Array Format -# -# The simplified array format used in the example above can be obtained -# with: -# -# require 'pp' -# pp diffs.map { |e| e.to_a } -# -# source://diff-lcs//lib/diff/lcs/callbacks.rb#301 -class Diff::LCS::SDiffCallbacks - # :yields self: - # - # @return [SDiffCallbacks] a new instance of SDiffCallbacks - # @yield [_self] - # @yieldparam _self [Diff::LCS::SDiffCallbacks] the object that the method was called on - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#305 - def initialize; end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#322 - def change(event); end - - # Returns the difference set collected during the diff process. - # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#303 - def diffs; end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#314 - def discard_a(event); end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#318 - def discard_b(event); end - - # source://diff-lcs//lib/diff/lcs/callbacks.rb#310 - def match(event); end -end - -# An alias for DefaultCallbacks that is used in -# Diff::LCS#traverse_sequences. -# -# Diff::LCS.LCS(seq1, seq2, Diff::LCS::SequenceCallbacks) -# -# source://diff-lcs//lib/diff/lcs/callbacks.rb#44 -Diff::LCS::SequenceCallbacks = Diff::LCS::DefaultCallbacks - -# source://diff-lcs//lib/diff/lcs.rb#52 -Diff::LCS::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/docile@1.4.0.rbi b/sorbet/rbi/gems/docile@1.4.0.rbi deleted file mode 100644 index 35ff0106..00000000 --- a/sorbet/rbi/gems/docile@1.4.0.rbi +++ /dev/null @@ -1,376 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `docile` gem. -# Please instead update this file by running `bin/tapioca gem docile`. - -# Docile keeps your Ruby DSLs tame and well-behaved. -# -# source://docile//lib/docile/version.rb#3 -module Docile - extend ::Docile::Execution - - private - - # Execute a block in the context of an object whose methods represent the - # commands in a DSL. - # - # Use this method to execute an *imperative* DSL, which means that: - # - # 1. Each command mutates the state of the DSL context object - # 2. The return value of each command is ignored - # 3. The final return value is the original context object - # - # @example Use a String as a DSL - # Docile.dsl_eval("Hello, world!") do - # reverse! - # upcase! - # end - # #=> "!DLROW ,OLLEH" - # @example Use an Array as a DSL - # Docile.dsl_eval([]) do - # push 1 - # push 2 - # pop - # push 3 - # end - # #=> [1, 3] - # @note Use with an *imperative* DSL (commands modify the context object) - # @param dsl [Object] context object whose methods make up the DSL - # @param args [Array] arguments to be passed to the block - # @param block [Proc] the block of DSL commands to be executed against the - # `dsl` context object - # @return [Object] the `dsl` context object after executing the block - # - # source://docile//lib/docile.rb#45 - def dsl_eval(dsl, *args, **_arg2, &block); end - - # Execute a block in the context of an immutable object whose methods, - # and the methods of their return values, represent the commands in a DSL. - # - # Use this method to execute a *functional* DSL, which means that: - # - # 1. The original DSL context object is never mutated - # 2. Each command returns the next DSL context object - # 3. The final return value is the value returned by the last command - # - # @example Use a frozen String as a DSL - # Docile.dsl_eval_immutable("I'm immutable!".freeze) do - # reverse - # upcase - # end - # #=> "!ELBATUMMI M'I" - # @example Use a Float as a DSL - # Docile.dsl_eval_immutable(84.5) do - # fdiv(2) - # floor - # end - # #=> 42 - # @note Use with a *functional* DSL (commands return successor - # context objects) - # @param dsl [Object] immutable context object whose methods make up the - # initial DSL - # @param args [Array] arguments to be passed to the block - # @param block [Proc] the block of DSL commands to be executed against the - # `dsl` context object and successor return values - # @return [Object] the return value of the final command in the block - # - # source://docile//lib/docile.rb#128 - def dsl_eval_immutable(dsl, *args, **_arg2, &block); end - - # Execute a block in the context of an object whose methods represent the - # commands in a DSL, and return *the block's return value*. - # - # Use this method to execute an *imperative* DSL, which means that: - # - # 1. Each command mutates the state of the DSL context object - # 2. The return value of each command is ignored - # 3. The final return value is the original context object - # - # @example Use a String as a DSL - # Docile.dsl_eval_with_block_return("Hello, world!") do - # reverse! - # upcase! - # first - # end - # #=> "!" - # @example Use an Array as a DSL - # Docile.dsl_eval_with_block_return([]) do - # push "a" - # push "b" - # pop - # push "c" - # length - # end - # #=> 2 - # @note Use with an *imperative* DSL (commands modify the context object) - # @param dsl [Object] context object whose methods make up the DSL - # @param args [Array] arguments to be passed to the block - # @param block [Proc] the block of DSL commands to be executed against the - # `dsl` context object - # @return [Object] the return value from executing the block - # - # source://docile//lib/docile.rb#87 - def dsl_eval_with_block_return(dsl, *args, **_arg2, &block); end - - class << self - # Execute a block in the context of an object whose methods represent the - # commands in a DSL. - # - # Use this method to execute an *imperative* DSL, which means that: - # - # 1. Each command mutates the state of the DSL context object - # 2. The return value of each command is ignored - # 3. The final return value is the original context object - # - # @example Use a String as a DSL - # Docile.dsl_eval("Hello, world!") do - # reverse! - # upcase! - # end - # #=> "!DLROW ,OLLEH" - # @example Use an Array as a DSL - # Docile.dsl_eval([]) do - # push 1 - # push 2 - # pop - # push 3 - # end - # #=> [1, 3] - # @note Use with an *imperative* DSL (commands modify the context object) - # @param dsl [Object] context object whose methods make up the DSL - # @param args [Array] arguments to be passed to the block - # @param block [Proc] the block of DSL commands to be executed against the - # `dsl` context object - # @return [Object] the `dsl` context object after executing the block - # - # source://docile//lib/docile.rb#45 - def dsl_eval(dsl, *args, **_arg2, &block); end - - # Execute a block in the context of an immutable object whose methods, - # and the methods of their return values, represent the commands in a DSL. - # - # Use this method to execute a *functional* DSL, which means that: - # - # 1. The original DSL context object is never mutated - # 2. Each command returns the next DSL context object - # 3. The final return value is the value returned by the last command - # - # @example Use a frozen String as a DSL - # Docile.dsl_eval_immutable("I'm immutable!".freeze) do - # reverse - # upcase - # end - # #=> "!ELBATUMMI M'I" - # @example Use a Float as a DSL - # Docile.dsl_eval_immutable(84.5) do - # fdiv(2) - # floor - # end - # #=> 42 - # @note Use with a *functional* DSL (commands return successor - # context objects) - # @param dsl [Object] immutable context object whose methods make up the - # initial DSL - # @param args [Array] arguments to be passed to the block - # @param block [Proc] the block of DSL commands to be executed against the - # `dsl` context object and successor return values - # @return [Object] the return value of the final command in the block - # - # source://docile//lib/docile.rb#128 - def dsl_eval_immutable(dsl, *args, **_arg2, &block); end - - # Execute a block in the context of an object whose methods represent the - # commands in a DSL, and return *the block's return value*. - # - # Use this method to execute an *imperative* DSL, which means that: - # - # 1. Each command mutates the state of the DSL context object - # 2. The return value of each command is ignored - # 3. The final return value is the original context object - # - # @example Use a String as a DSL - # Docile.dsl_eval_with_block_return("Hello, world!") do - # reverse! - # upcase! - # first - # end - # #=> "!" - # @example Use an Array as a DSL - # Docile.dsl_eval_with_block_return([]) do - # push "a" - # push "b" - # pop - # push "c" - # length - # end - # #=> 2 - # @note Use with an *imperative* DSL (commands modify the context object) - # @param dsl [Object] context object whose methods make up the DSL - # @param args [Array] arguments to be passed to the block - # @param block [Proc] the block of DSL commands to be executed against the - # `dsl` context object - # @return [Object] the return value from executing the block - # - # source://docile//lib/docile.rb#87 - def dsl_eval_with_block_return(dsl, *args, **_arg2, &block); end - end -end - -# This is used to remove entries pointing to Docile's source files -# from {Exception#backtrace} and {Exception#backtrace_locations}. -# -# If {NoMethodError} is caught then the exception object will be extended -# by this module to add filter functionalities. -# -# @api private -# -# source://docile//lib/docile/backtrace_filter.rb#11 -module Docile::BacktraceFilter - # @api private - # - # source://docile//lib/docile/backtrace_filter.rb#14 - def backtrace; end - - # @api private - # - # source://docile//lib/docile/backtrace_filter.rb#19 - def backtrace_locations; end -end - -# @api private -# -# source://docile//lib/docile/backtrace_filter.rb#12 -Docile::BacktraceFilter::FILTER_PATTERN = T.let(T.unsafe(nil), Regexp) - -# Operates in the same manner as {FallbackContextProxy}, but replacing -# the primary `receiver` object with the result of each proxied method. -# -# This is useful for implementing DSL evaluation for immutable context -# objects. -# -# -# @api private -# @see Docile.dsl_eval_immutable -# -# source://docile//lib/docile/chaining_fallback_context_proxy.rb#17 -class Docile::ChainingFallbackContextProxy < ::Docile::FallbackContextProxy - # Proxy methods as in {FallbackContextProxy#method_missing}, replacing - # `receiver` with the returned value. - # - # @api private - # - # source://docile//lib/docile/chaining_fallback_context_proxy.rb#20 - def method_missing(method, *args, **_arg2, &block); end -end - -# A namespace for functions relating to the execution of a block against a -# proxy object. -# -# @api private -# -# source://docile//lib/docile/execution.rb#8 -module Docile::Execution - private - - # Execute a block in the context of an object whose methods represent the - # commands in a DSL, using a specific proxy class. - # - # @api private - # @param dsl [Object] context object whose methods make up the - # (initial) DSL - # @param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy] which class to instantiate as proxy context - # @param args [Array] arguments to be passed to the block - # @param block [Proc] the block of DSL commands to be executed - # @return [Object] the return value of the block - # - # source://docile//lib/docile/execution.rb#19 - def exec_in_proxy_context(dsl, proxy_type, *args, **_arg3, &block); end - - class << self - # Execute a block in the context of an object whose methods represent the - # commands in a DSL, using a specific proxy class. - # - # @api private - # @param dsl [Object] context object whose methods make up the - # (initial) DSL - # @param proxy_type [FallbackContextProxy, ChainingFallbackContextProxy] which class to instantiate as proxy context - # @param args [Array] arguments to be passed to the block - # @param block [Proc] the block of DSL commands to be executed - # @return [Object] the return value of the block - # - # source://docile//lib/docile/execution.rb#19 - def exec_in_proxy_context(dsl, proxy_type, *args, **_arg3, &block); end - end -end - -# A proxy object with a primary receiver as well as a secondary -# fallback receiver. -# -# Will attempt to forward all method calls first to the primary receiver, -# and then to the fallback receiver if the primary does not handle that -# method. -# -# This is useful for implementing DSL evaluation in the context of an object. -# -# -# @api private -# @see Docile.dsl_eval -# -# source://docile//lib/docile/fallback_context_proxy.rb#20 -class Docile::FallbackContextProxy - # @api private - # @param receiver [Object] the primary proxy target to which all methods - # initially will be forwarded - # @param fallback [Object] the fallback proxy target to which any methods - # not handled by `receiver` will be forwarded - # @return [FallbackContextProxy] a new instance of FallbackContextProxy - # - # source://docile//lib/docile/fallback_context_proxy.rb#46 - def initialize(receiver, fallback); end - - # @api private - # @return [Array] Instance variable names, excluding - # {NON_PROXIED_INSTANCE_VARIABLES} - # - # source://docile//lib/docile/fallback_context_proxy.rb#85 - def instance_variables; end - - # Proxy all methods, excluding {NON_PROXIED_METHODS}, first to `receiver` - # and then to `fallback` if not found. - # - # @api private - # - # source://docile//lib/docile/fallback_context_proxy.rb#91 - def method_missing(method, *args, **_arg2, &block); end -end - -# The set of methods which will **not** fallback from the block's context -# to the dsl object. -# -# @api private -# -# source://docile//lib/docile/fallback_context_proxy.rb#30 -Docile::FallbackContextProxy::NON_FALLBACK_METHODS = T.let(T.unsafe(nil), Set) - -# The set of instance variables which are local to this object and hidden. -# All other instance variables will be copied in and out of this object -# from the scope in which this proxy was created. -# -# @api private -# -# source://docile//lib/docile/fallback_context_proxy.rb#35 -Docile::FallbackContextProxy::NON_PROXIED_INSTANCE_VARIABLES = T.let(T.unsafe(nil), Set) - -# The set of methods which will **not** be proxied, but instead answered -# by this object directly. -# -# @api private -# -# source://docile//lib/docile/fallback_context_proxy.rb#23 -Docile::FallbackContextProxy::NON_PROXIED_METHODS = T.let(T.unsafe(nil), Set) - -# The current version of this library -# -# source://docile//lib/docile/version.rb#5 -Docile::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/json@2.6.3.rbi b/sorbet/rbi/gems/json@2.6.3.rbi deleted file mode 100644 index b379bc4b..00000000 --- a/sorbet/rbi/gems/json@2.6.3.rbi +++ /dev/null @@ -1,1541 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `json` gem. -# Please instead update this file by running `bin/tapioca gem json`. - -# Extends any Class to include _json_creatable?_ method. -# -# source://json//lib/json/common.rb#695 -class Class < ::Module - # Returns true if this class can be used to create an instance - # from a serialised JSON string. The class has to implement a class - # method _json_create_ that expects a hash as first parameter. The hash - # should include the required data. - # - # @return [Boolean] - # - # source://json//lib/json/common.rb#700 - def json_creatable?; end -end - -# = JavaScript \Object Notation (\JSON) -# -# \JSON is a lightweight data-interchange format. -# -# A \JSON value is one of the following: -# - Double-quoted text: "foo". -# - Number: +1+, +1.0+, +2.0e2+. -# - Boolean: +true+, +false+. -# - Null: +null+. -# - \Array: an ordered list of values, enclosed by square brackets: -# ["foo", 1, 1.0, 2.0e2, true, false, null] -# -# - \Object: a collection of name/value pairs, enclosed by curly braces; -# each name is double-quoted text; -# the values may be any \JSON values: -# {"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null} -# -# A \JSON array or object may contain nested arrays, objects, and scalars -# to any depth: -# {"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]} -# [{"foo": 0, "bar": 1}, ["baz", 2]] -# -# == Using \Module \JSON -# -# To make module \JSON available in your code, begin with: -# require 'json' -# -# All examples here assume that this has been done. -# -# === Parsing \JSON -# -# You can parse a \String containing \JSON data using -# either of two methods: -# - JSON.parse(source, opts) -# - JSON.parse!(source, opts) -# -# where -# - +source+ is a Ruby object. -# - +opts+ is a \Hash object containing options -# that control both input allowed and output formatting. -# -# The difference between the two methods -# is that JSON.parse! omits some checks -# and may not be safe for some +source+ data; -# use it only for data from trusted sources. -# Use the safer method JSON.parse for less trusted sources. -# -# ==== Parsing \JSON Arrays -# -# When +source+ is a \JSON array, JSON.parse by default returns a Ruby \Array: -# json = '["foo", 1, 1.0, 2.0e2, true, false, null]' -# ruby = JSON.parse(json) -# ruby # => ["foo", 1, 1.0, 200.0, true, false, nil] -# ruby.class # => Array -# -# The \JSON array may contain nested arrays, objects, and scalars -# to any depth: -# json = '[{"foo": 0, "bar": 1}, ["baz", 2]]' -# JSON.parse(json) # => [{"foo"=>0, "bar"=>1}, ["baz", 2]] -# -# ==== Parsing \JSON \Objects -# -# When the source is a \JSON object, JSON.parse by default returns a Ruby \Hash: -# json = '{"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null}' -# ruby = JSON.parse(json) -# ruby # => {"a"=>"foo", "b"=>1, "c"=>1.0, "d"=>200.0, "e"=>true, "f"=>false, "g"=>nil} -# ruby.class # => Hash -# -# The \JSON object may contain nested arrays, objects, and scalars -# to any depth: -# json = '{"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]}' -# JSON.parse(json) # => {"foo"=>{"bar"=>1, "baz"=>2}, "bat"=>[0, 1, 2]} -# -# ==== Parsing \JSON Scalars -# -# When the source is a \JSON scalar (not an array or object), -# JSON.parse returns a Ruby scalar. -# -# \String: -# ruby = JSON.parse('"foo"') -# ruby # => 'foo' -# ruby.class # => String -# \Integer: -# ruby = JSON.parse('1') -# ruby # => 1 -# ruby.class # => Integer -# \Float: -# ruby = JSON.parse('1.0') -# ruby # => 1.0 -# ruby.class # => Float -# ruby = JSON.parse('2.0e2') -# ruby # => 200 -# ruby.class # => Float -# Boolean: -# ruby = JSON.parse('true') -# ruby # => true -# ruby.class # => TrueClass -# ruby = JSON.parse('false') -# ruby # => false -# ruby.class # => FalseClass -# Null: -# ruby = JSON.parse('null') -# ruby # => nil -# ruby.class # => NilClass -# -# ==== Parsing Options -# -# ====== Input Options -# -# Option +max_nesting+ (\Integer) specifies the maximum nesting depth allowed; -# defaults to +100+; specify +false+ to disable depth checking. -# -# With the default, +false+: -# source = '[0, [1, [2, [3]]]]' -# ruby = JSON.parse(source) -# ruby # => [0, [1, [2, [3]]]] -# Too deep: -# # Raises JSON::NestingError (nesting of 2 is too deep): -# JSON.parse(source, {max_nesting: 1}) -# Bad value: -# # Raises TypeError (wrong argument type Symbol (expected Fixnum)): -# JSON.parse(source, {max_nesting: :foo}) -# -# --- -# -# Option +allow_nan+ (boolean) specifies whether to allow -# NaN, Infinity, and MinusInfinity in +source+; -# defaults to +false+. -# -# With the default, +false+: -# # Raises JSON::ParserError (225: unexpected token at '[NaN]'): -# JSON.parse('[NaN]') -# # Raises JSON::ParserError (232: unexpected token at '[Infinity]'): -# JSON.parse('[Infinity]') -# # Raises JSON::ParserError (248: unexpected token at '[-Infinity]'): -# JSON.parse('[-Infinity]') -# Allow: -# source = '[NaN, Infinity, -Infinity]' -# ruby = JSON.parse(source, {allow_nan: true}) -# ruby # => [NaN, Infinity, -Infinity] -# -# ====== Output Options -# -# Option +symbolize_names+ (boolean) specifies whether returned \Hash keys -# should be Symbols; -# defaults to +false+ (use Strings). -# -# With the default, +false+: -# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' -# ruby = JSON.parse(source) -# ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} -# Use Symbols: -# ruby = JSON.parse(source, {symbolize_names: true}) -# ruby # => {:a=>"foo", :b=>1.0, :c=>true, :d=>false, :e=>nil} -# -# --- -# -# Option +object_class+ (\Class) specifies the Ruby class to be used -# for each \JSON object; -# defaults to \Hash. -# -# With the default, \Hash: -# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' -# ruby = JSON.parse(source) -# ruby.class # => Hash -# Use class \OpenStruct: -# ruby = JSON.parse(source, {object_class: OpenStruct}) -# ruby # => # -# -# --- -# -# Option +array_class+ (\Class) specifies the Ruby class to be used -# for each \JSON array; -# defaults to \Array. -# -# With the default, \Array: -# source = '["foo", 1.0, true, false, null]' -# ruby = JSON.parse(source) -# ruby.class # => Array -# Use class \Set: -# ruby = JSON.parse(source, {array_class: Set}) -# ruby # => # -# -# --- -# -# Option +create_additions+ (boolean) specifies whether to use \JSON additions in parsing. -# See {\JSON Additions}[#module-JSON-label-JSON+Additions]. -# -# === Generating \JSON -# -# To generate a Ruby \String containing \JSON data, -# use method JSON.generate(source, opts), where -# - +source+ is a Ruby object. -# - +opts+ is a \Hash object containing options -# that control both input allowed and output formatting. -# -# ==== Generating \JSON from Arrays -# -# When the source is a Ruby \Array, JSON.generate returns -# a \String containing a \JSON array: -# ruby = [0, 's', :foo] -# json = JSON.generate(ruby) -# json # => '[0,"s","foo"]' -# -# The Ruby \Array array may contain nested arrays, hashes, and scalars -# to any depth: -# ruby = [0, [1, 2], {foo: 3, bar: 4}] -# json = JSON.generate(ruby) -# json # => '[0,[1,2],{"foo":3,"bar":4}]' -# -# ==== Generating \JSON from Hashes -# -# When the source is a Ruby \Hash, JSON.generate returns -# a \String containing a \JSON object: -# ruby = {foo: 0, bar: 's', baz: :bat} -# json = JSON.generate(ruby) -# json # => '{"foo":0,"bar":"s","baz":"bat"}' -# -# The Ruby \Hash array may contain nested arrays, hashes, and scalars -# to any depth: -# ruby = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} -# json = JSON.generate(ruby) -# json # => '{"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}' -# -# ==== Generating \JSON from Other Objects -# -# When the source is neither an \Array nor a \Hash, -# the generated \JSON data depends on the class of the source. -# -# When the source is a Ruby \Integer or \Float, JSON.generate returns -# a \String containing a \JSON number: -# JSON.generate(42) # => '42' -# JSON.generate(0.42) # => '0.42' -# -# When the source is a Ruby \String, JSON.generate returns -# a \String containing a \JSON string (with double-quotes): -# JSON.generate('A string') # => '"A string"' -# -# When the source is +true+, +false+ or +nil+, JSON.generate returns -# a \String containing the corresponding \JSON token: -# JSON.generate(true) # => 'true' -# JSON.generate(false) # => 'false' -# JSON.generate(nil) # => 'null' -# -# When the source is none of the above, JSON.generate returns -# a \String containing a \JSON string representation of the source: -# JSON.generate(:foo) # => '"foo"' -# JSON.generate(Complex(0, 0)) # => '"0+0i"' -# JSON.generate(Dir.new('.')) # => '"#"' -# -# ==== Generating Options -# -# ====== Input Options -# -# Option +allow_nan+ (boolean) specifies whether -# +NaN+, +Infinity+, and -Infinity may be generated; -# defaults to +false+. -# -# With the default, +false+: -# # Raises JSON::GeneratorError (920: NaN not allowed in JSON): -# JSON.generate(JSON::NaN) -# # Raises JSON::GeneratorError (917: Infinity not allowed in JSON): -# JSON.generate(JSON::Infinity) -# # Raises JSON::GeneratorError (917: -Infinity not allowed in JSON): -# JSON.generate(JSON::MinusInfinity) -# -# Allow: -# ruby = [Float::NaN, Float::Infinity, Float::MinusInfinity] -# JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,-Infinity]' -# -# --- -# -# Option +max_nesting+ (\Integer) specifies the maximum nesting depth -# in +obj+; defaults to +100+. -# -# With the default, +100+: -# obj = [[[[[[0]]]]]] -# JSON.generate(obj) # => '[[[[[[0]]]]]]' -# -# Too deep: -# # Raises JSON::NestingError (nesting of 2 is too deep): -# JSON.generate(obj, max_nesting: 2) -# -# ====== Output Options -# -# The default formatting options generate the most compact -# \JSON data, all on one line and with no whitespace. -# -# You can use these formatting options to generate -# \JSON data in a more open format, using whitespace. -# See also JSON.pretty_generate. -# -# - Option +array_nl+ (\String) specifies a string (usually a newline) -# to be inserted after each \JSON array; defaults to the empty \String, ''. -# - Option +object_nl+ (\String) specifies a string (usually a newline) -# to be inserted after each \JSON object; defaults to the empty \String, ''. -# - Option +indent+ (\String) specifies the string (usually spaces) to be -# used for indentation; defaults to the empty \String, ''; -# defaults to the empty \String, ''; -# has no effect unless options +array_nl+ or +object_nl+ specify newlines. -# - Option +space+ (\String) specifies a string (usually a space) to be -# inserted after the colon in each \JSON object's pair; -# defaults to the empty \String, ''. -# - Option +space_before+ (\String) specifies a string (usually a space) to be -# inserted before the colon in each \JSON object's pair; -# defaults to the empty \String, ''. -# -# In this example, +obj+ is used first to generate the shortest -# \JSON data (no whitespace), then again with all formatting options -# specified: -# -# obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} -# json = JSON.generate(obj) -# puts 'Compact:', json -# opts = { -# array_nl: "\n", -# object_nl: "\n", -# indent: ' ', -# space_before: ' ', -# space: ' ' -# } -# puts 'Open:', JSON.generate(obj, opts) -# -# Output: -# Compact: -# {"foo":["bar","baz"],"bat":{"bam":0,"bad":1}} -# Open: -# { -# "foo" : [ -# "bar", -# "baz" -# ], -# "bat" : { -# "bam" : 0, -# "bad" : 1 -# } -# } -# -# == \JSON Additions -# -# When you "round trip" a non-\String object from Ruby to \JSON and back, -# you have a new \String, instead of the object you began with: -# ruby0 = Range.new(0, 2) -# json = JSON.generate(ruby0) -# json # => '0..2"' -# ruby1 = JSON.parse(json) -# ruby1 # => '0..2' -# ruby1.class # => String -# -# You can use \JSON _additions_ to preserve the original object. -# The addition is an extension of a ruby class, so that: -# - \JSON.generate stores more information in the \JSON string. -# - \JSON.parse, called with option +create_additions+, -# uses that information to create a proper Ruby object. -# -# This example shows a \Range being generated into \JSON -# and parsed back into Ruby, both without and with -# the addition for \Range: -# ruby = Range.new(0, 2) -# # This passage does not use the addition for Range. -# json0 = JSON.generate(ruby) -# ruby0 = JSON.parse(json0) -# # This passage uses the addition for Range. -# require 'json/add/range' -# json1 = JSON.generate(ruby) -# ruby1 = JSON.parse(json1, create_additions: true) -# # Make a nice display. -# display = <require 'json/add/bigdecimal' -# - Complex: require 'json/add/complex' -# - Date: require 'json/add/date' -# - DateTime: require 'json/add/date_time' -# - Exception: require 'json/add/exception' -# - OpenStruct: require 'json/add/ostruct' -# - Range: require 'json/add/range' -# - Rational: require 'json/add/rational' -# - Regexp: require 'json/add/regexp' -# - Set: require 'json/add/set' -# - Struct: require 'json/add/struct' -# - Symbol: require 'json/add/symbol' -# - Time: require 'json/add/time' -# -# To reduce punctuation clutter, the examples below -# show the generated \JSON via +puts+, rather than the usual +inspect+, -# -# \BigDecimal: -# require 'json/add/bigdecimal' -# ruby0 = BigDecimal(0) # 0.0 -# json = JSON.generate(ruby0) # {"json_class":"BigDecimal","b":"27:0.0"} -# ruby1 = JSON.parse(json, create_additions: true) # 0.0 -# ruby1.class # => BigDecimal -# -# \Complex: -# require 'json/add/complex' -# ruby0 = Complex(1+0i) # 1+0i -# json = JSON.generate(ruby0) # {"json_class":"Complex","r":1,"i":0} -# ruby1 = JSON.parse(json, create_additions: true) # 1+0i -# ruby1.class # Complex -# -# \Date: -# require 'json/add/date' -# ruby0 = Date.today # 2020-05-02 -# json = JSON.generate(ruby0) # {"json_class":"Date","y":2020,"m":5,"d":2,"sg":2299161.0} -# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 -# ruby1.class # Date -# -# \DateTime: -# require 'json/add/date_time' -# ruby0 = DateTime.now # 2020-05-02T10:38:13-05:00 -# json = JSON.generate(ruby0) # {"json_class":"DateTime","y":2020,"m":5,"d":2,"H":10,"M":38,"S":13,"of":"-5/24","sg":2299161.0} -# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02T10:38:13-05:00 -# ruby1.class # DateTime -# -# \Exception (and its subclasses including \RuntimeError): -# require 'json/add/exception' -# ruby0 = Exception.new('A message') # A message -# json = JSON.generate(ruby0) # {"json_class":"Exception","m":"A message","b":null} -# ruby1 = JSON.parse(json, create_additions: true) # A message -# ruby1.class # Exception -# ruby0 = RuntimeError.new('Another message') # Another message -# json = JSON.generate(ruby0) # {"json_class":"RuntimeError","m":"Another message","b":null} -# ruby1 = JSON.parse(json, create_additions: true) # Another message -# ruby1.class # RuntimeError -# -# \OpenStruct: -# require 'json/add/ostruct' -# ruby0 = OpenStruct.new(name: 'Matz', language: 'Ruby') # # -# json = JSON.generate(ruby0) # {"json_class":"OpenStruct","t":{"name":"Matz","language":"Ruby"}} -# ruby1 = JSON.parse(json, create_additions: true) # # -# ruby1.class # OpenStruct -# -# \Range: -# require 'json/add/range' -# ruby0 = Range.new(0, 2) # 0..2 -# json = JSON.generate(ruby0) # {"json_class":"Range","a":[0,2,false]} -# ruby1 = JSON.parse(json, create_additions: true) # 0..2 -# ruby1.class # Range -# -# \Rational: -# require 'json/add/rational' -# ruby0 = Rational(1, 3) # 1/3 -# json = JSON.generate(ruby0) # {"json_class":"Rational","n":1,"d":3} -# ruby1 = JSON.parse(json, create_additions: true) # 1/3 -# ruby1.class # Rational -# -# \Regexp: -# require 'json/add/regexp' -# ruby0 = Regexp.new('foo') # (?-mix:foo) -# json = JSON.generate(ruby0) # {"json_class":"Regexp","o":0,"s":"foo"} -# ruby1 = JSON.parse(json, create_additions: true) # (?-mix:foo) -# ruby1.class # Regexp -# -# \Set: -# require 'json/add/set' -# ruby0 = Set.new([0, 1, 2]) # # -# json = JSON.generate(ruby0) # {"json_class":"Set","a":[0,1,2]} -# ruby1 = JSON.parse(json, create_additions: true) # # -# ruby1.class # Set -# -# \Struct: -# require 'json/add/struct' -# Customer = Struct.new(:name, :address) # Customer -# ruby0 = Customer.new("Dave", "123 Main") # # -# json = JSON.generate(ruby0) # {"json_class":"Customer","v":["Dave","123 Main"]} -# ruby1 = JSON.parse(json, create_additions: true) # # -# ruby1.class # Customer -# -# \Symbol: -# require 'json/add/symbol' -# ruby0 = :foo # foo -# json = JSON.generate(ruby0) # {"json_class":"Symbol","s":"foo"} -# ruby1 = JSON.parse(json, create_additions: true) # foo -# ruby1.class # Symbol -# -# \Time: -# require 'json/add/time' -# ruby0 = Time.now # 2020-05-02 11:28:26 -0500 -# json = JSON.generate(ruby0) # {"json_class":"Time","s":1588436906,"n":840560000} -# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 11:28:26 -0500 -# ruby1.class # Time -# -# -# === Custom \JSON Additions -# -# In addition to the \JSON additions provided, -# you can craft \JSON additions of your own, -# either for Ruby built-in classes or for user-defined classes. -# -# Here's a user-defined class +Foo+: -# class Foo -# attr_accessor :bar, :baz -# def initialize(bar, baz) -# self.bar = bar -# self.baz = baz -# end -# end -# -# Here's the \JSON addition for it: -# # Extend class Foo with JSON addition. -# class Foo -# # Serialize Foo object with its class name and arguments -# def to_json(*args) -# { -# JSON.create_id => self.class.name, -# 'a' => [ bar, baz ] -# }.to_json(*args) -# end -# # Deserialize JSON string by constructing new Foo object with arguments. -# def self.json_create(object) -# new(*object['a']) -# end -# end -# -# Demonstration: -# require 'json' -# # This Foo object has no custom addition. -# foo0 = Foo.new(0, 1) -# json0 = JSON.generate(foo0) -# obj0 = JSON.parse(json0) -# # Lood the custom addition. -# require_relative 'foo_addition' -# # This foo has the custom addition. -# foo1 = Foo.new(0, 1) -# json1 = JSON.generate(foo1) -# obj1 = JSON.parse(json1, create_additions: true) -# # Make a nice display. -# display = <" (String) -# With custom addition: {"json_class":"Foo","a":[0,1]} (String) -# Parsed JSON: -# Without custom addition: "#" (String) -# With custom addition: # (Foo) -# -# source://json//lib/json/version.rb#2 -module JSON - private - - # :call-seq: - # JSON.dump(obj, io = nil, limit = nil) - # - # Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result. - # - # The default options can be changed via method JSON.dump_default_options. - # - # - Argument +io+, if given, should respond to method +write+; - # the \JSON \String is written to +io+, and +io+ is returned. - # If +io+ is not given, the \JSON \String is returned. - # - Argument +limit+, if given, is passed to JSON.generate as option +max_nesting+. - # - # --- - # - # When argument +io+ is not given, returns the \JSON \String generated from +obj+: - # obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} - # json = JSON.dump(obj) - # json # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}" - # - # When argument +io+ is given, writes the \JSON \String to +io+ and returns +io+: - # path = 't.json' - # File.open(path, 'w') do |file| - # JSON.dump(obj, file) - # end # => # - # puts File.read(path) - # Output: - # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} - # - # source://json//lib/json/common.rb#631 - def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end - - # :call-seq: - # JSON.fast_generate(obj, opts) -> new_string - # - # Arguments +obj+ and +opts+ here are the same as - # arguments +obj+ and +opts+ in JSON.generate. - # - # By default, generates \JSON data without checking - # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled). - # - # Raises an exception if +obj+ contains circular references: - # a = []; b = []; a.push(b); b.push(a) - # # Raises SystemStackError (stack level too deep): - # JSON.fast_generate(a) - # - # source://json//lib/json/common.rb#335 - def fast_generate(obj, opts = T.unsafe(nil)); end - - # :stopdoc: - # I want to deprecate these later, so I'll first be silent about them, and later delete them. - # - # source://json//lib/json/common.rb#335 - def fast_unparse(obj, opts = T.unsafe(nil)); end - - # :call-seq: - # JSON.generate(obj, opts = nil) -> new_string - # - # Returns a \String containing the generated \JSON data. - # - # See also JSON.fast_generate, JSON.pretty_generate. - # - # Argument +obj+ is the Ruby object to be converted to \JSON. - # - # Argument +opts+, if given, contains a \Hash of options for the generation. - # See {Generating Options}[#module-JSON-label-Generating+Options]. - # - # --- - # - # When +obj+ is an \Array, returns a \String containing a \JSON array: - # obj = ["foo", 1.0, true, false, nil] - # json = JSON.generate(obj) - # json # => '["foo",1.0,true,false,null]' - # - # When +obj+ is a \Hash, returns a \String containing a \JSON object: - # obj = {foo: 0, bar: 's', baz: :bat} - # json = JSON.generate(obj) - # json # => '{"foo":0,"bar":"s","baz":"bat"}' - # - # For examples of generating from other Ruby objects, see - # {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects]. - # - # --- - # - # Raises an exception if any formatting option is not a \String. - # - # Raises an exception if +obj+ contains circular references: - # a = []; b = []; a.push(b); b.push(a) - # # Raises JSON::NestingError (nesting of 100 is too deep): - # JSON.generate(a) - # - # source://json//lib/json/common.rb#296 - def generate(obj, opts = T.unsafe(nil)); end - - # :call-seq: - # JSON.load(source, proc = nil, options = {}) -> object - # - # Returns the Ruby objects created by parsing the given +source+. - # - # - Argument +source+ must be, or be convertible to, a \String: - # - If +source+ responds to instance method +to_str+, - # source.to_str becomes the source. - # - If +source+ responds to instance method +to_io+, - # source.to_io.read becomes the source. - # - If +source+ responds to instance method +read+, - # source.read becomes the source. - # - If both of the following are true, source becomes the \String 'null': - # - Option +allow_blank+ specifies a truthy value. - # - The source, as defined above, is +nil+ or the empty \String ''. - # - Otherwise, +source+ remains the source. - # - Argument +proc+, if given, must be a \Proc that accepts one argument. - # It will be called recursively with each result (depth-first order). - # See details below. - # BEWARE: This method is meant to serialise data from trusted user input, - # like from your own database server or clients under your control, it could - # be dangerous to allow untrusted users to pass JSON sources into it. - # - Argument +opts+, if given, contains a \Hash of options for the parsing. - # See {Parsing Options}[#module-JSON-label-Parsing+Options]. - # The default options can be changed via method JSON.load_default_options=. - # - # --- - # - # When no +proc+ is given, modifies +source+ as above and returns the result of - # parse(source, opts); see #parse. - # - # Source for following examples: - # source = <<-EOT - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # EOT - # - # Load a \String: - # ruby = JSON.load(source) - # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} - # - # Load an \IO object: - # require 'stringio' - # object = JSON.load(StringIO.new(source)) - # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} - # - # Load a \File object: - # path = 't.json' - # File.write(path, source) - # File.open(path) do |file| - # JSON.load(file) - # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} - # - # --- - # - # When +proc+ is given: - # - Modifies +source+ as above. - # - Gets the +result+ from calling parse(source, opts). - # - Recursively calls proc(result). - # - Returns the final result. - # - # Example: - # require 'json' - # - # # Some classes for the example. - # class Base - # def initialize(attributes) - # @attributes = attributes - # end - # end - # class User < Base; end - # class Account < Base; end - # class Admin < Base; end - # # The JSON source. - # json = <<-EOF - # { - # "users": [ - # {"type": "User", "username": "jane", "email": "jane@example.com"}, - # {"type": "User", "username": "john", "email": "john@example.com"} - # ], - # "accounts": [ - # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, - # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} - # ], - # "admins": {"type": "Admin", "password": "0wn3d"} - # } - # EOF - # # Deserializer method. - # def deserialize_obj(obj, safe_types = %w(User Account Admin)) - # type = obj.is_a?(Hash) && obj["type"] - # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj - # end - # # Call to JSON.load - # ruby = JSON.load(json, proc {|obj| - # case obj - # when Hash - # obj.each {|k, v| obj[k] = deserialize_obj v } - # when Array - # obj.map! {|v| deserialize_obj v } - # end - # }) - # pp ruby - # Output: - # {"users"=> - # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, - # #"User", "username"=>"john", "email"=>"john@example.com"}>], - # "accounts"=> - # [{"account"=> - # #"Account", "paid"=>true, "account_id"=>"1234"}>}, - # {"account"=> - # #"Account", "paid"=>false, "account_id"=>"1235"}>}], - # "admins"=> - # #"Admin", "password"=>"0wn3d"}>} - # - # source://json//lib/json/common.rb#557 - def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end - - # :call-seq: - # JSON.load_file(path, opts={}) -> object - # - # Calls: - # parse(File.read(path), opts) - # - # See method #parse. - # - # source://json//lib/json/common.rb#245 - def load_file(filespec, opts = T.unsafe(nil)); end - - # :call-seq: - # JSON.load_file!(path, opts = {}) - # - # Calls: - # JSON.parse!(File.read(path, opts)) - # - # See method #parse! - # - # source://json//lib/json/common.rb#256 - def load_file!(filespec, opts = T.unsafe(nil)); end - - # :call-seq: - # JSON.parse(source, opts) -> object - # - # Returns the Ruby objects created by parsing the given +source+. - # - # Argument +source+ contains the \String to be parsed. - # - # Argument +opts+, if given, contains a \Hash of options for the parsing. - # See {Parsing Options}[#module-JSON-label-Parsing+Options]. - # - # --- - # - # When +source+ is a \JSON array, returns a Ruby \Array: - # source = '["foo", 1.0, true, false, null]' - # ruby = JSON.parse(source) - # ruby # => ["foo", 1.0, true, false, nil] - # ruby.class # => Array - # - # When +source+ is a \JSON object, returns a Ruby \Hash: - # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' - # ruby = JSON.parse(source) - # ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} - # ruby.class # => Hash - # - # For examples of parsing for all \JSON data types, see - # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. - # - # Parses nested JSON objects: - # source = <<-EOT - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # EOT - # ruby = JSON.parse(source) - # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} - # - # --- - # - # Raises an exception if +source+ is not valid JSON: - # # Raises JSON::ParserError (783: unexpected token at ''): - # JSON.parse('') - # - # source://json//lib/json/common.rb#215 - def parse(source, opts = T.unsafe(nil)); end - - # :call-seq: - # JSON.parse!(source, opts) -> object - # - # Calls - # parse(source, opts) - # with +source+ and possibly modified +opts+. - # - # Differences from JSON.parse: - # - Option +max_nesting+, if not provided, defaults to +false+, - # which disables checking for nesting depth. - # - Option +allow_nan+, if not provided, defaults to +true+. - # - # source://json//lib/json/common.rb#230 - def parse!(source, opts = T.unsafe(nil)); end - - # :call-seq: - # JSON.pretty_generate(obj, opts = nil) -> new_string - # - # Arguments +obj+ and +opts+ here are the same as - # arguments +obj+ and +opts+ in JSON.generate. - # - # Default options are: - # { - # indent: ' ', # Two spaces - # space: ' ', # One space - # array_nl: "\n", # Newline - # object_nl: "\n" # Newline - # } - # - # Example: - # obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} - # json = JSON.pretty_generate(obj) - # puts json - # Output: - # { - # "foo": [ - # "bar", - # "baz" - # ], - # "bat": { - # "bam": 0, - # "bad": 1 - # } - # } - # - # source://json//lib/json/common.rb#390 - def pretty_generate(obj, opts = T.unsafe(nil)); end - - # :stopdoc: - # I want to deprecate these later, so I'll first be silent about them, and later delete them. - # - # source://json//lib/json/common.rb#390 - def pretty_unparse(obj, opts = T.unsafe(nil)); end - - # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ - # - # source://json//lib/json/common.rb#575 - def recurse_proc(result, &proc); end - - # source://json//lib/json/common.rb#557 - def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end - - # :stopdoc: - # I want to deprecate these later, so I'll first be silent about them, and - # later delete them. - # - # source://json//lib/json/common.rb#296 - def unparse(obj, opts = T.unsafe(nil)); end - - class << self - # :call-seq: - # JSON[object] -> new_array or new_string - # - # If +object+ is a \String, - # calls JSON.parse with +object+ and +opts+ (see method #parse): - # json = '[0, 1, null]' - # JSON[json]# => [0, 1, nil] - # - # Otherwise, calls JSON.generate with +object+ and +opts+ (see method #generate): - # ruby = [0, 1, nil] - # JSON[ruby] # => '[0,1,null]' - # - # source://json//lib/json/common.rb#18 - def [](object, opts = T.unsafe(nil)); end - - # source://json//lib/json/common.rb#81 - def create_fast_state; end - - # Returns the current create identifier. - # See also JSON.create_id=. - # - # source://json//lib/json/common.rb#126 - def create_id; end - - # Sets create identifier, which is used to decide if the _json_create_ - # hook of a class should be called; initial value is +json_class+: - # JSON.create_id # => 'json_class' - # - # source://json//lib/json/common.rb#120 - def create_id=(new_value); end - - # source://json//lib/json/common.rb#91 - def create_pretty_state; end - - # Return the constant located at _path_. The format of _path_ has to be - # either ::A::B::C or A::B::C. In any case, A has to be located at the top - # level (absolute namespace path?). If there doesn't exist a constant at - # the given path, an ArgumentError is raised. - # - # source://json//lib/json/common.rb#42 - def deep_const_get(path); end - - # :call-seq: - # JSON.dump(obj, io = nil, limit = nil) - # - # Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result. - # - # The default options can be changed via method JSON.dump_default_options. - # - # - Argument +io+, if given, should respond to method +write+; - # the \JSON \String is written to +io+, and +io+ is returned. - # If +io+ is not given, the \JSON \String is returned. - # - Argument +limit+, if given, is passed to JSON.generate as option +max_nesting+. - # - # --- - # - # When argument +io+ is not given, returns the \JSON \String generated from +obj+: - # obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} - # json = JSON.dump(obj) - # json # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}" - # - # When argument +io+ is given, writes the \JSON \String to +io+ and returns +io+: - # path = 't.json' - # File.open(path, 'w') do |file| - # JSON.dump(obj, file) - # end # => # - # puts File.read(path) - # Output: - # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} - # - # source://json//lib/json/common.rb#631 - def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end - - # Sets or returns the default options for the JSON.dump method. - # Initially: - # opts = JSON.dump_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false} - # - # source://json//lib/json/common.rb#596 - def dump_default_options; end - - # Sets or returns the default options for the JSON.dump method. - # Initially: - # opts = JSON.dump_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false} - # - # source://json//lib/json/common.rb#596 - def dump_default_options=(_arg0); end - - # :call-seq: - # JSON.fast_generate(obj, opts) -> new_string - # - # Arguments +obj+ and +opts+ here are the same as - # arguments +obj+ and +opts+ in JSON.generate. - # - # By default, generates \JSON data without checking - # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled). - # - # Raises an exception if +obj+ contains circular references: - # a = []; b = []; a.push(b); b.push(a) - # # Raises SystemStackError (stack level too deep): - # JSON.fast_generate(a) - # - # source://json//lib/json/common.rb#335 - def fast_generate(obj, opts = T.unsafe(nil)); end - - # :stopdoc: - # I want to deprecate these later, so I'll first be silent about them, and later delete them. - # - # source://json//lib/json/common.rb#335 - def fast_unparse(obj, opts = T.unsafe(nil)); end - - # :call-seq: - # JSON.generate(obj, opts = nil) -> new_string - # - # Returns a \String containing the generated \JSON data. - # - # See also JSON.fast_generate, JSON.pretty_generate. - # - # Argument +obj+ is the Ruby object to be converted to \JSON. - # - # Argument +opts+, if given, contains a \Hash of options for the generation. - # See {Generating Options}[#module-JSON-label-Generating+Options]. - # - # --- - # - # When +obj+ is an \Array, returns a \String containing a \JSON array: - # obj = ["foo", 1.0, true, false, nil] - # json = JSON.generate(obj) - # json # => '["foo",1.0,true,false,null]' - # - # When +obj+ is a \Hash, returns a \String containing a \JSON object: - # obj = {foo: 0, bar: 's', baz: :bat} - # json = JSON.generate(obj) - # json # => '{"foo":0,"bar":"s","baz":"bat"}' - # - # For examples of generating from other Ruby objects, see - # {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects]. - # - # --- - # - # Raises an exception if any formatting option is not a \String. - # - # Raises an exception if +obj+ contains circular references: - # a = []; b = []; a.push(b); b.push(a) - # # Raises JSON::NestingError (nesting of 100 is too deep): - # JSON.generate(a) - # - # source://json//lib/json/common.rb#296 - def generate(obj, opts = T.unsafe(nil)); end - - # Returns the JSON generator module that is used by JSON. This is - # either JSON::Ext::Generator or JSON::Pure::Generator: - # JSON.generator # => JSON::Ext::Generator - # - # source://json//lib/json/common.rb#103 - def generator; end - - # Set the module _generator_ to be used by JSON. - # - # source://json//lib/json/common.rb#58 - def generator=(generator); end - - # Encodes string using String.encode. - # - # source://json//lib/json/common.rb#653 - def iconv(to, from, string); end - - # :call-seq: - # JSON.load(source, proc = nil, options = {}) -> object - # - # Returns the Ruby objects created by parsing the given +source+. - # - # - Argument +source+ must be, or be convertible to, a \String: - # - If +source+ responds to instance method +to_str+, - # source.to_str becomes the source. - # - If +source+ responds to instance method +to_io+, - # source.to_io.read becomes the source. - # - If +source+ responds to instance method +read+, - # source.read becomes the source. - # - If both of the following are true, source becomes the \String 'null': - # - Option +allow_blank+ specifies a truthy value. - # - The source, as defined above, is +nil+ or the empty \String ''. - # - Otherwise, +source+ remains the source. - # - Argument +proc+, if given, must be a \Proc that accepts one argument. - # It will be called recursively with each result (depth-first order). - # See details below. - # BEWARE: This method is meant to serialise data from trusted user input, - # like from your own database server or clients under your control, it could - # be dangerous to allow untrusted users to pass JSON sources into it. - # - Argument +opts+, if given, contains a \Hash of options for the parsing. - # See {Parsing Options}[#module-JSON-label-Parsing+Options]. - # The default options can be changed via method JSON.load_default_options=. - # - # --- - # - # When no +proc+ is given, modifies +source+ as above and returns the result of - # parse(source, opts); see #parse. - # - # Source for following examples: - # source = <<-EOT - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # EOT - # - # Load a \String: - # ruby = JSON.load(source) - # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} - # - # Load an \IO object: - # require 'stringio' - # object = JSON.load(StringIO.new(source)) - # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} - # - # Load a \File object: - # path = 't.json' - # File.write(path, source) - # File.open(path) do |file| - # JSON.load(file) - # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} - # - # --- - # - # When +proc+ is given: - # - Modifies +source+ as above. - # - Gets the +result+ from calling parse(source, opts). - # - Recursively calls proc(result). - # - Returns the final result. - # - # Example: - # require 'json' - # - # # Some classes for the example. - # class Base - # def initialize(attributes) - # @attributes = attributes - # end - # end - # class User < Base; end - # class Account < Base; end - # class Admin < Base; end - # # The JSON source. - # json = <<-EOF - # { - # "users": [ - # {"type": "User", "username": "jane", "email": "jane@example.com"}, - # {"type": "User", "username": "john", "email": "john@example.com"} - # ], - # "accounts": [ - # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, - # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} - # ], - # "admins": {"type": "Admin", "password": "0wn3d"} - # } - # EOF - # # Deserializer method. - # def deserialize_obj(obj, safe_types = %w(User Account Admin)) - # type = obj.is_a?(Hash) && obj["type"] - # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj - # end - # # Call to JSON.load - # ruby = JSON.load(json, proc {|obj| - # case obj - # when Hash - # obj.each {|k, v| obj[k] = deserialize_obj v } - # when Array - # obj.map! {|v| deserialize_obj v } - # end - # }) - # pp ruby - # Output: - # {"users"=> - # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, - # #"User", "username"=>"john", "email"=>"john@example.com"}>], - # "accounts"=> - # [{"account"=> - # #"Account", "paid"=>true, "account_id"=>"1234"}>}, - # {"account"=> - # #"Account", "paid"=>false, "account_id"=>"1235"}>}], - # "admins"=> - # #"Admin", "password"=>"0wn3d"}>} - # - # source://json//lib/json/common.rb#557 - def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end - - # Sets or returns default options for the JSON.load method. - # Initially: - # opts = JSON.load_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} - # - # source://json//lib/json/common.rb#420 - def load_default_options; end - - # Sets or returns default options for the JSON.load method. - # Initially: - # opts = JSON.load_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} - # - # source://json//lib/json/common.rb#420 - def load_default_options=(_arg0); end - - # :call-seq: - # JSON.load_file(path, opts={}) -> object - # - # Calls: - # parse(File.read(path), opts) - # - # See method #parse. - # - # source://json//lib/json/common.rb#245 - def load_file(filespec, opts = T.unsafe(nil)); end - - # :call-seq: - # JSON.load_file!(path, opts = {}) - # - # Calls: - # JSON.parse!(File.read(path, opts)) - # - # See method #parse! - # - # source://json//lib/json/common.rb#256 - def load_file!(filespec, opts = T.unsafe(nil)); end - - # :call-seq: - # JSON.parse(source, opts) -> object - # - # Returns the Ruby objects created by parsing the given +source+. - # - # Argument +source+ contains the \String to be parsed. - # - # Argument +opts+, if given, contains a \Hash of options for the parsing. - # See {Parsing Options}[#module-JSON-label-Parsing+Options]. - # - # --- - # - # When +source+ is a \JSON array, returns a Ruby \Array: - # source = '["foo", 1.0, true, false, null]' - # ruby = JSON.parse(source) - # ruby # => ["foo", 1.0, true, false, nil] - # ruby.class # => Array - # - # When +source+ is a \JSON object, returns a Ruby \Hash: - # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' - # ruby = JSON.parse(source) - # ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} - # ruby.class # => Hash - # - # For examples of parsing for all \JSON data types, see - # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. - # - # Parses nested JSON objects: - # source = <<-EOT - # { - # "name": "Dave", - # "age" :40, - # "hats": [ - # "Cattleman's", - # "Panama", - # "Tophat" - # ] - # } - # EOT - # ruby = JSON.parse(source) - # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} - # - # --- - # - # Raises an exception if +source+ is not valid JSON: - # # Raises JSON::ParserError (783: unexpected token at ''): - # JSON.parse('') - # - # source://json//lib/json/common.rb#215 - def parse(source, opts = T.unsafe(nil)); end - - # :call-seq: - # JSON.parse!(source, opts) -> object - # - # Calls - # parse(source, opts) - # with +source+ and possibly modified +opts+. - # - # Differences from JSON.parse: - # - Option +max_nesting+, if not provided, defaults to +false+, - # which disables checking for nesting depth. - # - Option +allow_nan+, if not provided, defaults to +true+. - # - # source://json//lib/json/common.rb#230 - def parse!(source, opts = T.unsafe(nil)); end - - # Returns the JSON parser class that is used by JSON. This is either - # JSON::Ext::Parser or JSON::Pure::Parser: - # JSON.parser # => JSON::Ext::Parser - # - # source://json//lib/json/common.rb#29 - def parser; end - - # Set the JSON parser class _parser_ to be used by JSON. - # - # source://json//lib/json/common.rb#32 - def parser=(parser); end - - # :call-seq: - # JSON.pretty_generate(obj, opts = nil) -> new_string - # - # Arguments +obj+ and +opts+ here are the same as - # arguments +obj+ and +opts+ in JSON.generate. - # - # Default options are: - # { - # indent: ' ', # Two spaces - # space: ' ', # One space - # array_nl: "\n", # Newline - # object_nl: "\n" # Newline - # } - # - # Example: - # obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} - # json = JSON.pretty_generate(obj) - # puts json - # Output: - # { - # "foo": [ - # "bar", - # "baz" - # ], - # "bat": { - # "bam": 0, - # "bad": 1 - # } - # } - # - # source://json//lib/json/common.rb#390 - def pretty_generate(obj, opts = T.unsafe(nil)); end - - # :stopdoc: - # I want to deprecate these later, so I'll first be silent about them, and later delete them. - # - # source://json//lib/json/common.rb#390 - def pretty_unparse(obj, opts = T.unsafe(nil)); end - - # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ - # - # source://json//lib/json/common.rb#575 - def recurse_proc(result, &proc); end - - # source://json//lib/json/common.rb#557 - def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end - - # Sets or Returns the JSON generator state class that is used by JSON. This is - # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: - # JSON.state # => JSON::Ext::Generator::State - # - # source://json//lib/json/common.rb#108 - def state; end - - # Sets or Returns the JSON generator state class that is used by JSON. This is - # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: - # JSON.state # => JSON::Ext::Generator::State - # - # source://json//lib/json/common.rb#108 - def state=(_arg0); end - - # :stopdoc: - # I want to deprecate these later, so I'll first be silent about them, and - # later delete them. - # - # source://json//lib/json/common.rb#296 - def unparse(obj, opts = T.unsafe(nil)); end - end -end - -# source://json//lib/json/common.rb#114 -JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String) - -# source://json//lib/json/common.rb#111 -JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String) - -# source://json//lib/json/generic_object.rb#5 -class JSON::GenericObject < ::OpenStruct - # source://json//lib/json/generic_object.rb#63 - def as_json(*_arg0); end - - # source://json//lib/json/generic_object.rb#47 - def to_hash; end - - # source://json//lib/json/generic_object.rb#67 - def to_json(*a); end - - # source://json//lib/json/generic_object.rb#59 - def |(other); end - - class << self - # source://json//lib/json/generic_object.rb#41 - def dump(obj, *args); end - - # source://json//lib/json/generic_object.rb#21 - def from_hash(object); end - - # Sets the attribute json_creatable - # - # @param value the value to set the attribute json_creatable to. - # - # source://json//lib/json/generic_object.rb#13 - def json_creatable=(_arg0); end - - # @return [Boolean] - # - # source://json//lib/json/generic_object.rb#9 - def json_creatable?; end - - # source://json//lib/json/generic_object.rb#15 - def json_create(data); end - - # source://json//lib/json/generic_object.rb#36 - def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end - end -end - -# The base exception for JSON errors. -# -# source://json//lib/json/common.rb#137 -class JSON::JSONError < ::StandardError - class << self - # source://json//lib/json/common.rb#138 - def wrap(exception); end - end -end - -# source://json//lib/json/common.rb#35 -JSON::Parser = JSON::Ext::Parser - -# source://json//lib/json/common.rb#73 -JSON::State = JSON::Ext::Generator::State - -# For backwards compatibility -# -# source://json//lib/json/common.rb#159 -JSON::UnparserError = JSON::GeneratorError - -# source://json//lib/json/common.rb#658 -module Kernel - private - - # If _object_ is string-like, parse the string and return the parsed result as - # a Ruby data structure. Otherwise, generate a JSON text from the Ruby data - # structure object and return it. - # - # The _opts_ argument is passed through to generate/parse respectively. See - # generate and parse for their documentation. - # - # source://json//lib/json/common.rb#685 - def JSON(object, *args); end - - # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in - # one line. - # - # source://json//lib/json/common.rb#663 - def j(*objs); end - - # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with - # indentation and over many lines. - # - # source://json//lib/json/common.rb#672 - def jj(*objs); end -end diff --git a/sorbet/rbi/gems/method_source@1.0.0.rbi b/sorbet/rbi/gems/method_source@1.0.0.rbi deleted file mode 100644 index 039ac9d5..00000000 --- a/sorbet/rbi/gems/method_source@1.0.0.rbi +++ /dev/null @@ -1,272 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `method_source` gem. -# Please instead update this file by running `bin/tapioca gem method_source`. - -# source://method_source//lib/method_source.rb#127 -class Method - include ::MethodSource::SourceLocation::MethodExtensions - include ::MethodSource::MethodExtensions -end - -# source://method_source//lib/method_source/version.rb#1 -module MethodSource - extend ::MethodSource::CodeHelpers - - class << self - # Helper method responsible for opening source file and buffering up - # the comments for a specified method. Defined here to avoid polluting - # `Method` class. - # - # @param source_location [Array] The array returned by Method#source_location - # @param method_name [String] - # @raise [SourceNotFoundError] - # @return [String] The comments up to the point of the method. - # - # source://method_source//lib/method_source.rb#38 - def comment_helper(source_location, name = T.unsafe(nil)); end - - # @deprecated — use MethodSource::CodeHelpers#expression_at - # - # source://method_source//lib/method_source.rb#66 - def extract_code(source_location); end - - # Load a memoized copy of the lines in a file. - # - # @param file_name [String] - # @param method_name [String] - # @raise [SourceNotFoundError] - # @return [Array] the contents of the file - # - # source://method_source//lib/method_source.rb#51 - def lines_for(file_name, name = T.unsafe(nil)); end - - # Helper method responsible for extracting method body. - # Defined here to avoid polluting `Method` class. - # - # @param source_location [Array] The array returned by Method#source_location - # @param method_name [String] - # @return [String] The method body - # - # source://method_source//lib/method_source.rb#23 - def source_helper(source_location, name = T.unsafe(nil)); end - - # @deprecated — use MethodSource::CodeHelpers#complete_expression? - # @return [Boolean] - # - # source://method_source//lib/method_source.rb#59 - def valid_expression?(str); end - end -end - -# source://method_source//lib/method_source/code_helpers.rb#3 -module MethodSource::CodeHelpers - # Retrieve the comment describing the expression on the given line of the given file. - # - # This is useful to get module or method documentation. - # - # @param file [Array, File, String] The file to parse, either as a File or as - # a String or an Array of lines. - # @param line_number [Integer] The line number at which to look. - # NOTE: The first line in a file is line 1! - # @return [String] The comment - # - # source://method_source//lib/method_source/code_helpers.rb#52 - def comment_describing(file, line_number); end - - # Determine if a string of code is a complete Ruby expression. - # - # @example - # complete_expression?("class Hello") #=> false - # complete_expression?("class Hello; end") #=> true - # complete_expression?("class 123") #=> SyntaxError: unexpected tINTEGER - # @param code [String] The code to validate. - # @raise [SyntaxError] Any SyntaxError that does not represent incompleteness. - # @return [Boolean] Whether or not the code is a complete Ruby expression. - # - # source://method_source//lib/method_source/code_helpers.rb#66 - def complete_expression?(str); end - - # Retrieve the first expression starting on the given line of the given file. - # - # This is useful to get module or method source code. - # - # line 1! - # - # @option options - # @option options - # @param file [Array, File, String] The file to parse, either as a File or as - # @param line_number [Integer] The line number at which to look. - # NOTE: The first line in a file is - # @param options [Hash] The optional configuration parameters. - # @raise [SyntaxError] If the first complete expression can't be identified - # @return [String] The first complete expression - # - # source://method_source//lib/method_source/code_helpers.rb#20 - def expression_at(file, line_number, options = T.unsafe(nil)); end - - private - - # Get the first expression from the input. - # - # @param lines [Array] - # @param consume [Integer] A number of lines to automatically - # consume (add to the expression buffer) without checking for validity. - # @raise [SyntaxError] - # @return [String] a valid ruby expression - # @yield a clean-up function to run before checking for complete_expression - # - # source://method_source//lib/method_source/code_helpers.rb#92 - def extract_first_expression(lines, consume = T.unsafe(nil), &block); end - - # Get the last comment from the input. - # - # @param lines [Array] - # @return [String] - # - # source://method_source//lib/method_source/code_helpers.rb#106 - def extract_last_comment(lines); end -end - -# An exception matcher that matches only subsets of SyntaxErrors that can be -# fixed by adding more input to the buffer. -# -# source://method_source//lib/method_source/code_helpers.rb#124 -module MethodSource::CodeHelpers::IncompleteExpression - class << self - # source://method_source//lib/method_source/code_helpers.rb#137 - def ===(ex); end - - # @return [Boolean] - # - # source://method_source//lib/method_source/code_helpers.rb#149 - def rbx?; end - end -end - -# source://method_source//lib/method_source/code_helpers.rb#125 -MethodSource::CodeHelpers::IncompleteExpression::GENERIC_REGEXPS = T.let(T.unsafe(nil), Array) - -# source://method_source//lib/method_source/code_helpers.rb#133 -MethodSource::CodeHelpers::IncompleteExpression::RBX_ONLY_REGEXPS = T.let(T.unsafe(nil), Array) - -# This module is to be included by `Method` and `UnboundMethod` and -# provides the `#source` functionality -# -# source://method_source//lib/method_source.rb#72 -module MethodSource::MethodExtensions - # Return the comments associated with the method as a string. - # - # @example - # Set.instance_method(:clear).comment.display - # => - # # Removes all elements and returns self. - # @raise SourceNotFoundException - # @return [String] The method's comments as a string - # - # source://method_source//lib/method_source.rb#121 - def comment; end - - # Return the sourcecode for the method as a string - # - # @example - # Set.instance_method(:clear).source.display - # => - # def clear - # @hash.clear - # self - # end - # @raise SourceNotFoundException - # @return [String] The method sourcecode as a string - # - # source://method_source//lib/method_source.rb#109 - def source; end - - class << self - # We use the included hook to patch Method#source on rubinius. - # We need to use the included hook as Rubinius defines a `source` - # on Method so including a module will have no effect (as it's - # higher up the MRO). - # - # @param klass [Class] The class that includes the module. - # - # source://method_source//lib/method_source.rb#79 - def included(klass); end - end -end - -# source://method_source//lib/method_source/source_location.rb#2 -module MethodSource::ReeSourceLocation - # Ruby enterprise edition provides all the information that's - # needed, in a slightly different way. - # - # source://method_source//lib/method_source/source_location.rb#5 - def source_location; end -end - -# source://method_source//lib/method_source/source_location.rb#10 -module MethodSource::SourceLocation; end - -# source://method_source//lib/method_source/source_location.rb#11 -module MethodSource::SourceLocation::MethodExtensions - # Return the source location of a method for Ruby 1.8. - # - # @return [Array] A two element array. First element is the - # file, second element is the line in the file where the - # method definition is found. - # - # source://method_source//lib/method_source/source_location.rb#40 - def source_location; end - - private - - # source://method_source//lib/method_source/source_location.rb#26 - def trace_func(event, file, line, id, binding, classname); end -end - -# source://method_source//lib/method_source/source_location.rb#54 -module MethodSource::SourceLocation::ProcExtensions - # Return the source location for a Proc (in implementations - # without Proc#source_location) - # - # @return [Array] A two element array. First element is the - # file, second element is the line in the file where the - # proc definition is found. - # - # source://method_source//lib/method_source/source_location.rb#74 - def source_location; end -end - -# source://method_source//lib/method_source/source_location.rb#81 -module MethodSource::SourceLocation::UnboundMethodExtensions - # Return the source location of an instance method for Ruby 1.8. - # - # @return [Array] A two element array. First element is the - # file, second element is the line in the file where the - # method definition is found. - # - # source://method_source//lib/method_source/source_location.rb#101 - def source_location; end -end - -# An Exception to mark errors that were raised trying to find the source from -# a given source_location. -# -# source://method_source//lib/method_source.rb#16 -class MethodSource::SourceNotFoundError < ::StandardError; end - -# source://method_source//lib/method_source/version.rb#2 -MethodSource::VERSION = T.let(T.unsafe(nil), String) - -# source://method_source//lib/method_source.rb#137 -class Proc - include ::MethodSource::SourceLocation::ProcExtensions - include ::MethodSource::MethodExtensions -end - -# source://method_source//lib/method_source.rb#132 -class UnboundMethod - include ::MethodSource::SourceLocation::UnboundMethodExtensions - include ::MethodSource::MethodExtensions -end diff --git a/sorbet/rbi/gems/netrc@0.11.0.rbi b/sorbet/rbi/gems/netrc@0.11.0.rbi deleted file mode 100644 index 062a5577..00000000 --- a/sorbet/rbi/gems/netrc@0.11.0.rbi +++ /dev/null @@ -1,158 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `netrc` gem. -# Please instead update this file by running `bin/tapioca gem netrc`. - -# source://netrc//lib/netrc.rb#3 -class Netrc - # @return [Netrc] a new instance of Netrc - # - # source://netrc//lib/netrc.rb#166 - def initialize(path, data); end - - # source://netrc//lib/netrc.rb#180 - def [](k); end - - # source://netrc//lib/netrc.rb#188 - def []=(k, info); end - - # source://netrc//lib/netrc.rb#200 - def delete(key); end - - # source://netrc//lib/netrc.rb#211 - def each(&block); end - - # source://netrc//lib/netrc.rb#196 - def length; end - - # source://netrc//lib/netrc.rb#215 - def new_item(m, l, p); end - - # Returns the value of attribute new_item_prefix. - # - # source://netrc//lib/netrc.rb#178 - def new_item_prefix; end - - # Sets the attribute new_item_prefix - # - # @param value the value to set the attribute new_item_prefix to. - # - # source://netrc//lib/netrc.rb#178 - def new_item_prefix=(_arg0); end - - # source://netrc//lib/netrc.rb#219 - def save; end - - # source://netrc//lib/netrc.rb#233 - def unparse; end - - class << self - # source://netrc//lib/netrc.rb#42 - def check_permissions(path); end - - # source://netrc//lib/netrc.rb#33 - def config; end - - # @yield [self.config] - # - # source://netrc//lib/netrc.rb#37 - def configure; end - - # source://netrc//lib/netrc.rb#10 - def default_path; end - - # source://netrc//lib/netrc.rb#14 - def home_path; end - - # source://netrc//lib/netrc.rb#85 - def lex(lines); end - - # source://netrc//lib/netrc.rb#29 - def netrc_filename; end - - # Returns two values, a header and a list of items. - # Each item is a tuple, containing some or all of: - # - machine keyword (including trailing whitespace+comments) - # - machine name - # - login keyword (including surrounding whitespace+comments) - # - login - # - password keyword (including surrounding whitespace+comments) - # - password - # - trailing chars - # This lets us change individual fields, then write out the file - # with all its original formatting. - # - # source://netrc//lib/netrc.rb#129 - def parse(ts); end - - # Reads path and parses it as a .netrc file. If path doesn't - # exist, returns an empty object. Decrypt paths ending in .gpg. - # - # source://netrc//lib/netrc.rb#51 - def read(path = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://netrc//lib/netrc.rb#112 - def skip?(s); end - end -end - -# source://netrc//lib/netrc.rb#8 -Netrc::CYGWIN = T.let(T.unsafe(nil), T.untyped) - -# source://netrc//lib/netrc.rb#244 -class Netrc::Entry < ::Struct - # Returns the value of attribute login - # - # @return [Object] the current value of login - def login; end - - # Sets the attribute login - # - # @param value [Object] the value to set the attribute login to. - # @return [Object] the newly set value - def login=(_); end - - # Returns the value of attribute password - # - # @return [Object] the current value of password - def password; end - - # Sets the attribute password - # - # @param value [Object] the value to set the attribute password to. - # @return [Object] the newly set value - def password=(_); end - - def to_ary; end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://netrc//lib/netrc.rb#250 -class Netrc::Error < ::StandardError; end - -# source://netrc//lib/netrc.rb#68 -class Netrc::TokenArray < ::Array - # source://netrc//lib/netrc.rb#76 - def readto; end - - # source://netrc//lib/netrc.rb#69 - def take; end -end - -# source://netrc//lib/netrc.rb#4 -Netrc::VERSION = T.let(T.unsafe(nil), String) - -# see http://stackoverflow.com/questions/4871309/what-is-the-correct-way-to-detect-if-ruby-is-running-on-windows -# -# source://netrc//lib/netrc.rb#7 -Netrc::WINDOWS = T.let(T.unsafe(nil), T.untyped) diff --git a/sorbet/rbi/gems/parallel@1.22.1.rbi b/sorbet/rbi/gems/parallel@1.22.1.rbi deleted file mode 100644 index a8633dfd..00000000 --- a/sorbet/rbi/gems/parallel@1.22.1.rbi +++ /dev/null @@ -1,277 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `parallel` gem. -# Please instead update this file by running `bin/tapioca gem parallel`. - -# source://parallel//lib/parallel/version.rb#2 -module Parallel - extend ::Parallel::ProcessorCount - - class << self - # @return [Boolean] - # - # source://parallel//lib/parallel.rb#246 - def all?(*args, &block); end - - # @return [Boolean] - # - # source://parallel//lib/parallel.rb#241 - def any?(*args, &block); end - - # source://parallel//lib/parallel.rb#237 - def each(array, options = T.unsafe(nil), &block); end - - # source://parallel//lib/parallel.rb#251 - def each_with_index(array, options = T.unsafe(nil), &block); end - - # source://parallel//lib/parallel.rb#306 - def flat_map(*args, &block); end - - # source://parallel//lib/parallel.rb#231 - def in_processes(options = T.unsafe(nil), &block); end - - # source://parallel//lib/parallel.rb#215 - def in_threads(options = T.unsafe(nil)); end - - # source://parallel//lib/parallel.rb#255 - def map(source, options = T.unsafe(nil), &block); end - - # source://parallel//lib/parallel.rb#302 - def map_with_index(array, options = T.unsafe(nil), &block); end - - # source://parallel//lib/parallel.rb#310 - def worker_number; end - - # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed - # - # source://parallel//lib/parallel.rb#315 - def worker_number=(worker_num); end - - private - - # source://parallel//lib/parallel.rb#321 - def add_progress_bar!(job_factory, options); end - - # source://parallel//lib/parallel.rb#584 - def call_with_index(item, index, options, &block); end - - # source://parallel//lib/parallel.rb#516 - def create_workers(job_factory, options, &block); end - - # options is either a Integer or a Hash with :count - # - # source://parallel//lib/parallel.rb#574 - def extract_count_from_options(options); end - - # source://parallel//lib/parallel.rb#602 - def instrument_finish(item, index, result, options); end - - # source://parallel//lib/parallel.rb#607 - def instrument_start(item, index, options); end - - # source://parallel//lib/parallel.rb#550 - def process_incoming_jobs(read, write, job_factory, options, &block); end - - # source://parallel//lib/parallel.rb#504 - def replace_worker(job_factory, workers, index, options, blk); end - - # source://parallel//lib/parallel.rb#595 - def with_instrumentation(item, index, options); end - - # source://parallel//lib/parallel.rb#346 - def work_direct(job_factory, options, &block); end - - # source://parallel//lib/parallel.rb#456 - def work_in_processes(job_factory, options, &blk); end - - # source://parallel//lib/parallel.rb#390 - def work_in_ractors(job_factory, options); end - - # source://parallel//lib/parallel.rb#365 - def work_in_threads(job_factory, options, &block); end - - # source://parallel//lib/parallel.rb#524 - def worker(job_factory, options, &block); end - end -end - -# source://parallel//lib/parallel.rb#14 -class Parallel::Break < ::StandardError - # @return [Break] a new instance of Break - # - # source://parallel//lib/parallel.rb#17 - def initialize(value = T.unsafe(nil)); end - - # Returns the value of attribute value. - # - # source://parallel//lib/parallel.rb#15 - def value; end -end - -# source://parallel//lib/parallel.rb#11 -class Parallel::DeadWorker < ::StandardError; end - -# source://parallel//lib/parallel.rb#35 -class Parallel::ExceptionWrapper - # @return [ExceptionWrapper] a new instance of ExceptionWrapper - # - # source://parallel//lib/parallel.rb#38 - def initialize(exception); end - - # Returns the value of attribute exception. - # - # source://parallel//lib/parallel.rb#36 - def exception; end -end - -# source://parallel//lib/parallel.rb#101 -class Parallel::JobFactory - # @return [JobFactory] a new instance of JobFactory - # - # source://parallel//lib/parallel.rb#102 - def initialize(source, mutex); end - - # source://parallel//lib/parallel.rb#110 - def next; end - - # generate item that is sent to workers - # just index is faster + less likely to blow up with unserializable errors - # - # source://parallel//lib/parallel.rb#139 - def pack(item, index); end - - # source://parallel//lib/parallel.rb#129 - def size; end - - # unpack item that is sent to workers - # - # source://parallel//lib/parallel.rb#144 - def unpack(data); end - - private - - # @return [Boolean] - # - # source://parallel//lib/parallel.rb#150 - def producer?; end - - # source://parallel//lib/parallel.rb#154 - def queue_wrapper(array); end -end - -# source://parallel//lib/parallel.rb#23 -class Parallel::Kill < ::Parallel::Break; end - -# TODO: inline this method into parallel.rb and kill physical_processor_count in next major release -# -# source://parallel//lib/parallel/processor_count.rb#4 -module Parallel::ProcessorCount - # Number of physical processor cores on the current system. - # - # source://parallel//lib/parallel/processor_count.rb#12 - def physical_processor_count; end - - # Number of processors seen by the OS, used for process scheduling - # - # source://parallel//lib/parallel/processor_count.rb#6 - def processor_count; end -end - -# source://parallel//lib/parallel.rb#9 -Parallel::Stop = T.let(T.unsafe(nil), Object) - -# source://parallel//lib/parallel.rb#26 -class Parallel::UndumpableException < ::StandardError - # @return [UndumpableException] a new instance of UndumpableException - # - # source://parallel//lib/parallel.rb#29 - def initialize(original); end - - # Returns the value of attribute backtrace. - # - # source://parallel//lib/parallel.rb#27 - def backtrace; end -end - -# source://parallel//lib/parallel.rb#159 -class Parallel::UserInterruptHandler - class << self - # source://parallel//lib/parallel.rb#184 - def kill(thing); end - - # kill all these pids or threads if user presses Ctrl+c - # - # source://parallel//lib/parallel.rb#164 - def kill_on_ctrl_c(pids, options); end - - private - - # source://parallel//lib/parallel.rb#208 - def restore_interrupt(old, signal); end - - # source://parallel//lib/parallel.rb#193 - def trap_interrupt(signal); end - end -end - -# source://parallel//lib/parallel.rb#160 -Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol) - -# source://parallel//lib/parallel/version.rb#3 -Parallel::VERSION = T.let(T.unsafe(nil), String) - -# source://parallel//lib/parallel/version.rb#3 -Parallel::Version = T.let(T.unsafe(nil), String) - -# source://parallel//lib/parallel.rb#54 -class Parallel::Worker - # @return [Worker] a new instance of Worker - # - # source://parallel//lib/parallel.rb#58 - def initialize(read, write, pid); end - - # might be passed to started_processes and simultaneously closed by another thread - # when running in isolation mode, so we have to check if it is closed before closing - # - # source://parallel//lib/parallel.rb#71 - def close_pipes; end - - # Returns the value of attribute pid. - # - # source://parallel//lib/parallel.rb#55 - def pid; end - - # Returns the value of attribute read. - # - # source://parallel//lib/parallel.rb#55 - def read; end - - # source://parallel//lib/parallel.rb#64 - def stop; end - - # Returns the value of attribute thread. - # - # source://parallel//lib/parallel.rb#56 - def thread; end - - # Sets the attribute thread - # - # @param value the value to set the attribute thread to. - # - # source://parallel//lib/parallel.rb#56 - def thread=(_arg0); end - - # source://parallel//lib/parallel.rb#76 - def work(data); end - - # Returns the value of attribute write. - # - # source://parallel//lib/parallel.rb#55 - def write; end - - private - - # source://parallel//lib/parallel.rb#94 - def wait; end -end diff --git a/sorbet/rbi/gems/parser@3.2.2.0.rbi b/sorbet/rbi/gems/parser@3.3.0.5.rbi similarity index 68% rename from sorbet/rbi/gems/parser@3.2.2.0.rbi rename to sorbet/rbi/gems/parser@3.3.0.5.rbi index b49f29bf..c1008a81 100644 --- a/sorbet/rbi/gems/parser@3.2.2.0.rbi +++ b/sorbet/rbi/gems/parser@3.3.0.5.rbi @@ -7,14 +7,7 @@ # @api public # # source://parser//lib/parser.rb#19 -module Parser - class << self - private - - # source://parser//lib/parser/current.rb#5 - def warn_syntax_deviation(feature, version); end - end -end +module Parser; end # @api public # @@ -663,7 +656,7 @@ end # # @api public # -# source://parser//lib/parser/base.rb#16 +# source://parser//lib/parser/base.rb#29 class Parser::Base < ::Racc::Parser # @api public # @param builder [Parser::Builders::Default] The AST builder to use. @@ -876,7 +869,7 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#243 def initialize; end - # source://parser//lib/parser/builders/default.rb#701 + # source://parser//lib/parser/builders/default.rb#703 def __ENCODING__(__ENCODING__t); end # source://parser//lib/parser/builders/default.rb#348 @@ -885,79 +878,79 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#312 def __LINE__(__LINE__t); end - # source://parser//lib/parser/builders/default.rb#627 + # source://parser//lib/parser/builders/default.rb#622 def accessible(node); end - # source://parser//lib/parser/builders/default.rb#876 + # source://parser//lib/parser/builders/default.rb#878 def alias(alias_t, to, from); end - # source://parser//lib/parser/builders/default.rb#915 + # source://parser//lib/parser/builders/default.rb#917 def arg(name_t); end - # source://parser//lib/parser/builders/default.rb#1005 + # source://parser//lib/parser/builders/default.rb#1007 def arg_expr(expr); end - # source://parser//lib/parser/builders/default.rb#885 + # source://parser//lib/parser/builders/default.rb#887 def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end # source://parser//lib/parser/builders/default.rb#440 def array(begin_t, elements, end_t); end - # source://parser//lib/parser/builders/default.rb#1588 + # source://parser//lib/parser/builders/default.rb#1590 def array_pattern(lbrack_t, elements, rbrack_t); end - # source://parser//lib/parser/builders/default.rb#765 + # source://parser//lib/parser/builders/default.rb#767 def assign(lhs, eql_t, rhs); end - # source://parser//lib/parser/builders/default.rb#710 + # source://parser//lib/parser/builders/default.rb#712 def assignable(node); end # source://parser//lib/parser/builders/default.rb#540 def associate(begin_t, pairs, end_t); end - # source://parser//lib/parser/builders/default.rb#1169 + # source://parser//lib/parser/builders/default.rb#1171 def attr_asgn(receiver, dot_t, selector_t); end - # source://parser//lib/parser/builders/default.rb#617 + # source://parser//lib/parser/builders/default.rb#612 def back_ref(token); end - # source://parser//lib/parser/builders/default.rb#1433 + # source://parser//lib/parser/builders/default.rb#1435 def begin(begin_t, body, end_t); end - # source://parser//lib/parser/builders/default.rb#1375 + # source://parser//lib/parser/builders/default.rb#1377 def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1451 + # source://parser//lib/parser/builders/default.rb#1453 def begin_keyword(begin_t, body, end_t); end - # source://parser//lib/parser/builders/default.rb#1203 + # source://parser//lib/parser/builders/default.rb#1205 def binary_op(receiver, operator_t, arg); end - # source://parser//lib/parser/builders/default.rb#1120 + # source://parser//lib/parser/builders/default.rb#1122 def block(method_call, begin_t, args, body, end_t); end - # source://parser//lib/parser/builders/default.rb#1155 + # source://parser//lib/parser/builders/default.rb#1157 def block_pass(amper_t, arg); end - # source://parser//lib/parser/builders/default.rb#980 + # source://parser//lib/parser/builders/default.rb#982 def blockarg(amper_t, name_t); end - # source://parser//lib/parser/builders/default.rb#1025 + # source://parser//lib/parser/builders/default.rb#1027 def blockarg_expr(amper_t, expr); end - # source://parser//lib/parser/builders/default.rb#1111 + # source://parser//lib/parser/builders/default.rb#1113 def call_lambda(lambda_t); end - # source://parser//lib/parser/builders/default.rb#1094 + # source://parser//lib/parser/builders/default.rb#1096 def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1066 + # source://parser//lib/parser/builders/default.rb#1068 def call_type_for_dot(dot_t); end - # source://parser//lib/parser/builders/default.rb#1308 + # source://parser//lib/parser/builders/default.rb#1310 def case(case_t, expr, when_bodies, else_t, else_body, end_t); end - # source://parser//lib/parser/builders/default.rb#1471 + # source://parser//lib/parser/builders/default.rb#1473 def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end # source://parser//lib/parser/builders/default.rb#343 @@ -966,55 +959,55 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#284 def complex(complex_t); end - # source://parser//lib/parser/builders/default.rb#1421 + # source://parser//lib/parser/builders/default.rb#1423 def compstmt(statements); end - # source://parser//lib/parser/builders/default.rb#1284 + # source://parser//lib/parser/builders/default.rb#1286 def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end - # source://parser//lib/parser/builders/default.rb#1290 + # source://parser//lib/parser/builders/default.rb#1292 def condition_mod(if_true, if_false, cond_t, cond); end - # source://parser//lib/parser/builders/default.rb#684 + # source://parser//lib/parser/builders/default.rb#686 def const(name_t); end - # source://parser//lib/parser/builders/default.rb#696 + # source://parser//lib/parser/builders/default.rb#698 def const_fetch(scope, t_colon2, name_t); end - # source://parser//lib/parser/builders/default.rb#689 + # source://parser//lib/parser/builders/default.rb#691 def const_global(t_colon3, name_t); end - # source://parser//lib/parser/builders/default.rb#761 + # source://parser//lib/parser/builders/default.rb#763 def const_op_assignable(node); end - # source://parser//lib/parser/builders/default.rb#1618 + # source://parser//lib/parser/builders/default.rb#1620 def const_pattern(const, ldelim_t, pattern, rdelim_t); end - # source://parser//lib/parser/builders/default.rb#612 + # source://parser//lib/parser/builders/default.rb#607 def cvar(token); end # source://parser//lib/parser/builders/default.rb#388 def dedent_string(node, dedent_level); end - # source://parser//lib/parser/builders/default.rb#812 + # source://parser//lib/parser/builders/default.rb#814 def def_class(class_t, name, lt_t, superclass, body, end_t); end - # source://parser//lib/parser/builders/default.rb#843 + # source://parser//lib/parser/builders/default.rb#845 def def_endless_method(def_t, name_t, args, assignment_t, body); end - # source://parser//lib/parser/builders/default.rb#861 + # source://parser//lib/parser/builders/default.rb#863 def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end - # source://parser//lib/parser/builders/default.rb#835 + # source://parser//lib/parser/builders/default.rb#837 def def_method(def_t, name_t, args, body, end_t); end - # source://parser//lib/parser/builders/default.rb#825 + # source://parser//lib/parser/builders/default.rb#827 def def_module(module_t, name, body, end_t); end - # source://parser//lib/parser/builders/default.rb#819 + # source://parser//lib/parser/builders/default.rb#821 def def_sclass(class_t, lshft_t, expr, body, end_t); end - # source://parser//lib/parser/builders/default.rb#851 + # source://parser//lib/parser/builders/default.rb#853 def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end # source://parser//lib/parser/builders/default.rb#237 @@ -1026,157 +1019,157 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#265 def false(false_t); end - # source://parser//lib/parser/builders/default.rb#1609 + # source://parser//lib/parser/builders/default.rb#1611 def find_pattern(lbrack_t, elements, rbrack_t); end # source://parser//lib/parser/builders/default.rb#276 def float(float_t); end - # source://parser//lib/parser/builders/default.rb#1329 + # source://parser//lib/parser/builders/default.rb#1331 def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end - # source://parser//lib/parser/builders/default.rb#911 + # source://parser//lib/parser/builders/default.rb#913 def forward_arg(dots_t); end - # source://parser//lib/parser/builders/default.rb#901 + # source://parser//lib/parser/builders/default.rb#903 def forward_only_args(begin_t, dots_t, end_t); end - # source://parser//lib/parser/builders/default.rb#1082 + # source://parser//lib/parser/builders/default.rb#1084 def forwarded_args(dots_t); end - # source://parser//lib/parser/builders/default.rb#1090 + # source://parser//lib/parser/builders/default.rb#1092 def forwarded_kwrestarg(dstar_t); end - # source://parser//lib/parser/builders/default.rb#1086 + # source://parser//lib/parser/builders/default.rb#1088 def forwarded_restarg(star_t); end - # source://parser//lib/parser/builders/default.rb#607 + # source://parser//lib/parser/builders/default.rb#596 def gvar(token); end - # source://parser//lib/parser/builders/default.rb#1582 + # source://parser//lib/parser/builders/default.rb#1584 def hash_pattern(lbrace_t, kwargs, rbrace_t); end - # source://parser//lib/parser/builders/default.rb#597 + # source://parser//lib/parser/builders/default.rb#586 def ident(token); end - # source://parser//lib/parser/builders/default.rb#1498 + # source://parser//lib/parser/builders/default.rb#1500 def if_guard(if_t, if_body); end - # source://parser//lib/parser/builders/default.rb#1477 + # source://parser//lib/parser/builders/default.rb#1479 def in_match(lhs, in_t, rhs); end - # source://parser//lib/parser/builders/default.rb#1492 + # source://parser//lib/parser/builders/default.rb#1494 def in_pattern(in_t, pattern, guard, then_t, body); end - # source://parser//lib/parser/builders/default.rb#1178 + # source://parser//lib/parser/builders/default.rb#1180 def index(receiver, lbrack_t, indexes, rbrack_t); end - # source://parser//lib/parser/builders/default.rb#1192 + # source://parser//lib/parser/builders/default.rb#1194 def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end # source://parser//lib/parser/builders/default.rb#272 def integer(integer_t); end - # source://parser//lib/parser/builders/default.rb#602 + # source://parser//lib/parser/builders/default.rb#591 def ivar(token); end - # source://parser//lib/parser/builders/default.rb#1337 + # source://parser//lib/parser/builders/default.rb#1339 def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#942 + # source://parser//lib/parser/builders/default.rb#944 def kwarg(name_t); end - # source://parser//lib/parser/builders/default.rb#968 + # source://parser//lib/parser/builders/default.rb#970 def kwnilarg(dstar_t, nil_t); end - # source://parser//lib/parser/builders/default.rb#949 + # source://parser//lib/parser/builders/default.rb#951 def kwoptarg(name_t, value); end - # source://parser//lib/parser/builders/default.rb#956 + # source://parser//lib/parser/builders/default.rb#958 def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end # source://parser//lib/parser/builders/default.rb#535 def kwsplat(dstar_t, arg); end - # source://parser//lib/parser/builders/default.rb#1277 + # source://parser//lib/parser/builders/default.rb#1279 def logical_op(type, lhs, op_t, rhs); end - # source://parser//lib/parser/builders/default.rb#1315 + # source://parser//lib/parser/builders/default.rb#1317 def loop(type, keyword_t, cond, do_t, body, end_t); end - # source://parser//lib/parser/builders/default.rb#1320 + # source://parser//lib/parser/builders/default.rb#1322 def loop_mod(type, body, keyword_t, cond); end - # source://parser//lib/parser/builders/default.rb#1632 + # source://parser//lib/parser/builders/default.rb#1634 def match_alt(left, pipe_t, right); end - # source://parser//lib/parser/builders/default.rb#1639 + # source://parser//lib/parser/builders/default.rb#1641 def match_as(value, assoc_t, as); end - # source://parser//lib/parser/builders/default.rb#1518 + # source://parser//lib/parser/builders/default.rb#1520 def match_hash_var(name_t); end - # source://parser//lib/parser/builders/default.rb#1532 + # source://parser//lib/parser/builders/default.rb#1534 def match_hash_var_from_str(begin_t, strings, end_t); end - # source://parser//lib/parser/builders/default.rb#1670 + # source://parser//lib/parser/builders/default.rb#1672 def match_label(label_type, label); end - # source://parser//lib/parser/builders/default.rb#1646 + # source://parser//lib/parser/builders/default.rb#1648 def match_nil_pattern(dstar_t, nil_t); end - # source://parser//lib/parser/builders/default.rb#1225 + # source://parser//lib/parser/builders/default.rb#1227 def match_op(receiver, match_t, arg); end - # source://parser//lib/parser/builders/default.rb#1651 + # source://parser//lib/parser/builders/default.rb#1653 def match_pair(label_type, label, value); end - # source://parser//lib/parser/builders/default.rb#1482 + # source://parser//lib/parser/builders/default.rb#1484 def match_pattern(lhs, match_t, rhs); end - # source://parser//lib/parser/builders/default.rb#1487 + # source://parser//lib/parser/builders/default.rb#1489 def match_pattern_p(lhs, match_t, rhs); end - # source://parser//lib/parser/builders/default.rb#1571 + # source://parser//lib/parser/builders/default.rb#1573 def match_rest(star_t, name_t = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1506 + # source://parser//lib/parser/builders/default.rb#1508 def match_var(name_t); end - # source://parser//lib/parser/builders/default.rb#1614 + # source://parser//lib/parser/builders/default.rb#1616 def match_with_trailing_comma(match, comma_t); end - # source://parser//lib/parser/builders/default.rb#803 + # source://parser//lib/parser/builders/default.rb#805 def multi_assign(lhs, eql_t, rhs); end - # source://parser//lib/parser/builders/default.rb#798 + # source://parser//lib/parser/builders/default.rb#800 def multi_lhs(begin_t, items, end_t); end # source://parser//lib/parser/builders/default.rb#255 def nil(nil_t); end - # source://parser//lib/parser/builders/default.rb#1253 + # source://parser//lib/parser/builders/default.rb#1255 def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#622 + # source://parser//lib/parser/builders/default.rb#617 def nth_ref(token); end - # source://parser//lib/parser/builders/default.rb#897 + # source://parser//lib/parser/builders/default.rb#899 def numargs(max_numparam); end - # source://parser//lib/parser/builders/default.rb#1036 + # source://parser//lib/parser/builders/default.rb#1038 def objc_kwarg(kwname_t, assoc_t, name_t); end - # source://parser//lib/parser/builders/default.rb#1050 + # source://parser//lib/parser/builders/default.rb#1052 def objc_restarg(star_t, name = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1160 + # source://parser//lib/parser/builders/default.rb#1162 def objc_varargs(pair, rest_of_varargs); end - # source://parser//lib/parser/builders/default.rb#772 + # source://parser//lib/parser/builders/default.rb#774 def op_assign(lhs, op_t, rhs); end - # source://parser//lib/parser/builders/default.rb#922 + # source://parser//lib/parser/builders/default.rb#924 def optarg(name_t, eql_t, value); end # source://parser//lib/parser/builders/default.rb#488 @@ -1200,22 +1193,22 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#225 def parser=(_arg0); end - # source://parser//lib/parser/builders/default.rb#1627 + # source://parser//lib/parser/builders/default.rb#1629 def pin(pin_t, var); end - # source://parser//lib/parser/builders/default.rb#1360 + # source://parser//lib/parser/builders/default.rb#1362 def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end - # source://parser//lib/parser/builders/default.rb#1355 + # source://parser//lib/parser/builders/default.rb#1357 def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end - # source://parser//lib/parser/builders/default.rb#990 + # source://parser//lib/parser/builders/default.rb#992 def procarg0(arg); end - # source://parser//lib/parser/builders/default.rb#583 + # source://parser//lib/parser/builders/default.rb#572 def range_exclusive(lhs, dot3_t, rhs); end - # source://parser//lib/parser/builders/default.rb#578 + # source://parser//lib/parser/builders/default.rb#567 def range_inclusive(lhs, dot2_t, rhs); end # source://parser//lib/parser/builders/default.rb#280 @@ -1227,19 +1220,19 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#417 def regexp_options(regopt_t); end - # source://parser//lib/parser/builders/default.rb#1367 + # source://parser//lib/parser/builders/default.rb#1369 def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end - # source://parser//lib/parser/builders/default.rb#931 + # source://parser//lib/parser/builders/default.rb#933 def restarg(star_t, name_t = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1014 + # source://parser//lib/parser/builders/default.rb#1016 def restarg_expr(star_t, expr = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#592 + # source://parser//lib/parser/builders/default.rb#581 def self(token); end - # source://parser//lib/parser/builders/default.rb#973 + # source://parser//lib/parser/builders/default.rb#975 def shadowarg(name_t); end # source://parser//lib/parser/builders/default.rb#445 @@ -1266,7 +1259,7 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#469 def symbols_compose(begin_t, parts, end_t); end - # source://parser//lib/parser/builders/default.rb#1295 + # source://parser//lib/parser/builders/default.rb#1297 def ternary(cond, question_t, if_true, colon_t, if_false); end # source://parser//lib/parser/builders/default.rb#260 @@ -1275,16 +1268,16 @@ class Parser::Builders::Default # source://parser//lib/parser/builders/default.rb#294 def unary_num(unary_t, numeric); end - # source://parser//lib/parser/builders/default.rb#1241 + # source://parser//lib/parser/builders/default.rb#1243 def unary_op(op_t, receiver); end - # source://parser//lib/parser/builders/default.rb#871 + # source://parser//lib/parser/builders/default.rb#873 def undef_method(undef_t, names); end - # source://parser//lib/parser/builders/default.rb#1502 + # source://parser//lib/parser/builders/default.rb#1504 def unless_guard(unless_t, unless_body); end - # source://parser//lib/parser/builders/default.rb#1302 + # source://parser//lib/parser/builders/default.rb#1304 def when(when_t, patterns, then_t, body); end # source://parser//lib/parser/builders/default.rb#455 @@ -1298,184 +1291,184 @@ class Parser::Builders::Default private - # source://parser//lib/parser/builders/default.rb#1809 + # source://parser//lib/parser/builders/default.rb#1821 def arg_name_collides?(this_name, that_name); end - # source://parser//lib/parser/builders/default.rb#2005 + # source://parser//lib/parser/builders/default.rb#2017 def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1979 + # source://parser//lib/parser/builders/default.rb#1991 def binary_op_map(left_e, op_t, right_e); end - # source://parser//lib/parser/builders/default.rb#2107 + # source://parser//lib/parser/builders/default.rb#2119 def block_map(receiver_l, begin_t, end_t); end - # source://parser//lib/parser/builders/default.rb#1784 + # source://parser//lib/parser/builders/default.rb#1796 def check_assignment_to_numparam(name, loc); end - # source://parser//lib/parser/builders/default.rb#1686 + # source://parser//lib/parser/builders/default.rb#1688 def check_condition(cond); end - # source://parser//lib/parser/builders/default.rb#1755 + # source://parser//lib/parser/builders/default.rb#1767 def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1730 + # source://parser//lib/parser/builders/default.rb#1742 def check_duplicate_args(args, map = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1842 + # source://parser//lib/parser/builders/default.rb#1854 def check_duplicate_pattern_key(name, loc); end - # source://parser//lib/parser/builders/default.rb#1832 + # source://parser//lib/parser/builders/default.rb#1844 def check_duplicate_pattern_variable(name, loc); end - # source://parser//lib/parser/builders/default.rb#1824 + # source://parser//lib/parser/builders/default.rb#1836 def check_lvar_name(name, loc); end - # source://parser//lib/parser/builders/default.rb#1799 + # source://parser//lib/parser/builders/default.rb#1811 def check_reserved_for_numparam(name, loc); end - # source://parser//lib/parser/builders/default.rb#2264 + # source://parser//lib/parser/builders/default.rb#2280 def collapse_string_parts?(parts); end - # source://parser//lib/parser/builders/default.rb#1930 + # source://parser//lib/parser/builders/default.rb#1942 def collection_map(begin_t, parts, end_t); end - # source://parser//lib/parser/builders/default.rb#2134 + # source://parser//lib/parser/builders/default.rb#2146 def condition_map(keyword_t, cond_e, begin_t, body_e, else_t, else_e, end_t); end - # source://parser//lib/parser/builders/default.rb#1965 + # source://parser//lib/parser/builders/default.rb#1977 def constant_map(scope, colon2_t, name_t); end - # source://parser//lib/parser/builders/default.rb#2038 + # source://parser//lib/parser/builders/default.rb#2050 def definition_map(keyword_t, operator_t, name_t, end_t); end - # source://parser//lib/parser/builders/default.rb#1871 + # source://parser//lib/parser/builders/default.rb#1883 def delimited_string_map(string_t); end - # source://parser//lib/parser/builders/default.rb#2286 + # source://parser//lib/parser/builders/default.rb#2302 def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#2178 + # source://parser//lib/parser/builders/default.rb#2190 def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end - # source://parser//lib/parser/builders/default.rb#2044 + # source://parser//lib/parser/builders/default.rb#2056 def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end - # source://parser//lib/parser/builders/default.rb#1926 + # source://parser//lib/parser/builders/default.rb#1938 def expr_map(loc); end - # source://parser//lib/parser/builders/default.rb#2159 + # source://parser//lib/parser/builders/default.rb#2171 def for_map(keyword_t, in_t, begin_t, end_t); end - # source://parser//lib/parser/builders/default.rb#2206 + # source://parser//lib/parser/builders/default.rb#2218 def guard_map(keyword_t, guard_body_e); end - # source://parser//lib/parser/builders/default.rb#2096 + # source://parser//lib/parser/builders/default.rb#2108 def index_map(receiver_e, lbrack_t, rbrack_t); end - # source://parser//lib/parser/builders/default.rb#1862 + # source://parser//lib/parser/builders/default.rb#1874 def join_exprs(left_expr, right_expr); end - # source://parser//lib/parser/builders/default.rb#2112 + # source://parser//lib/parser/builders/default.rb#2124 def keyword_map(keyword_t, begin_t, args, end_t); end - # source://parser//lib/parser/builders/default.rb#2129 + # source://parser//lib/parser/builders/default.rb#2141 def keyword_mod_map(pre_e, keyword_t, post_e); end - # source://parser//lib/parser/builders/default.rb#2015 + # source://parser//lib/parser/builders/default.rb#2027 def kwarg_map(name_t, value_e = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#2317 + # source://parser//lib/parser/builders/default.rb#2333 def kwargs?(node); end - # source://parser//lib/parser/builders/default.rb#2281 + # source://parser//lib/parser/builders/default.rb#2297 def loc(token); end - # source://parser//lib/parser/builders/default.rb#2028 + # source://parser//lib/parser/builders/default.rb#2040 def module_definition_map(keyword_t, name_e, operator_t, end_t); end - # source://parser//lib/parser/builders/default.rb#1854 + # source://parser//lib/parser/builders/default.rb#1866 def n(type, children, source_map); end - # source://parser//lib/parser/builders/default.rb#1858 + # source://parser//lib/parser/builders/default.rb#1870 def n0(type, source_map); end # source://parser//lib/parser/builders/default.rb#288 def numeric(kind, token); end - # source://parser//lib/parser/builders/default.rb#1896 + # source://parser//lib/parser/builders/default.rb#1908 def pair_keyword_map(key_t, value_e); end - # source://parser//lib/parser/builders/default.rb#1911 + # source://parser//lib/parser/builders/default.rb#1923 def pair_quoted_map(begin_t, end_t, value_e); end - # source://parser//lib/parser/builders/default.rb#1882 + # source://parser//lib/parser/builders/default.rb#1894 def prefix_string_map(symbol); end - # source://parser//lib/parser/builders/default.rb#1993 + # source://parser//lib/parser/builders/default.rb#2005 def range_map(start_e, op_t, end_e); end - # source://parser//lib/parser/builders/default.rb#1960 + # source://parser//lib/parser/builders/default.rb#1972 def regexp_map(begin_t, end_t, options_e); end - # source://parser//lib/parser/builders/default.rb#2165 + # source://parser//lib/parser/builders/default.rb#2177 def rescue_body_map(keyword_t, exc_list_e, assoc_t, exc_var_e, then_t, compstmt_e); end - # source://parser//lib/parser/builders/default.rb#2307 + # source://parser//lib/parser/builders/default.rb#2323 def rewrite_hash_args_to_kwargs(args); end - # source://parser//lib/parser/builders/default.rb#2078 + # source://parser//lib/parser/builders/default.rb#2090 def send_binary_op_map(lhs_e, selector_t, rhs_e); end - # source://parser//lib/parser/builders/default.rb#2101 + # source://parser//lib/parser/builders/default.rb#2113 def send_index_map(receiver_e, lbrack_t, rbrack_t); end - # source://parser//lib/parser/builders/default.rb#2052 + # source://parser//lib/parser/builders/default.rb#2064 def send_map(receiver_e, dot_t, selector_t, begin_t = T.unsafe(nil), args = T.unsafe(nil), end_t = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#2084 + # source://parser//lib/parser/builders/default.rb#2096 def send_unary_op_map(selector_t, arg_e); end - # source://parser//lib/parser/builders/default.rb#2237 + # source://parser//lib/parser/builders/default.rb#2249 def static_regexp(parts, options); end - # source://parser//lib/parser/builders/default.rb#2257 + # source://parser//lib/parser/builders/default.rb#2269 def static_regexp_node(node); end - # source://parser//lib/parser/builders/default.rb#2220 + # source://parser//lib/parser/builders/default.rb#2232 def static_string(nodes); end - # source://parser//lib/parser/builders/default.rb#1946 + # source://parser//lib/parser/builders/default.rb#1958 def string_map(begin_t, parts, end_t); end - # source://parser//lib/parser/builders/default.rb#2273 + # source://parser//lib/parser/builders/default.rb#2289 def string_value(token); end - # source://parser//lib/parser/builders/default.rb#2154 + # source://parser//lib/parser/builders/default.rb#2166 def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end - # source://parser//lib/parser/builders/default.rb#1867 + # source://parser//lib/parser/builders/default.rb#1879 def token_map(token); end - # source://parser//lib/parser/builders/default.rb#1983 + # source://parser//lib/parser/builders/default.rb#1995 def unary_op_map(op_t, arg_e = T.unsafe(nil)); end - # source://parser//lib/parser/builders/default.rb#1891 + # source://parser//lib/parser/builders/default.rb#1903 def unquoted_map(token); end - # source://parser//lib/parser/builders/default.rb#2295 + # source://parser//lib/parser/builders/default.rb#2311 def validate_definee(definee); end - # source://parser//lib/parser/builders/default.rb#1769 + # source://parser//lib/parser/builders/default.rb#1781 def validate_no_forward_arg_after_restarg(args); end - # source://parser//lib/parser/builders/default.rb#2269 + # source://parser//lib/parser/builders/default.rb#2285 def value(token); end - # source://parser//lib/parser/builders/default.rb#2072 + # source://parser//lib/parser/builders/default.rb#2084 def var_send_map(variable_e); end - # source://parser//lib/parser/builders/default.rb#1975 + # source://parser//lib/parser/builders/default.rb#1987 def variable_map(name_t); end class << self @@ -1671,9 +1664,6 @@ class Parser::CurrentArgStack def top; end end -# source://parser//lib/parser/current.rb#111 -Parser::CurrentRuby = Parser::Ruby32 - # @api private # # source://parser//lib/parser/deprecation.rb#7 @@ -2090,69 +2080,69 @@ class Parser::Lexer protected - # source://parser//lib/parser/lexer-F1.rb#14631 + # source://parser//lib/parser/lexer-F1.rb#14692 def arg_or_cmdarg(cmd_state); end - # source://parser//lib/parser/lexer-F1.rb#14693 + # source://parser//lib/parser/lexer-F1.rb#14754 def check_ambiguous_slash(tm); end - # source://parser//lib/parser/lexer-F1.rb#14655 + # source://parser//lib/parser/lexer-F1.rb#14716 def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14661 + # source://parser//lib/parser/lexer-F1.rb#14722 def e_lbrace; end - # source://parser//lib/parser/lexer-F1.rb#14605 + # source://parser//lib/parser/lexer-F1.rb#14666 def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14714 + # source://parser//lib/parser/lexer-F1.rb#14775 def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14742 + # source://parser//lib/parser/lexer-F1.rb#14803 def emit_colon_with_digits(p, tm, diag_msg); end - # source://parser//lib/parser/lexer-F1.rb#14639 + # source://parser//lib/parser/lexer-F1.rb#14700 def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14651 + # source://parser//lib/parser/lexer-F1.rb#14712 def emit_comment_from_range(p, pe); end - # source://parser//lib/parser/lexer-F1.rb#14621 + # source://parser//lib/parser/lexer-F1.rb#14682 def emit_do(do_block = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14704 + # source://parser//lib/parser/lexer-F1.rb#14765 def emit_global_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14722 + # source://parser//lib/parser/lexer-F1.rb#14783 def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14730 + # source://parser//lib/parser/lexer-F1.rb#14791 def emit_rbrace_rparen_rbrack; end - # source://parser//lib/parser/lexer-F1.rb#14752 + # source://parser//lib/parser/lexer-F1.rb#14813 def emit_singleton_class; end - # source://parser//lib/parser/lexer-F1.rb#14615 + # source://parser//lib/parser/lexer-F1.rb#14676 def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14670 + # source://parser//lib/parser/lexer-F1.rb#14731 def numeric_literal_int; end - # source://parser//lib/parser/lexer-F1.rb#14689 + # source://parser//lib/parser/lexer-F1.rb#14750 def on_newline(p); end - # source://parser//lib/parser/lexer-F1.rb#14601 + # source://parser//lib/parser/lexer-F1.rb#14662 def range(s = T.unsafe(nil), e = T.unsafe(nil)); end - # source://parser//lib/parser/lexer-F1.rb#14592 + # source://parser//lib/parser/lexer-F1.rb#14653 def stack_pop; end - # source://parser//lib/parser/lexer-F1.rb#14597 + # source://parser//lib/parser/lexer-F1.rb#14658 def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end # @return [Boolean] # - # source://parser//lib/parser/lexer-F1.rb#14588 + # source://parser//lib/parser/lexer-F1.rb#14649 def version?(*versions); end class << self @@ -2499,13 +2489,13 @@ end # source://parser//lib/parser/lexer/dedenter.rb#7 Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) -# source://parser//lib/parser/lexer-F1.rb#14799 +# source://parser//lib/parser/lexer-F1.rb#14860 Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) -# source://parser//lib/parser/lexer-F1.rb#14785 +# source://parser//lib/parser/lexer-F1.rb#14846 Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) -# source://parser//lib/parser/lexer-F1.rb#14792 +# source://parser//lib/parser/lexer-F1.rb#14853 Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) # source://parser//lib/parser/lexer-F1.rb#8362 @@ -2513,108 +2503,114 @@ Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) # source://parser//lib/parser/lexer/literal.rb#6 class Parser::Lexer::Literal - # source://parser//lib/parser/lexer/literal.rb#40 + # source://parser//lib/parser/lexer/literal.rb#42 def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end - # source://parser//lib/parser/lexer/literal.rb#114 + # source://parser//lib/parser/lexer/literal.rb#116 def backslash_delimited?; end - # source://parser//lib/parser/lexer/literal.rb#37 + # source://parser//lib/parser/lexer/literal.rb#39 def dedent_level; end - # source://parser//lib/parser/lexer/literal.rb#189 + # source://parser//lib/parser/lexer/literal.rb#191 def end_interp_brace_and_try_closing; end - # source://parser//lib/parser/lexer/literal.rb#216 + # source://parser//lib/parser/lexer/literal.rb#218 def extend_content; end - # source://parser//lib/parser/lexer/literal.rb#220 + # source://parser//lib/parser/lexer/literal.rb#222 def extend_space(ts, te); end - # source://parser//lib/parser/lexer/literal.rb#195 + # source://parser//lib/parser/lexer/literal.rb#197 def extend_string(string, ts, te); end - # source://parser//lib/parser/lexer/literal.rb#202 + # source://parser//lib/parser/lexer/literal.rb#204 def flush_string; end - # source://parser//lib/parser/lexer/literal.rb#102 + # source://parser//lib/parser/lexer/literal.rb#104 def heredoc?; end - # source://parser//lib/parser/lexer/literal.rb#37 + # source://parser//lib/parser/lexer/literal.rb#39 def heredoc_e; end - # source://parser//lib/parser/lexer/literal.rb#166 + # source://parser//lib/parser/lexer/literal.rb#168 def infer_indent_level(line); end - # source://parser//lib/parser/lexer/literal.rb#89 + # source://parser//lib/parser/lexer/literal.rb#91 def interpolate?; end - # source://parser//lib/parser/lexer/literal.rb#122 + # source://parser//lib/parser/lexer/literal.rb#124 def munge_escape?(character); end - # source://parser//lib/parser/lexer/literal.rb#132 + # source://parser//lib/parser/lexer/literal.rb#134 def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end - # source://parser//lib/parser/lexer/literal.rb#106 + # source://parser//lib/parser/lexer/literal.rb#108 def plain_heredoc?; end - # source://parser//lib/parser/lexer/literal.rb#98 + # source://parser//lib/parser/lexer/literal.rb#100 def regexp?; end - # source://parser//lib/parser/lexer/literal.rb#38 + # source://parser//lib/parser/lexer/literal.rb#40 def saved_herebody_s; end - # source://parser//lib/parser/lexer/literal.rb#38 + # source://parser//lib/parser/lexer/literal.rb#40 def saved_herebody_s=(_arg0); end - # source://parser//lib/parser/lexer/literal.rb#110 + # source://parser//lib/parser/lexer/literal.rb#112 def squiggly_heredoc?; end - # source://parser//lib/parser/lexer/literal.rb#185 + # source://parser//lib/parser/lexer/literal.rb#187 def start_interp_brace; end - # source://parser//lib/parser/lexer/literal.rb#37 + # source://parser//lib/parser/lexer/literal.rb#39 def str_s; end - # source://parser//lib/parser/lexer/literal.rb#230 + # source://parser//lib/parser/lexer/literal.rb#232 def supports_line_continuation_via_slash?; end - # source://parser//lib/parser/lexer/literal.rb#118 + # source://parser//lib/parser/lexer/literal.rb#120 def type; end - # source://parser//lib/parser/lexer/literal.rb#93 + # source://parser//lib/parser/lexer/literal.rb#95 def words?; end protected - # source://parser//lib/parser/lexer/literal.rb#248 + # source://parser//lib/parser/lexer/literal.rb#263 def clear_buffer; end - # source://parser//lib/parser/lexer/literal.rb#244 + # source://parser//lib/parser/lexer/literal.rb#259 def coerce_encoding(string); end - # source://parser//lib/parser/lexer/literal.rb#236 + # source://parser//lib/parser/lexer/literal.rb#238 def delimiter?(delimiter); end - # source://parser//lib/parser/lexer/literal.rb#264 + # source://parser//lib/parser/lexer/literal.rb#279 def emit(token, type, s, e); end - # source://parser//lib/parser/lexer/literal.rb#259 + # source://parser//lib/parser/lexer/literal.rb#274 def emit_start_tok; end end # source://parser//lib/parser/lexer/literal.rb#7 Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) +# source://parser//lib/parser/lexer/literal.rb#8 +Parser::Lexer::Literal::SPACE = T.let(T.unsafe(nil), Integer) + # source://parser//lib/parser/lexer/literal.rb#9 +Parser::Lexer::Literal::TAB = T.let(T.unsafe(nil), Integer) + +# source://parser//lib/parser/lexer/literal.rb#11 Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) # Mapping of strings to parser tokens. # -# source://parser//lib/parser/lexer-F1.rb#14759 +# source://parser//lib/parser/lexer-F1.rb#14820 Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) -# source://parser//lib/parser/lexer-F1.rb#14779 +# source://parser//lib/parser/lexer-F1.rb#14840 Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) # source://parser//lib/parser/lexer/stack_state.rb#5 @@ -3200,7 +3196,7 @@ Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) # @api private # -# source://parser//lib/parser/messages.rb#107 +# source://parser//lib/parser/messages.rb#112 module Parser::Messages class << self # Formats the message, returns a raw template if there's nothing to interpolate @@ -3210,7 +3206,7 @@ module Parser::Messages # # @api private # - # source://parser//lib/parser/messages.rb#114 + # source://parser//lib/parser/messages.rb#119 def compile(reason, arguments); end end end @@ -3234,7 +3230,7 @@ Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) # @api public # @deprecated Use {Parser::TreeRewriter} # -# source://parser//lib/parser/rewriter.rb#14 +# source://parser//lib/parser/rewriter.rb#22 class Parser::Rewriter < ::Parser::AST::Processor extend ::Parser::Deprecation @@ -3315,2027 +3311,235 @@ end # source://parser//lib/parser/rewriter.rb#91 Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) -# source://parser//lib/parser/ruby32.rb#14 -class Parser::Ruby32 < ::Parser::Base - # reduce 0 omitted - # - # source://parser//lib/parser/ruby32.rb#8419 - def _reduce_1(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8473 - def _reduce_10(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9108 - def _reduce_100(val, _values, result); end +# @api public +# +# source://parser//lib/parser.rb#30 +module Parser::Source; end - # reduce 101 omitted +# A buffer with source code. {Buffer} contains the source code itself, +# associated location information (name and first line), and takes care +# of encoding. +# +# A source buffer is immutable once populated. +# +# @api public +# +# source://parser//lib/parser/source/buffer.rb#25 +class Parser::Source::Buffer + # @api public + # @return [Buffer] a new instance of Buffer # - # source://parser//lib/parser/ruby32.rb#9117 - def _reduce_102(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9123 - def _reduce_103(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9129 - def _reduce_104(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9135 - def _reduce_105(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9141 - def _reduce_106(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9147 - def _reduce_107(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9153 - def _reduce_108(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9159 - def _reduce_109(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8479 - def _reduce_11(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9165 - def _reduce_110(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9175 - def _reduce_111(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9181 - def _reduce_112(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9191 - def _reduce_113(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9198 - def _reduce_114(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9205 - def _reduce_115(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9211 - def _reduce_116(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9217 - def _reduce_117(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9223 - def _reduce_118(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9229 - def _reduce_119(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8496 - def _reduce_12(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9235 - def _reduce_120(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9241 - def _reduce_121(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9247 - def _reduce_122(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9254 - def _reduce_123(val, _values, result); end + # source://parser//lib/parser/source/buffer.rb#105 + def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end - # source://parser//lib/parser/ruby32.rb#9261 - def _reduce_124(val, _values, result); end + # Convert a character index into the source to a column number. + # + # @api private + # @param position [Integer] + # @return [Integer] column + # + # source://parser//lib/parser/source/buffer.rb#242 + def column_for_position(position); end - # source://parser//lib/parser/ruby32.rb#9267 - def _reduce_125(val, _values, result); end + # Convert a character index into the source to a `[line, column]` tuple. + # + # @api public + # @param position [Integer] + # @return [[Integer, Integer]] `[line, column]` + # + # source://parser//lib/parser/source/buffer.rb#217 + def decompose_position(position); end - # reduce 126 omitted + # First line of the buffer, 1 by default. + # + # @api public + # @return [Integer] first line # - # source://parser//lib/parser/ruby32.rb#9275 - def _reduce_127(val, _values, result); end + # source://parser//lib/parser/source/buffer.rb#26 + def first_line; end - # source://parser//lib/parser/ruby32.rb#9281 - def _reduce_128(val, _values, result); end + # @api public + # + # source://parser//lib/parser/source/buffer.rb#312 + def freeze; end - # source://parser//lib/parser/ruby32.rb#9287 - def _reduce_129(val, _values, result); end + # @api public + # + # source://parser//lib/parser/source/buffer.rb#318 + def inspect; end - # source://parser//lib/parser/ruby32.rb#8502 - def _reduce_13(val, _values, result); end + # Number of last line in the buffer + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/buffer.rb#307 + def last_line; end - # reduce 134 omitted + # Convert a character index into the source to a line number. + # + # @api private + # @param position [Integer] + # @return [Integer] line # - # source://parser//lib/parser/ruby32.rb#9303 - def _reduce_135(val, _values, result); end + # source://parser//lib/parser/source/buffer.rb#231 + def line_for_position(position); end - # reduce 136 omitted + # Extract line `lineno` as a new `Range`, taking `first_line` into account. + # + # @api public + # @param lineno [Integer] + # @raise [IndexError] if `lineno` is out of bounds + # @return [Range] # - # source://parser//lib/parser/ruby32.rb#9311 - def _reduce_137(val, _values, result); end + # source://parser//lib/parser/source/buffer.rb#284 + def line_range(lineno); end - # source://parser//lib/parser/ruby32.rb#9317 - def _reduce_138(val, _values, result); end + # Buffer name. If the buffer was created from a file, the name corresponds + # to relative path to the file. + # + # @api public + # @return [String] buffer name + # + # source://parser//lib/parser/source/buffer.rb#26 + def name; end - # source://parser//lib/parser/ruby32.rb#9323 - def _reduce_139(val, _values, result); end + # Populate this buffer from a string without encoding autodetection. + # + # @api public + # @param input [String] + # @raise [ArgumentError] if already populated + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#180 + def raw_source=(input); end - # source://parser//lib/parser/ruby32.rb#8508 - def _reduce_14(val, _values, result); end + # Populate this buffer from correspondingly named file. + # + # @api public + # @example + # Parser::Source::Buffer.new('foo/bar.rb').read + # @raise [ArgumentError] if already populated + # @return [Buffer] self + # + # source://parser//lib/parser/source/buffer.rb#131 + def read; end - # source://parser//lib/parser/ruby32.rb#8514 - def _reduce_15(val, _values, result); end + # @api public + # + # source://parser//lib/parser/source/buffer.rb#194 + def slice(start, length = T.unsafe(nil)); end - # source://parser//lib/parser/ruby32.rb#8520 - def _reduce_16(val, _values, result); end + # Source code contained in this buffer. + # + # @api public + # @raise [RuntimeError] if buffer is not populated yet + # @return [String] source code + # + # source://parser//lib/parser/source/buffer.rb#145 + def source; end - # reduce 17 omitted + # Populate this buffer from a string with encoding autodetection. + # `input` is mutated if not frozen. + # + # @api public + # @param input [String] + # @raise [ArgumentError] if already populated + # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding + # @return [String] # - # source://parser//lib/parser/ruby32.rb#8528 - def _reduce_18(val, _values, result); end + # source://parser//lib/parser/source/buffer.rb#162 + def source=(input); end - # source://parser//lib/parser/ruby32.rb#8534 - def _reduce_19(val, _values, result); end + # Extract line `lineno` from source, taking `first_line` into account. + # + # @api public + # @param lineno [Integer] + # @raise [IndexError] if `lineno` is out of bounds + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#273 + def source_line(lineno); end - # source://parser//lib/parser/ruby32.rb#8426 - def _reduce_2(val, _values, result); end + # Return an `Array` of source code lines. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/source/buffer.rb#252 + def source_lines; end - # source://parser//lib/parser/ruby32.rb#8540 - def _reduce_20(val, _values, result); end + # @api public + # @return [Range] A range covering the whole source + # + # source://parser//lib/parser/source/buffer.rb#298 + def source_range; end - # source://parser//lib/parser/ruby32.rb#8546 - def _reduce_21(val, _values, result); end + private - # reduce 210 omitted + # @api public # - # source://parser//lib/parser/ruby32.rb#9471 - def _reduce_211(val, _values, result); end + # source://parser//lib/parser/source/buffer.rb#348 + def bsearch(line_begins, position); end - # source://parser//lib/parser/ruby32.rb#9477 - def _reduce_212(val, _values, result); end + # @api public + # + # source://parser//lib/parser/source/buffer.rb#325 + def line_begins; end - # source://parser//lib/parser/ruby32.rb#9483 - def _reduce_213(val, _values, result); end + # @api public + # + # source://parser//lib/parser/source/buffer.rb#339 + def line_index_for_position(position); end - # source://parser//lib/parser/ruby32.rb#9492 - def _reduce_214(val, _values, result); end + class << self + # Try to recognize encoding of `string` as Ruby would, i.e. by looking for + # magic encoding comment or UTF-8 BOM. `string` can be in any encoding. + # + # @api public + # @param string [String] + # @return [String, nil] encoding name, if recognized + # + # source://parser//lib/parser/source/buffer.rb#51 + def recognize_encoding(string); end - # source://parser//lib/parser/ruby32.rb#9501 - def _reduce_215(val, _values, result); end + # Recognize encoding of `input` and process it so it could be lexed. + # + # * If `input` does not contain BOM or magic encoding comment, it is + # kept in the original encoding. + # * If the detected encoding is binary, `input` is kept in binary. + # * Otherwise, `input` is re-encoded into UTF-8 and returned as a + # new string. + # + # This method mutates the encoding of `input`, but not its content. + # + # @api public + # @param input [String] + # @raise [EncodingError] + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#90 + def reencode_string(input); end + end +end - # source://parser//lib/parser/ruby32.rb#9510 - def _reduce_216(val, _values, result); end +# @api private +# +# source://parser//lib/parser/source/buffer.rb#31 +Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) - # source://parser//lib/parser/ruby32.rb#9519 - def _reduce_217(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9527 - def _reduce_218(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9535 - def _reduce_219(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8554 - def _reduce_22(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9541 - def _reduce_220(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9547 - def _reduce_221(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9553 - def _reduce_222(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9559 - def _reduce_223(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9565 - def _reduce_224(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9571 - def _reduce_225(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9577 - def _reduce_226(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9583 - def _reduce_227(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9589 - def _reduce_228(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9595 - def _reduce_229(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8562 - def _reduce_23(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9601 - def _reduce_230(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9607 - def _reduce_231(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9613 - def _reduce_232(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9621 - def _reduce_233(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9627 - def _reduce_234(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9633 - def _reduce_235(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9639 - def _reduce_236(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9645 - def _reduce_237(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9651 - def _reduce_238(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8568 - def _reduce_24(val, _values, result); end - - # reduce 239 omitted - # - # source://parser//lib/parser/ruby32.rb#9659 - def _reduce_240(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9665 - def _reduce_241(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9671 - def _reduce_242(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9677 - def _reduce_243(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9683 - def _reduce_244(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9689 - def _reduce_245(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9695 - def _reduce_246(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9701 - def _reduce_247(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9707 - def _reduce_248(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9713 - def _reduce_249(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8574 - def _reduce_25(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9719 - def _reduce_250(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9725 - def _reduce_251(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9731 - def _reduce_252(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9738 - def _reduce_253(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9745 - def _reduce_254(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9759 - def _reduce_255(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9779 - def _reduce_256(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9793 - def _reduce_257(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8581 - def _reduce_26(val, _values, result); end - - # reduce 262 omitted - # - # source://parser//lib/parser/ruby32.rb#9823 - def _reduce_263(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9829 - def _reduce_264(val, _values, result); end - - # reduce 267 omitted - # - # source://parser//lib/parser/ruby32.rb#9841 - def _reduce_268(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9847 - def _reduce_269(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8588 - def _reduce_27(val, _values, result); end - - # reduce 270 omitted - # - # source://parser//lib/parser/ruby32.rb#9855 - def _reduce_271(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9865 - def _reduce_272(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9871 - def _reduce_273(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9881 - def _reduce_274(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9891 - def _reduce_275(val, _values, result); end - - # reduce 276 omitted - # - # source://parser//lib/parser/ruby32.rb#9899 - def _reduce_277(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8594 - def _reduce_28(val, _values, result); end - - # reduce 279 omitted - # - # source://parser//lib/parser/ruby32.rb#9909 - def _reduce_280(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9915 - def _reduce_281(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9921 - def _reduce_282(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9927 - def _reduce_283(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9933 - def _reduce_284(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9940 - def _reduce_285(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9948 - def _reduce_286(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9954 - def _reduce_287(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9981 - def _reduce_288(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10002 - def _reduce_289(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8600 - def _reduce_29(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10008 - def _reduce_290(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10018 - def _reduce_291(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10024 - def _reduce_292(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10030 - def _reduce_293(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10036 - def _reduce_294(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10042 - def _reduce_295(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10052 - def _reduce_296(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10058 - def _reduce_297(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10064 - def _reduce_298(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10074 - def _reduce_299(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8435 - def _reduce_3(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8610 - def _reduce_30(val, _values, result); end - - # reduce 300 omitted - # - # source://parser//lib/parser/ruby32.rb#10082 - def _reduce_301(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10088 - def _reduce_302(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10094 - def _reduce_303(val, _values, result); end - - # reduce 313 omitted - # - # source://parser//lib/parser/ruby32.rb#10120 - def _reduce_314(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10126 - def _reduce_315(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10132 - def _reduce_316(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10140 - def _reduce_317(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10146 - def _reduce_318(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10152 - def _reduce_319(val, _values, result); end - - # reduce 31 omitted - # - # source://parser//lib/parser/ruby32.rb#8618 - def _reduce_32(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10158 - def _reduce_320(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10164 - def _reduce_321(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10170 - def _reduce_322(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10176 - def _reduce_323(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10182 - def _reduce_324(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10188 - def _reduce_325(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10194 - def _reduce_326(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10200 - def _reduce_327(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10206 - def _reduce_328(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10212 - def _reduce_329(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8624 - def _reduce_33(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10218 - def _reduce_330(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10224 - def _reduce_331(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10232 - def _reduce_332(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10238 - def _reduce_333(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10244 - def _reduce_334(val, _values, result); end - - # reduce 335 omitted - # - # source://parser//lib/parser/ruby32.rb#10256 - def _reduce_336(val, _values, result); end - - # reduce 337 omitted - # - # source://parser//lib/parser/ruby32.rb#10266 - def _reduce_338(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10275 - def _reduce_339(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8631 - def _reduce_34(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10284 - def _reduce_340(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10290 - def _reduce_341(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10296 - def _reduce_342(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10306 - def _reduce_343(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10316 - def _reduce_344(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10326 - def _reduce_345(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10332 - def _reduce_346(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10339 - def _reduce_347(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10355 - def _reduce_348(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10363 - def _reduce_349(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8642 - def _reduce_35(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10375 - def _reduce_350(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10382 - def _reduce_351(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10396 - def _reduce_352(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10408 - def _reduce_353(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10420 - def _reduce_354(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10426 - def _reduce_355(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10432 - def _reduce_356(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10438 - def _reduce_357(val, _values, result); end - - # reduce 358 omitted - # - # source://parser//lib/parser/ruby32.rb#10446 - def _reduce_359(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10452 - def _reduce_360(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10458 - def _reduce_361(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10465 - def _reduce_362(val, _values, result); end - - # reduce 364 omitted - # - # source://parser//lib/parser/ruby32.rb#10477 - def _reduce_365(val, _values, result); end - - # reduce 368 omitted - # - # source://parser//lib/parser/ruby32.rb#10489 - def _reduce_369(val, _values, result); end - - # reduce 36 omitted - # - # source://parser//lib/parser/ruby32.rb#8650 - def _reduce_37(val, _values, result); end - - # reduce 370 omitted - # - # source://parser//lib/parser/ruby32.rb#10502 - def _reduce_371(val, _values, result); end - - # reduce 373 omitted - # - # source://parser//lib/parser/ruby32.rb#10512 - def _reduce_374(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10518 - def _reduce_375(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10524 - def _reduce_376(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10530 - def _reduce_377(val, _values, result); end - - # reduce 378 omitted - # - # source://parser//lib/parser/ruby32.rb#10538 - def _reduce_379(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8656 - def _reduce_38(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10545 - def _reduce_380(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10553 - def _reduce_381(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10559 - def _reduce_382(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10565 - def _reduce_383(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10571 - def _reduce_384(val, _values, result); end - - # reduce 386 omitted - # - # source://parser//lib/parser/ruby32.rb#10581 - def _reduce_387(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10587 - def _reduce_388(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10593 - def _reduce_389(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8662 - def _reduce_39(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10599 - def _reduce_390(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10605 - def _reduce_391(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10611 - def _reduce_392(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10617 - def _reduce_393(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10623 - def _reduce_394(val, _values, result); end - - # reduce 395 omitted - # - # source://parser//lib/parser/ruby32.rb#10631 - def _reduce_396(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10640 - def _reduce_397(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10650 - def _reduce_398(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10658 - def _reduce_399(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8441 - def _reduce_4(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8671 - def _reduce_40(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10667 - def _reduce_400(val, _values, result); end - - # reduce 401 omitted - # - # source://parser//lib/parser/ruby32.rb#10677 - def _reduce_402(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10686 - def _reduce_403(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10696 - def _reduce_404(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10704 - def _reduce_405(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10713 - def _reduce_406(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10720 - def _reduce_407(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10728 - def _reduce_408(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10735 - def _reduce_409(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8680 - def _reduce_41(val, _values, result); end - - # reduce 410 omitted - # - # source://parser//lib/parser/ruby32.rb#10745 - def _reduce_411(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10751 - def _reduce_412(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10757 - def _reduce_413(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10766 - def _reduce_414(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10775 - def _reduce_415(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10781 - def _reduce_416(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10787 - def _reduce_417(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10793 - def _reduce_418(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10799 - def _reduce_419(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8689 - def _reduce_42(val, _values, result); end - - # reduce 420 omitted - # - # source://parser//lib/parser/ruby32.rb#10808 - def _reduce_421(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10817 - def _reduce_422(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10823 - def _reduce_423(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10839 - def _reduce_424(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10847 - def _reduce_425(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10857 - def _reduce_426(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10864 - def _reduce_427(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10871 - def _reduce_428(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10878 - def _reduce_429(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8697 - def _reduce_43(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10885 - def _reduce_430(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10892 - def _reduce_431(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10899 - def _reduce_432(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10907 - def _reduce_433(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10915 - def _reduce_434(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10927 - def _reduce_435(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10938 - def _reduce_436(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10946 - def _reduce_437(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10954 - def _reduce_438(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10962 - def _reduce_439(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8706 - def _reduce_44(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10968 - def _reduce_440(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10976 - def _reduce_441(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10984 - def _reduce_442(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10992 - def _reduce_443(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#10998 - def _reduce_444(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11004 - def _reduce_445(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11011 - def _reduce_446(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11018 - def _reduce_447(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11025 - def _reduce_448(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11032 - def _reduce_449(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8720 - def _reduce_45(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11039 - def _reduce_450(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11049 - def _reduce_451(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11056 - def _reduce_452(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11062 - def _reduce_453(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11073 - def _reduce_454(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11080 - def _reduce_455(val, _values, result); end - - # reduce 456 omitted - # - # source://parser//lib/parser/ruby32.rb#11088 - def _reduce_457(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11100 - def _reduce_458(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11108 - def _reduce_459(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8740 - def _reduce_46(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11115 - def _reduce_460(val, _values, result); end - - # reduce 461 omitted - # - # source://parser//lib/parser/ruby32.rb#11123 - def _reduce_462(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11129 - def _reduce_463(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11135 - def _reduce_464(val, _values, result); end - - # reduce 465 omitted - # - # source://parser//lib/parser/ruby32.rb#11143 - def _reduce_466(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11153 - def _reduce_467(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11159 - def _reduce_468(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11165 - def _reduce_469(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8754 - def _reduce_47(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11171 - def _reduce_470(val, _values, result); end - - # reduce 471 omitted - # - # source://parser//lib/parser/ruby32.rb#11179 - def _reduce_472(val, _values, result); end - - # reduce 473 omitted - # - # source://parser//lib/parser/ruby32.rb#11187 - def _reduce_474(val, _values, result); end - - # reduce 475 omitted - # - # source://parser//lib/parser/ruby32.rb#11195 - def _reduce_476(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11202 - def _reduce_477(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8774 - def _reduce_48(val, _values, result); end - - # reduce 479 omitted - # - # source://parser//lib/parser/ruby32.rb#11213 - def _reduce_480(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11221 - def _reduce_481(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11229 - def _reduce_482(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11237 - def _reduce_483(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11244 - def _reduce_484(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11252 - def _reduce_485(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11260 - def _reduce_486(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11268 - def _reduce_487(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11275 - def _reduce_488(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11281 - def _reduce_489(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11287 - def _reduce_490(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11293 - def _reduce_491(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11301 - def _reduce_492(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11309 - def _reduce_493(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11315 - def _reduce_494(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11321 - def _reduce_495(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11328 - def _reduce_496(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11334 - def _reduce_497(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11340 - def _reduce_498(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11346 - def _reduce_499(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8447 - def _reduce_5(val, _values, result); end - - # reduce 49 omitted - # - # source://parser//lib/parser/ruby32.rb#8782 - def _reduce_50(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11352 - def _reduce_500(val, _values, result); end - - # reduce 501 omitted - # - # source://parser//lib/parser/ruby32.rb#11360 - def _reduce_502(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11370 - def _reduce_503(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11380 - def _reduce_504(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11386 - def _reduce_505(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11392 - def _reduce_506(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11398 - def _reduce_507(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11404 - def _reduce_508(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11410 - def _reduce_509(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11416 - def _reduce_510(val, _values, result); end - - # reduce 511 omitted - # - # source://parser//lib/parser/ruby32.rb#11424 - def _reduce_512(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11430 - def _reduce_513(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11436 - def _reduce_514(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11442 - def _reduce_515(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11448 - def _reduce_516(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11454 - def _reduce_517(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11460 - def _reduce_518(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11466 - def _reduce_519(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11472 - def _reduce_520(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11478 - def _reduce_521(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11484 - def _reduce_522(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11490 - def _reduce_523(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11496 - def _reduce_524(val, _values, result); end - - # reduce 525 omitted - # - # source://parser//lib/parser/ruby32.rb#11504 - def _reduce_526(val, _values, result); end - - # reduce 527 omitted - # - # source://parser//lib/parser/ruby32.rb#11512 - def _reduce_528(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11518 - def _reduce_529(val, _values, result); end - - # reduce 52 omitted - # - # source://parser//lib/parser/ruby32.rb#8796 - def _reduce_53(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11524 - def _reduce_530(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11530 - def _reduce_531(val, _values, result); end - - # reduce 534 omitted - # - # source://parser//lib/parser/ruby32.rb#11542 - def _reduce_535(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11548 - def _reduce_536(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8802 - def _reduce_54(val, _values, result); end - - # reduce 544 omitted - # - # source://parser//lib/parser/ruby32.rb#11570 - def _reduce_545(val, _values, result); end - - # reduce 546 omitted - # - # source://parser//lib/parser/ruby32.rb#11578 - def _reduce_547(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11584 - def _reduce_548(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11596 - def _reduce_549(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8808 - def _reduce_55(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11603 - def _reduce_550(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11610 - def _reduce_551(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11616 - def _reduce_552(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11622 - def _reduce_553(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11628 - def _reduce_554(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11643 - def _reduce_555(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11649 - def _reduce_556(val, _values, result); end - - # reduce 558 omitted - # - # source://parser//lib/parser/ruby32.rb#11659 - def _reduce_559(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8814 - def _reduce_56(val, _values, result); end - - # reduce 560 omitted - # - # source://parser//lib/parser/ruby32.rb#11667 - def _reduce_561(val, _values, result); end - - # reduce 564 omitted - # - # source://parser//lib/parser/ruby32.rb#11679 - def _reduce_565(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11685 - def _reduce_566(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11691 - def _reduce_567(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11697 - def _reduce_568(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11704 - def _reduce_569(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8820 - def _reduce_57(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11711 - def _reduce_570(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11717 - def _reduce_571(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11724 - def _reduce_572(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11731 - def _reduce_573(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11737 - def _reduce_574(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11743 - def _reduce_575(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11749 - def _reduce_576(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11755 - def _reduce_577(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11761 - def _reduce_578(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11767 - def _reduce_579(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8832 - def _reduce_58(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11773 - def _reduce_580(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11779 - def _reduce_581(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11785 - def _reduce_582(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11791 - def _reduce_583(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11797 - def _reduce_584(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11803 - def _reduce_585(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11809 - def _reduce_586(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11815 - def _reduce_587(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11821 - def _reduce_588(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11827 - def _reduce_589(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8841 - def _reduce_59(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11833 - def _reduce_590(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11839 - def _reduce_591(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11845 - def _reduce_592(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11851 - def _reduce_593(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11857 - def _reduce_594(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11863 - def _reduce_595(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11870 - def _reduce_596(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11879 - def _reduce_597(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11885 - def _reduce_598(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11891 - def _reduce_599(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8453 - def _reduce_6(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8853 - def _reduce_60(val, _values, result); end - - # reduce 602 omitted - # - # source://parser//lib/parser/ruby32.rb#11903 - def _reduce_603(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11910 - def _reduce_604(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11917 - def _reduce_605(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11923 - def _reduce_606(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11934 - def _reduce_607(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11941 - def _reduce_608(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11948 - def _reduce_609(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11955 - def _reduce_610(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11962 - def _reduce_611(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11968 - def _reduce_612(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11974 - def _reduce_613(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11980 - def _reduce_614(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#11986 - def _reduce_615(val, _values, result); end - - # reduce 616 omitted - # - # source://parser//lib/parser/ruby32.rb#11994 - def _reduce_617(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12000 - def _reduce_618(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12006 - def _reduce_619(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12012 - def _reduce_620(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12018 - def _reduce_621(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12024 - def _reduce_622(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12030 - def _reduce_623(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12036 - def _reduce_624(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12042 - def _reduce_625(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12048 - def _reduce_626(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12054 - def _reduce_627(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12060 - def _reduce_628(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12066 - def _reduce_629(val, _values, result); end - - # reduce 62 omitted - # - # source://parser//lib/parser/ruby32.rb#8866 - def _reduce_63(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12072 - def _reduce_630(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12078 - def _reduce_631(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12084 - def _reduce_632(val, _values, result); end - - # reduce 633 omitted - # - # source://parser//lib/parser/ruby32.rb#12092 - def _reduce_634(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12099 - def _reduce_635(val, _values, result); end - - # reduce 636 omitted - # - # source://parser//lib/parser/ruby32.rb#12110 - def _reduce_637(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12118 - def _reduce_638(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12126 - def _reduce_639(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8872 - def _reduce_64(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12132 - def _reduce_640(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12138 - def _reduce_641(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12144 - def _reduce_642(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12150 - def _reduce_643(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12157 - def _reduce_644(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12163 - def _reduce_645(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12169 - def _reduce_646(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12178 - def _reduce_647(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12188 - def _reduce_648(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12196 - def _reduce_649(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8879 - def _reduce_65(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12205 - def _reduce_650(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12213 - def _reduce_651(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12222 - def _reduce_652(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12229 - def _reduce_653(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12237 - def _reduce_654(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12246 - def _reduce_655(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12253 - def _reduce_656(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12261 - def _reduce_657(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12268 - def _reduce_658(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12276 - def _reduce_659(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8889 - def _reduce_66(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12282 - def _reduce_660(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12288 - def _reduce_661(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12294 - def _reduce_662(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12300 - def _reduce_663(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12306 - def _reduce_664(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12312 - def _reduce_665(val, _values, result); end - - # reduce 666 omitted - # - # source://parser//lib/parser/ruby32.rb#12320 - def _reduce_667(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12330 - def _reduce_668(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12337 - def _reduce_669(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8895 - def _reduce_67(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12344 - def _reduce_670(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12350 - def _reduce_671(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12356 - def _reduce_672(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12362 - def _reduce_673(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12377 - def _reduce_674(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12385 - def _reduce_675(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12393 - def _reduce_676(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12400 - def _reduce_677(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12407 - def _reduce_678(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12413 - def _reduce_679(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8902 - def _reduce_68(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12419 - def _reduce_680(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12425 - def _reduce_681(val, _values, result); end - - # reduce 683 omitted - # - # source://parser//lib/parser/ruby32.rb#12435 - def _reduce_684(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12441 - def _reduce_685(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12449 - def _reduce_686(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12457 - def _reduce_687(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12465 - def _reduce_688(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12473 - def _reduce_689(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12479 - def _reduce_690(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12485 - def _reduce_691(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12491 - def _reduce_692(val, _values, result); end - - # reduce 694 omitted - # - # source://parser//lib/parser/ruby32.rb#12501 - def _reduce_695(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12509 - def _reduce_696(val, _values, result); end - - # reduce 698 omitted - # - # source://parser//lib/parser/ruby32.rb#12521 - def _reduce_699(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8459 - def _reduce_7(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12529 - def _reduce_700(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12537 - def _reduce_701(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12543 - def _reduce_702(val, _values, result); end - - # reduce 703 omitted - # - # source://parser//lib/parser/ruby32.rb#12551 - def _reduce_704(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12557 - def _reduce_705(val, _values, result); end - - # reduce 706 omitted - # - # source://parser//lib/parser/ruby32.rb#12565 - def _reduce_707(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12571 - def _reduce_708(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12577 - def _reduce_709(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12583 - def _reduce_710(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12589 - def _reduce_711(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12595 - def _reduce_712(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12601 - def _reduce_713(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12607 - def _reduce_714(val, _values, result); end - - # reduce 71 omitted - # - # source://parser//lib/parser/ruby32.rb#8914 - def _reduce_72(val, _values, result); end - - # reduce 724 omitted - # - # source://parser//lib/parser/ruby32.rb#12637 - def _reduce_725(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12643 - def _reduce_726(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8921 - def _reduce_73(val, _values, result); end - - # reduce 730 omitted - # - # source://parser//lib/parser/ruby32.rb#12657 - def _reduce_731(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12663 - def _reduce_732(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12669 - def _reduce_733(val, _values, result); end - - # reduce 735 omitted - # - # source://parser//lib/parser/ruby32.rb#12679 - def _reduce_736(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8928 - def _reduce_74(val, _values, result); end - - # reduce 739 omitted - # - # source://parser//lib/parser/ruby32.rb#12691 - def _reduce_740(val, _values, result); end - - # reduce 75 omitted - # - # source://parser//lib/parser/ruby32.rb#8937 - def _reduce_76(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8944 - def _reduce_77(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8955 - def _reduce_78(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8962 - def _reduce_79(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8973 - def _reduce_80(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8980 - def _reduce_81(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8991 - def _reduce_82(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#8998 - def _reduce_83(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9005 - def _reduce_84(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9012 - def _reduce_85(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9019 - def _reduce_86(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9026 - def _reduce_87(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9032 - def _reduce_88(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9038 - def _reduce_89(val, _values, result); end - - # reduce 8 omitted - # - # source://parser//lib/parser/ruby32.rb#8467 - def _reduce_9(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9044 - def _reduce_90(val, _values, result); end - - # reduce 91 omitted - # - # source://parser//lib/parser/ruby32.rb#9052 - def _reduce_92(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9059 - def _reduce_93(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9066 - def _reduce_94(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9074 - def _reduce_95(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9081 - def _reduce_96(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9089 - def _reduce_97(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9095 - def _reduce_98(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#9102 - def _reduce_99(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#12697 - def _reduce_none(val, _values, result); end - - # source://parser//lib/parser/ruby32.rb#21 - def default_encoding; end - - # source://parser//lib/parser/ruby32.rb#25 - def endless_method_name(name_t); end - - # source://parser//lib/parser/ruby32.rb#38 - def local_pop; end - - # source://parser//lib/parser/ruby32.rb#31 - def local_push; end - - # source://parser//lib/parser/ruby32.rb#45 - def try_declare_numparam(node); end - - # source://parser//lib/parser/ruby32.rb#17 - def version; end -end - -# source://parser//lib/parser/ruby32.rb#8008 -Parser::Ruby32::Racc_arg = T.let(T.unsafe(nil), Array) - -# source://parser//lib/parser/ruby32.rb#8413 -Parser::Ruby32::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) - -# source://parser//lib/parser/ruby32.rb#8024 -Parser::Ruby32::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) - -# @api public -# -# source://parser//lib/parser.rb#30 -module Parser::Source; end - -# A buffer with source code. {Buffer} contains the source code itself, -# associated location information (name and first line), and takes care -# of encoding. -# -# A source buffer is immutable once populated. -# -# @api public -# -# source://parser//lib/parser/source/buffer.rb#25 -class Parser::Source::Buffer - # @api public - # @return [Buffer] a new instance of Buffer - # - # source://parser//lib/parser/source/buffer.rb#105 - def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end - - # Convert a character index into the source to a column number. - # - # @api private - # @param position [Integer] - # @return [Integer] column - # - # source://parser//lib/parser/source/buffer.rb#242 - def column_for_position(position); end - - # Convert a character index into the source to a `[line, column]` tuple. - # - # @api public - # @param position [Integer] - # @return [[Integer, Integer]] `[line, column]` - # - # source://parser//lib/parser/source/buffer.rb#217 - def decompose_position(position); end - - # First line of the buffer, 1 by default. - # - # @api public - # @return [Integer] first line - # - # source://parser//lib/parser/source/buffer.rb#26 - def first_line; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#312 - def freeze; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#318 - def inspect; end - - # Number of last line in the buffer - # - # @api public - # @return [Integer] - # - # source://parser//lib/parser/source/buffer.rb#307 - def last_line; end - - # Convert a character index into the source to a line number. - # - # @api private - # @param position [Integer] - # @return [Integer] line - # - # source://parser//lib/parser/source/buffer.rb#231 - def line_for_position(position); end - - # Extract line `lineno` as a new `Range`, taking `first_line` into account. - # - # @api public - # @param lineno [Integer] - # @raise [IndexError] if `lineno` is out of bounds - # @return [Range] - # - # source://parser//lib/parser/source/buffer.rb#284 - def line_range(lineno); end - - # Buffer name. If the buffer was created from a file, the name corresponds - # to relative path to the file. - # - # @api public - # @return [String] buffer name - # - # source://parser//lib/parser/source/buffer.rb#26 - def name; end - - # Populate this buffer from a string without encoding autodetection. - # - # @api public - # @param input [String] - # @raise [ArgumentError] if already populated - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#180 - def raw_source=(input); end - - # Populate this buffer from correspondingly named file. - # - # @api public - # @example - # Parser::Source::Buffer.new('foo/bar.rb').read - # @raise [ArgumentError] if already populated - # @return [Buffer] self - # - # source://parser//lib/parser/source/buffer.rb#131 - def read; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#194 - def slice(start, length = T.unsafe(nil)); end - - # Source code contained in this buffer. - # - # @api public - # @raise [RuntimeError] if buffer is not populated yet - # @return [String] source code - # - # source://parser//lib/parser/source/buffer.rb#145 - def source; end - - # Populate this buffer from a string with encoding autodetection. - # `input` is mutated if not frozen. - # - # @api public - # @param input [String] - # @raise [ArgumentError] if already populated - # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#162 - def source=(input); end - - # Extract line `lineno` from source, taking `first_line` into account. - # - # @api public - # @param lineno [Integer] - # @raise [IndexError] if `lineno` is out of bounds - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#273 - def source_line(lineno); end - - # Return an `Array` of source code lines. - # - # @api public - # @return [Array] - # - # source://parser//lib/parser/source/buffer.rb#252 - def source_lines; end - - # @api public - # @return [Range] A range covering the whole source - # - # source://parser//lib/parser/source/buffer.rb#298 - def source_range; end - - private - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#348 - def bsearch(line_begins, position); end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#325 - def line_begins; end - - # @api public - # - # source://parser//lib/parser/source/buffer.rb#339 - def line_index_for_position(position); end - - class << self - # Try to recognize encoding of `string` as Ruby would, i.e. by looking for - # magic encoding comment or UTF-8 BOM. `string` can be in any encoding. - # - # @api public - # @param string [String] - # @return [String, nil] encoding name, if recognized - # - # source://parser//lib/parser/source/buffer.rb#51 - def recognize_encoding(string); end - - # Recognize encoding of `input` and process it so it could be lexed. - # - # * If `input` does not contain BOM or magic encoding comment, it is - # kept in the original encoding. - # * If the detected encoding is binary, `input` is kept in binary. - # * Otherwise, `input` is re-encoded into UTF-8 and returned as a - # new string. - # - # This method mutates the encoding of `input`, but not its content. - # - # @api public - # @param input [String] - # @raise [EncodingError] - # @return [String] - # - # source://parser//lib/parser/source/buffer.rb#90 - def reencode_string(input); end - end -end - -# @api private -# -# source://parser//lib/parser/source/buffer.rb#31 -Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) - -# A comment in the source code. -# -# @api public -# -# source://parser//lib/parser/source/comment.rb#17 -class Parser::Source::Comment - # @api public - # @param range [Parser::Source::Range] - # @return [Comment] a new instance of Comment - # - # source://parser//lib/parser/source/comment.rb#67 - def initialize(range); end +# A comment in the source code. +# +# @api public +# +# source://parser//lib/parser/source/comment.rb#17 +class Parser::Source::Comment + # @api public + # @param range [Parser::Source::Range] + # @return [Comment] a new instance of Comment + # + # source://parser//lib/parser/source/comment.rb#67 + def initialize(range); end # Compares comments. Two comments are equal if they # correspond to the same source range. @@ -5452,7 +3656,7 @@ class Parser::Source::Comment::Associator # source://parser//lib/parser/source/comment/associator.rb#115 def associate_by_identity; end - # source://parser//lib/parser/source/comment/associator.rb#103 + # source://parser//lib/parser/source/comment/associator.rb#104 def associate_locations; end # source://parser//lib/parser/source/comment/associator.rb#46 @@ -7020,10 +5224,10 @@ class Parser::StaticEnvironment # source://parser//lib/parser/static_environment.rb#58 def declare_anonymous_blockarg; end - # source://parser//lib/parser/static_environment.rb#74 + # source://parser//lib/parser/static_environment.rb#82 def declare_anonymous_kwrestarg; end - # source://parser//lib/parser/static_environment.rb#66 + # source://parser//lib/parser/static_environment.rb#70 def declare_anonymous_restarg; end # source://parser//lib/parser/static_environment.rb#50 @@ -7041,12 +5245,12 @@ class Parser::StaticEnvironment # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#78 + # source://parser//lib/parser/static_environment.rb#86 def declared_anonymous_kwrestarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#70 + # source://parser//lib/parser/static_environment.rb#74 def declared_anonymous_restarg?; end # @return [Boolean] @@ -7056,7 +5260,7 @@ class Parser::StaticEnvironment # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#82 + # source://parser//lib/parser/static_environment.rb#94 def empty?; end # source://parser//lib/parser/static_environment.rb#27 @@ -7065,6 +5269,21 @@ class Parser::StaticEnvironment # source://parser//lib/parser/static_environment.rb#20 def extend_static; end + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#66 + def parent_has_anonymous_blockarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#90 + def parent_has_anonymous_kwrestarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#78 + def parent_has_anonymous_restarg?; end + # source://parser//lib/parser/static_environment.rb#15 def reset; end @@ -7149,7 +5368,7 @@ end # # @api public # -# source://parser//lib/parser/tree_rewriter.rb#51 +# source://parser//lib/parser/tree_rewriter.rb#61 class Parser::TreeRewriter < ::Parser::AST::Processor # Returns `true` if the specified node is an assignment node, returns false # otherwise. diff --git a/sorbet/rbi/gems/pry-byebug@3.10.1.rbi b/sorbet/rbi/gems/pry-byebug@3.10.1.rbi deleted file mode 100644 index b8cb2231..00000000 --- a/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +++ /dev/null @@ -1,1145 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `pry-byebug` gem. -# Please instead update this file by running `bin/tapioca gem pry-byebug`. - -# source://pry-byebug//lib/byebug/processors/pry_processor.rb#5 -module Byebug - extend ::Byebug::Helpers::ReflectionHelper - - # source://byebug/11.1.3/lib/byebug/core.rb#31 - def displays; end - - # source://byebug/11.1.3/lib/byebug/core.rb#31 - def displays=(_arg0); end - - # source://byebug/11.1.3/lib/byebug/core.rb#25 - def init_file; end - - # source://byebug/11.1.3/lib/byebug/core.rb#25 - def init_file=(_arg0); end - - # source://byebug/11.1.3/lib/byebug/core.rb#41 - def mode; end - - # source://byebug/11.1.3/lib/byebug/core.rb#41 - def mode=(_arg0); end - - # source://byebug/11.1.3/lib/byebug/core.rb#52 - def run_init_script; end - - private - - def add_catchpoint(_arg0); end - def breakpoints; end - def catchpoints; end - def contexts; end - def current_context; end - def debug_load(*_arg0); end - def lock; end - def post_mortem=(_arg0); end - def post_mortem?; end - def raised_exception; end - - # source://byebug/11.1.3/lib/byebug/core.rb#102 - def rc_dirs; end - - # source://byebug/11.1.3/lib/byebug/core.rb#91 - def run_rc_file(rc_file); end - - def start; end - def started?; end - def stop; end - def stoppable?; end - def thread_context(_arg0); end - def tracing=(_arg0); end - def tracing?; end - def unlock; end - def verbose=(_arg0); end - def verbose?; end - - class << self - # source://byebug/11.1.3/lib/byebug/remote.rb#25 - def actual_control_port; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#20 - def actual_port; end - - def add_catchpoint(_arg0); end - - # source://byebug/11.1.3/lib/byebug/attacher.rb#10 - def attach; end - - def breakpoints; end - def catchpoints; end - def contexts; end - def current_context; end - def debug_load(*_arg0); end - - # source://byebug/11.1.3/lib/byebug/core.rb#76 - def handle_post_mortem; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#32 - def interrupt; end - - # source://byebug/11.1.3/lib/byebug/core.rb#61 - def load_settings; end - - def lock; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#59 - def parse_host_and_port(host_port_spec); end - - def post_mortem=(_arg0); end - def post_mortem?; end - def raised_exception; end - - # source://byebug/11.1.3/lib/byebug/attacher.rb#21 - def spawn(host = T.unsafe(nil), port = T.unsafe(nil)); end - - def start; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#55 - def start_client(host = T.unsafe(nil), port = T.unsafe(nil)); end - - # source://byebug/11.1.3/lib/byebug/remote.rb#48 - def start_control(host = T.unsafe(nil), port = T.unsafe(nil)); end - - # source://byebug/11.1.3/lib/byebug/remote.rb#39 - def start_server(host = T.unsafe(nil), port = T.unsafe(nil)); end - - def started?; end - def stop; end - def stoppable?; end - def thread_context(_arg0); end - def tracing=(_arg0); end - def tracing?; end - def unlock; end - def verbose=(_arg0); end - def verbose?; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#17 - def wait_connection; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#17 - def wait_connection=(_arg0); end - - private - - # source://byebug/11.1.3/lib/byebug/remote.rb#66 - def client; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#76 - def control; end - - # source://byebug/11.1.3/lib/byebug/remote.rb#70 - def server; end - end -end - -class Byebug::DebugThread < ::Thread - class << self - def inherited; end - end -end - -# Extends raw byebug's processor. -# -# source://pry-byebug//lib/byebug/processors/pry_processor.rb#9 -class Byebug::PryProcessor < ::Byebug::CommandProcessor - # Called when a breakpoint is hit. Note that `at_line`` is called - # inmediately after with the context's `stop_reason == :breakpoint`, so we - # must not resume the pry instance here - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#80 - def at_breakpoint(breakpoint); end - - # Called when the debugger wants to stop at a regular line - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#64 - def at_line; end - - # Called when the debugger wants to stop right before a method return - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#71 - def at_return(_return_value); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def bold(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output(*args, **_arg1, &block); end - - # Set up a number of navigational commands to be performed by Byebug. - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#45 - def perform(action, options = T.unsafe(nil)); end - - # Returns the value of attribute pry. - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#10 - def pry; end - - # Sets the attribute pry - # - # @param value the value to set the attribute pry to. - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#10 - def pry=(_arg0); end - - # Wrap a Pry REPL to catch navigational commands and act on them. - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#26 - def run(&_block); end - - private - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#93 - def n_hits(breakpoint); end - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#114 - def perform_backtrace(_options); end - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#142 - def perform_down(options); end - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#130 - def perform_finish(*_arg0); end - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#150 - def perform_frame(options); end - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#120 - def perform_next(options); end - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#125 - def perform_step(options); end - - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#134 - def perform_up(options); end - - # Resume an existing Pry REPL at the paused point. - # - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#102 - def resume_pry; end - - class << self - # source://pry-byebug//lib/byebug/processors/pry_processor.rb#16 - def start; end - end -end - -class Byebug::ThreadsTable; end - -# source://pry-byebug//lib/pry/byebug/breakpoints.rb#3 -class Pry - extend ::Forwardable - - # source://pry/0.14.1/lib/pry/pry_instance.rb#81 - def initialize(options = T.unsafe(nil)); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#212 - def add_sticky_local(name, &block); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#35 - def backtrace; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#35 - def backtrace=(_arg0); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#32 - def binding_stack; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#32 - def binding_stack=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands=(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#145 - def complete(str); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#50 - def config; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#124 - def current_binding; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#124 - def current_context; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#33 - def custom_completions; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#33 - def custom_completions=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor=(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#255 - def eval(line, options = T.unsafe(nil)); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#34 - def eval_string; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#34 - def eval_string=(_arg0); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#286 - def evaluate_ruby(code); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler=(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#394 - def exec_hook(name, *args, &block); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#42 - def exit_value; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks=(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#173 - def inject_local(name, value, binding); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#201 - def inject_sticky_locals!; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input=(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#45 - def input_ring; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#39 - def last_dir; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#39 - def last_dir=(_arg0); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#41 - def last_exception; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#418 - def last_exception=(exception); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#38 - def last_file; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#38 - def last_file=(_arg0); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#37 - def last_result; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#37 - def last_result=(_arg0); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#440 - def last_result_is_exception?; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#190 - def memory_size; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#195 - def memory_size=(size); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#538 - def output; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output=(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#48 - def output_ring; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#530 - def pager; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pager=(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#522 - def pop_prompt; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print=(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#325 - def process_command(val); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#360 - def process_command_safely(val); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#101 - def prompt; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#108 - def prompt=(new_prompt); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#131 - def push_binding(object); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#118 - def push_initial_binding(target = T.unsafe(nil)); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#506 - def push_prompt(new_prompt); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#592 - def quiet?; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#582 - def raise_up(*args); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#586 - def raise_up!(*args); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#554 - def raise_up_common(force, *args); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#282 - def repl(target = T.unsafe(nil)); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#231 - def reset_eval_string; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#375 - def run_command(val); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#453 - def select_prompt; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#409 - def set_last_result(result, code = T.unsafe(nil)); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#447 - def should_print?; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#298 - def show_result(result); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#216 - def sticky_locals; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#36 - def suppress_output; end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#36 - def suppress_output=(_arg0); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#428 - def update_input_history(code); end - - private - - # source://pry/0.14.1/lib/pry/pry_instance.rb#680 - def ensure_correct_encoding!(val); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#688 - def generate_prompt(prompt_proc, conf); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#598 - def handle_line(line, options); end - - # source://pry/0.14.1/lib/pry/pry_instance.rb#697 - def prompt_stack; end - - class << self - # source://pry/0.14.1/lib/pry/code.rb#12 - def Code(obj); end - - # source://pry/0.14.1/lib/pry/method.rb#9 - def Method(obj); end - - # source://pry/0.14.1/lib/pry/wrapped_module.rb#7 - def WrappedModule(obj); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#288 - def auto_resize!; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#341 - def binding_for(target); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#22 - def cli; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#22 - def cli=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands=(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#25 - def config; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#25 - def config=(_arg0); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#46 - def configure; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#374 - def critical_section; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#63 - def current; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#19 - def current_line; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#19 - def current_line=(_arg0); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#18 - def custom_completions; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#18 - def custom_completions=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor=(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#21 - def eval_path; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#21 - def eval_path=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals=(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#139 - def final_session_setup; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def history(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def history=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks=(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#369 - def in_critical_section?; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#332 - def init; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#251 - def initial_session?; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#129 - def initial_session_setup; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input=(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#24 - def last_internal_error; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#24 - def last_internal_error=(_arg0); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#20 - def line_buffer; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#20 - def line_buffer=(_arg0); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#69 - def load_file_at_toplevel(file); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#196 - def load_file_through_repl(file_name); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#245 - def load_history; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#77 - def load_rc_files; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#101 - def load_requires; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#109 - def load_traps; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#113 - def load_win32console; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#55 - def main; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def memory_size(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def memory_size=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pager(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pager=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prompt(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prompt=(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#23 - def quiet; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#23 - def quiet=(_arg0); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#86 - def rc_files_to_load; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#94 - def real_path_to(file); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#320 - def reset_defaults; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#271 - def run_command(command_string, options = T.unsafe(nil)); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#156 - def start(target = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#348 - def toplevel_binding; end - - # source://pry/0.14.1/lib/pry/pry_class.rb#366 - def toplevel_binding=(_arg0); end - - # source://pry/0.14.1/lib/pry/pry_class.rb#219 - def view_clip(obj, options = T.unsafe(nil)); end - end -end - -# source://pry-byebug//lib/pry/byebug/breakpoints.rb#4 -module Pry::Byebug; end - -# Wrapper for Byebug.breakpoints that respects our Processor and has better -# failure behavior. Acts as an Enumerable. -# -# source://pry-byebug//lib/pry/byebug/breakpoints.rb#9 -module Pry::Byebug::Breakpoints - extend ::Enumerable - extend ::Pry::Byebug::Breakpoints - - # Adds a file breakpoint. - # - # @raise [ArgumentError] - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#63 - def add_file(file, line, expression = T.unsafe(nil)); end - - # Adds a method breakpoint. - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#51 - def add_method(method, expression = T.unsafe(nil)); end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#44 - def breakpoints; end - - # Changes the conditional expression for a breakpoint. - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#78 - def change(id, expression = T.unsafe(nil)); end - - # Deletes an existing breakpoint with the given ID. - # - # @raise [ArgumentError] - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#89 - def delete(id); end - - # Deletes all breakpoints. - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#100 - def delete_all; end - - # Disables a breakpoint with the given ID. - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#115 - def disable(id); end - - # Disables all breakpoints. - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#122 - def disable_all; end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#136 - def each(&block); end - - # Enables a disabled breakpoint with the given ID. - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#108 - def enable(id); end - - # @raise [ArgumentError] - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#144 - def find_by_id(id); end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#140 - def last; end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#132 - def size; end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#128 - def to_a; end - - private - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#153 - def change_status(id, enabled = T.unsafe(nil)); end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#159 - def validate_expression(exp); end -end - -# Breakpoint in a file:line location -# -# source://pry-byebug//lib/pry/byebug/breakpoints.rb#16 -class Pry::Byebug::Breakpoints::FileBreakpoint < ::SimpleDelegator - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#17 - def source_code; end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#21 - def to_s; end -end - -# Breakpoint in a Class#method location -# -# source://pry-byebug//lib/pry/byebug/breakpoints.rb#29 -class Pry::Byebug::Breakpoints::MethodBreakpoint < ::SimpleDelegator - # @return [MethodBreakpoint] a new instance of MethodBreakpoint - # - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#30 - def initialize(byebug_bp, method); end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#35 - def source_code; end - - # source://pry-byebug//lib/pry/byebug/breakpoints.rb#39 - def to_s; end -end - -class Pry::REPL - extend ::Forwardable - - # source://pry/0.14.1/lib/pry/repl.rb#22 - def initialize(pry, options = T.unsafe(nil)); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output(*args, **_arg1, &block); end - - # source://pry/0.14.1/lib/pry/repl.rb#9 - def pry; end - - # source://pry/0.14.1/lib/pry/repl.rb#9 - def pry=(_arg0); end - - # source://pry/0.14.1/lib/pry/repl.rb#36 - def start; end - - private - - # source://pry/0.14.1/lib/pry/repl.rb#238 - def calculate_overhang(current_prompt, original_val, indented_val); end - - # source://pry/0.14.1/lib/pry/repl.rb#206 - def coolline_available?; end - - # source://pry/0.14.1/lib/pry/repl.rb#84 - def epilogue; end - - # source://pry/0.14.1/lib/pry/repl.rb#127 - def handle_read_errors; end - - # source://pry/0.14.1/lib/pry/repl.rb#196 - def input_readline(*args); end - - # source://pry/0.14.1/lib/pry/repl.rb#218 - def piping?; end - - # source://pry/0.14.1/lib/pry/repl.rb#47 - def prologue; end - - # source://pry/0.14.1/lib/pry/repl.rb#93 - def read; end - - # source://pry/0.14.1/lib/pry/repl.rb#170 - def read_line(current_prompt); end - - # source://pry/0.14.1/lib/pry/repl.rb#202 - def readline_available?; end - - # source://pry/0.14.1/lib/pry/repl.rb#66 - def repl; end - - # source://pry/0.14.1/lib/pry/repl.rb#225 - def set_readline_output; end - - class << self - # source://pry-byebug//lib/pry-byebug/pry_ext.rb#8 - def start(options = T.unsafe(nil)); end - - # source://pry-byebug//lib/pry-byebug/pry_ext.rb#8 - def start_with_pry_byebug(options = T.unsafe(nil)); end - - # source://pry/0.14.1/lib/pry/repl.rb#14 - def start_without_pry_byebug(options); end - end -end - -# Main container module for Pry-Byebug functionality -# -# source://pry-byebug//lib/pry-byebug/helpers/location.rb#3 -module PryByebug - # Reference to currently running pry-remote server. Used by the processor. - # - # source://pry-byebug//lib/pry-byebug/base.rb#10 - def current_remote_server; end - - # Reference to currently running pry-remote server. Used by the processor. - # - # source://pry-byebug//lib/pry-byebug/base.rb#10 - def current_remote_server=(_arg0); end - - private - - # Ensures that a command is executed in a local file context. - # - # source://pry-byebug//lib/pry-byebug/base.rb#25 - def check_file_context(target, msg = T.unsafe(nil)); end - - # Checks that a target binding is in a local file context. - # - # source://pry-byebug//lib/pry-byebug/base.rb#17 - def file_context?(target); end - - class << self - # Ensures that a command is executed in a local file context. - # - # @raise [Pry::CommandError] - # - # source://pry-byebug//lib/pry-byebug/base.rb#25 - def check_file_context(target, msg = T.unsafe(nil)); end - - # Checks that a target binding is in a local file context. - # - # @return [Boolean] - # - # source://pry-byebug//lib/pry-byebug/base.rb#17 - def file_context?(target); end - end -end - -# Display the current stack -# -# source://pry-byebug//lib/pry-byebug/commands/backtrace.rb#9 -class PryByebug::BacktraceCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - - # source://pry-byebug//lib/pry-byebug/commands/backtrace.rb#23 - def process; end -end - -# Add, show and remove breakpoints -# -# source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#12 -class PryByebug::BreakCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Breakpoints - include ::PryByebug::Helpers::Location - include ::PryByebug::Helpers::Multiline - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#50 - def options(opt); end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#62 - def process; end - - private - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#111 - def add_breakpoint(place, condition); end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#93 - def new_breakpoint; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#102 - def option_to_method(option); end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#106 - def print_all; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#88 - def process_condition; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 - def process_delete; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 - def process_delete_all; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 - def process_disable; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 - def process_disable_all; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#78 - def process_enable; end - - # source://pry-byebug//lib/pry-byebug/commands/breakpoint.rb#84 - def process_show; end -end - -# Continue program execution until the next breakpoint -# -# source://pry-byebug//lib/pry-byebug/commands/continue.rb#11 -class PryByebug::ContinueCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - include ::PryByebug::Helpers::Breakpoints - include ::PryByebug::Helpers::Location - - # source://pry-byebug//lib/pry-byebug/commands/continue.rb#31 - def process; end -end - -# Travel down the frame stack -# -# source://pry-byebug//lib/pry-byebug/commands/down.rb#9 -class PryByebug::DownCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - - # source://pry-byebug//lib/pry-byebug/commands/down.rb#27 - def process; end -end - -# Exit pry REPL with Byebug.stop -# -# source://pry-byebug//lib/pry-byebug/commands/exit_all.rb#9 -class PryByebug::ExitAllCommand < ::Pry::Command::ExitAll - # source://pry-byebug//lib/pry-byebug/commands/exit_all.rb#10 - def process; end -end - -# Run until the end of current frame -# -# source://pry-byebug//lib/pry-byebug/commands/finish.rb#9 -class PryByebug::FinishCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - - # source://pry-byebug//lib/pry-byebug/commands/finish.rb#20 - def process; end -end - -# Move to a specific frame in the callstack -# -# source://pry-byebug//lib/pry-byebug/commands/frame.rb#9 -class PryByebug::FrameCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - - # source://pry-byebug//lib/pry-byebug/commands/frame.rb#27 - def process; end -end - -# source://pry-byebug//lib/pry-byebug/helpers/location.rb#4 -module PryByebug::Helpers; end - -# Common helpers for breakpoint related commands -# -# source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#10 -module PryByebug::Helpers::Breakpoints - # Prints a message with bold font. - # - # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#21 - def bold_puts(msg); end - - # Byebug's array of breakpoints. - # - # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#14 - def breakpoints; end - - # Max width of breakpoints id column - # - # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#77 - def max_width; end - - # Prints a header for the breakpoint list. - # - # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#63 - def print_breakpoints_header; end - - # Print out full information about a breakpoint. - # - # Includes surrounding code at that point. - # - # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#30 - def print_full_breakpoint(breakpoint); end - - # Print out concise information about a breakpoint. - # - # source://pry-byebug//lib/pry-byebug/helpers/breakpoints.rb#52 - def print_short_breakpoint(breakpoint); end -end - -# Compatibility helper to handle source location -# -# source://pry-byebug//lib/pry-byebug/helpers/location.rb#8 -module PryByebug::Helpers::Location - private - - # Current file in the target binding. Used as the default breakpoint - # location. - # - # source://pry-byebug//lib/pry-byebug/helpers/location.rb#15 - def current_file(source = T.unsafe(nil)); end - - class << self - # Current file in the target binding. Used as the default breakpoint - # location. - # - # source://pry-byebug//lib/pry-byebug/helpers/location.rb#15 - def current_file(source = T.unsafe(nil)); end - end -end - -# Helpers to help handling multiline inputs -# -# source://pry-byebug//lib/pry-byebug/helpers/multiline.rb#8 -module PryByebug::Helpers::Multiline - # Returns true if we are in a multiline context and, as a side effect, - # updates the partial evaluation string with the current input. - # - # Returns false otherwise - # - # source://pry-byebug//lib/pry-byebug/helpers/multiline.rb#15 - def check_multiline_context; end -end - -# Helpers to aid breaking out of the REPL loop -# -# source://pry-byebug//lib/pry-byebug/helpers/navigation.rb#8 -module PryByebug::Helpers::Navigation - # Breaks out of the REPL loop and signals tracer - # - # source://pry-byebug//lib/pry-byebug/helpers/navigation.rb#12 - def breakout_navigation(action, options = T.unsafe(nil)); end -end - -# Run a number of lines and then stop again -# -# source://pry-byebug//lib/pry-byebug/commands/next.rb#10 -class PryByebug::NextCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - include ::PryByebug::Helpers::Multiline - - # source://pry-byebug//lib/pry-byebug/commands/next.rb#29 - def process; end -end - -# Run a number of Ruby statements and then stop again -# -# source://pry-byebug//lib/pry-byebug/commands/step.rb#9 -class PryByebug::StepCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - - # source://pry-byebug//lib/pry-byebug/commands/step.rb#26 - def process; end -end - -# Travel up the frame stack -# -# source://pry-byebug//lib/pry-byebug/commands/up.rb#9 -class PryByebug::UpCommand < ::Pry::ClassCommand - include ::PryByebug::Helpers::Navigation - - # source://pry-byebug//lib/pry-byebug/commands/up.rb#27 - def process; end -end diff --git a/sorbet/rbi/gems/pry@0.14.1.rbi b/sorbet/rbi/gems/pry@0.14.1.rbi deleted file mode 100644 index 190bb31b..00000000 --- a/sorbet/rbi/gems/pry@0.14.1.rbi +++ /dev/null @@ -1,10078 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `pry` gem. -# Please instead update this file by running `bin/tapioca gem pry`. - -# source://pry//lib/pry/core_extensions.rb#115 -class BasicObject - # Return a binding object for the receiver. - # - # The `self` of the binding is set to the current object, and it contains no - # local variables. - # - # The default definee (http://yugui.jp/articles/846) is set such that new - # methods defined will be added to the singleton class of the BasicObject. - # - # @return [Binding] - # - # source://pry//lib/pry/core_extensions.rb#125 - def __binding__; end -end - -# source://pry//lib/pry/core_extensions.rb#24 -class Object < ::BasicObject - include ::Kernel - include ::PP::ObjectMixin - - # Return a binding object for the receiver. - # - # The `self` of the binding is set to the current object, and it contains no - # local variables. - # - # The default definee (http://yugui.jp/articles/846) is set such that: - # - # * If `self` is a class or module, then new methods created in the binding - # will be defined in that class or module (as in `class Foo; end`). - # * If `self` is a normal object, then new methods created in the binding will - # be defined on its singleton class (as in `class << self; end`). - # * If `self` doesn't have a real singleton class (i.e. it is a Fixnum, Float, - # Symbol, nil, true, or false), then new methods will be created on the - # object's class (as in `self.class.class_eval{ }`) - # - # Newly created constants, including classes and modules, will also be added - # to the default definee. - # - # @return [Binding] - # - # source://pry//lib/pry/core_extensions.rb#70 - def __binding__; end - - # Start a Pry REPL on self. - # - # If `self` is a Binding then that will be used to evaluate expressions; - # otherwise a new binding will be created. - # - # @example With a binding - # binding.pry - # @example On any object - # "dummy".pry - # @example With options - # def my_method - # binding.pry :quiet => true - # end - # my_method() - # @param object [Object] the object or binding to pry - # (__deprecated__, use `object.pry`) - # @param hash [Hash] the options hash - # @see Pry.start - # - # source://pry//lib/pry/core_extensions.rb#43 - def pry(object = T.unsafe(nil), hash = T.unsafe(nil)); end -end - -# source://pry//lib/pry/version.rb#3 -class Pry - extend ::Forwardable - extend ::Pry::Forwardable - - # Create a new {Pry} instance. - # - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @param options [Hash] - # @return [Pry] a new instance of Pry - # - # source://pry//lib/pry/pry_instance.rb#81 - def initialize(options = T.unsafe(nil)); end - - # Add a sticky local to this Pry instance. - # A sticky local is a local that persists between all bindings in a session. - # - # @param name [Symbol] The name of the sticky local. - # @yield The block that defines the content of the local. The local - # will be refreshed at each tick of the repl loop. - # - # source://pry//lib/pry/pry_instance.rb#212 - def add_sticky_local(name, &block); end - - # Returns the value of attribute backtrace. - # - # source://pry//lib/pry/pry_instance.rb#35 - def backtrace; end - - # Sets the attribute backtrace - # - # @param value the value to set the attribute backtrace to. - # - # source://pry//lib/pry/pry_instance.rb#35 - def backtrace=(_arg0); end - - # Returns the value of attribute binding_stack. - # - # source://pry//lib/pry/pry_instance.rb#32 - def binding_stack; end - - # Sets the attribute binding_stack - # - # @param value the value to set the attribute binding_stack to. - # - # source://pry//lib/pry/pry_instance.rb#32 - def binding_stack=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands=(*args, **_arg1, &block); end - - # Generate completions. - # - # @param str [String] What the user has typed so far - # @return [Array] Possible completions - # - # source://pry//lib/pry/pry_instance.rb#145 - def complete(str); end - - # Returns the value of attribute config. - # - # source://pry//lib/pry/pry_instance.rb#50 - def config; end - - # The currently active `Binding`. - # - # @return [Binding] The currently active `Binding` for the session. - # - # source://pry//lib/pry/pry_instance.rb#124 - def current_binding; end - - # The currently active `Binding`. - # support previous API - # - # @return [Binding] The currently active `Binding` for the session. - # - # source://pry//lib/pry/pry_instance.rb#124 - def current_context; end - - # Returns the value of attribute custom_completions. - # - # source://pry//lib/pry/pry_instance.rb#33 - def custom_completions; end - - # Sets the attribute custom_completions - # - # @param value the value to set the attribute custom_completions to. - # - # source://pry//lib/pry/pry_instance.rb#33 - def custom_completions=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor=(*args, **_arg1, &block); end - - # Pass a line of input to Pry. - # - # This is the equivalent of `Binding#eval` but with extra Pry! - # - # In particular: - # 1. Pry commands will be executed immediately if the line matches. - # 2. Partial lines of input will be queued up until a complete expression has - # been accepted. - # 3. Output is written to `#output` in pretty colours, not returned. - # - # Once this method has raised an exception or returned false, this instance - # is no longer usable. {#exit_value} will return the session's breakout - # value if applicable. - # - # @option options - # @param line [String?] The line of input; `nil` if the user types `` - # @param options [Hash] a customizable set of options - # @raise [Exception] If the user uses the `raise-up` command, this method - # will raise that exception. - # @return [Boolean] Is Pry ready to accept more input? - # - # source://pry//lib/pry/pry_instance.rb#255 - def eval(line, options = T.unsafe(nil)); end - - # Returns the value of attribute eval_string. - # - # source://pry//lib/pry/pry_instance.rb#34 - def eval_string; end - - # Sets the attribute eval_string - # - # @param value the value to set the attribute eval_string to. - # - # source://pry//lib/pry/pry_instance.rb#34 - def eval_string=(_arg0); end - - # source://pry//lib/pry/pry_instance.rb#286 - def evaluate_ruby(code); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler=(*args, **_arg1, &block); end - - # Execute the specified hook. - # If executing a hook raises an exception, we log that and then continue sucessfully. - # To debug such errors, use the global variable $pry_hook_error, which is set as a - # result. - # - # @param name [Symbol] The hook name to execute - # @param args [*Object] The arguments to pass to the hook - # @return [Object, Exception] The return value of the hook or the exception raised - # - # source://pry//lib/pry/pry_instance.rb#394 - def exec_hook(name, *args, &block); end - - # Returns the value of attribute exit_value. - # - # source://pry//lib/pry/pry_instance.rb#42 - def exit_value; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks=(*args, **_arg1, &block); end - - # Injects a local variable into the provided binding. - # - # @param name [String] The name of the local to inject. - # @param value [Object] The value to set the local to. - # @param binding [Binding] The binding to set the local on. - # @return [Object] The value the local was set to. - # - # source://pry//lib/pry/pry_instance.rb#173 - def inject_local(name, value, binding); end - - # Inject all the sticky locals into the current binding. - # - # source://pry//lib/pry/pry_instance.rb#201 - def inject_sticky_locals!; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input=(*args, **_arg1, &block); end - - # @since v0.12.0 - # - # source://pry//lib/pry/pry_instance.rb#45 - def input_ring; end - - # Returns the value of attribute last_dir. - # - # source://pry//lib/pry/pry_instance.rb#39 - def last_dir; end - - # Sets the attribute last_dir - # - # @param value the value to set the attribute last_dir to. - # - # source://pry//lib/pry/pry_instance.rb#39 - def last_dir=(_arg0); end - - # Returns the value of attribute last_exception. - # - # source://pry//lib/pry/pry_instance.rb#41 - def last_exception; end - - # Set the last exception for a session. - # - # @param exception [Exception] The last exception. - # - # source://pry//lib/pry/pry_instance.rb#418 - def last_exception=(exception); end - - # Returns the value of attribute last_file. - # - # source://pry//lib/pry/pry_instance.rb#38 - def last_file; end - - # Sets the attribute last_file - # - # @param value the value to set the attribute last_file to. - # - # source://pry//lib/pry/pry_instance.rb#38 - def last_file=(_arg0); end - - # Returns the value of attribute last_result. - # - # source://pry//lib/pry/pry_instance.rb#37 - def last_result; end - - # Sets the attribute last_result - # - # @param value the value to set the attribute last_result to. - # - # source://pry//lib/pry/pry_instance.rb#37 - def last_result=(_arg0); end - - # @return [Boolean] True if the last result is an exception that was raised, - # as opposed to simply an instance of Exception (like the result of - # Exception.new) - # - # source://pry//lib/pry/pry_instance.rb#440 - def last_result_is_exception?; end - - # @return [Integer] The maximum amount of objects remembered by the inp and - # out arrays. Defaults to 100. - # - # source://pry//lib/pry/pry_instance.rb#190 - def memory_size; end - - # source://pry//lib/pry/pry_instance.rb#195 - def memory_size=(size); end - - # Returns an output device - # - # @example - # pry_instance.output.puts "ohai!" - # - # source://pry//lib/pry/pry_instance.rb#538 - def output; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output=(*args, **_arg1, &block); end - - # @since v0.12.0 - # - # source://pry//lib/pry/pry_instance.rb#48 - def output_ring; end - - # Returns the currently configured pager - # - # @example - # pry_instance.pager.page text - # - # source://pry//lib/pry/pry_instance.rb#530 - def pager; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pager=(*args, **_arg1, &block); end - - # Pops the current prompt off of the prompt stack. If the prompt you are - # popping is the last prompt, it will not be popped. Use this to restore the - # previous prompt. - # - # @example - # pry = Pry.new(prompt: Pry::Prompt[:my_prompt1]) - # pry.push_prompt(Pry::Prompt[:my_prompt2]) - # pry.pop_prompt # => prompt2 - # pry.pop_prompt # => prompt1 - # pry.pop_prompt # => prompt1 - # @return [Pry::Prompt] the prompt being popped - # - # source://pry//lib/pry/pry_instance.rb#522 - def pop_prompt; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print=(*args, **_arg1, &block); end - - # If the given line is a valid command, process it in the context of the - # current `eval_string` and binding. - # - # @param val [String] The line to process. - # @return [Boolean] `true` if `val` is a command, `false` otherwise - # - # source://pry//lib/pry/pry_instance.rb#325 - def process_command(val); end - - # Same as process_command, but outputs exceptions to `#output` instead of - # raising. - # - # @param val [String] The line to process. - # @return [Boolean] `true` if `val` is a command, `false` otherwise - # - # source://pry//lib/pry/pry_instance.rb#360 - def process_command_safely(val); end - - # This is the prompt at the top of the prompt stack. - # - # @return [Pry::Prompt] the current prompt - # - # source://pry//lib/pry/pry_instance.rb#101 - def prompt; end - - # Sets the Pry prompt. - # - # @param new_prompt [Pry::Prompt] - # @return [void] - # - # source://pry//lib/pry/pry_instance.rb#108 - def prompt=(new_prompt); end - - # Push a binding for the given object onto the stack. If this instance is - # currently stopped, mark it as usable again. - # - # source://pry//lib/pry/pry_instance.rb#131 - def push_binding(object); end - - # Initialize this instance by pushing its initial context into the binding - # stack. If no target is given, start at the top level. - # - # source://pry//lib/pry/pry_instance.rb#118 - def push_initial_binding(target = T.unsafe(nil)); end - - # Pushes the current prompt onto a stack that it can be restored from later. - # Use this if you wish to temporarily change the prompt. - # - # @example - # push_prompt(Pry::Prompt[:my_prompt]) - # @param new_prompt [Pry::Prompt] - # @return [Pry::Prompt] new_prompt - # - # source://pry//lib/pry/pry_instance.rb#506 - def push_prompt(new_prompt); end - - # Convenience accessor for the `quiet` config key. - # - # @return [Boolean] - # - # source://pry//lib/pry/pry_instance.rb#592 - def quiet?; end - - # source://pry//lib/pry/pry_instance.rb#582 - def raise_up(*args); end - - # source://pry//lib/pry/pry_instance.rb#586 - def raise_up!(*args); end - - # Raise an exception out of Pry. - # - # See Kernel#raise for documentation of parameters. - # See rb_make_exception for the inbuilt implementation. - # - # This is necessary so that the raise-up command can tell the - # difference between an exception the user has decided to raise, - # and a mistake in specifying that exception. - # - # (i.e. raise-up RunThymeError.new should not be the same as - # raise-up NameError, "unititialized constant RunThymeError") - # - # @raise [TypeError] - # - # source://pry//lib/pry/pry_instance.rb#554 - def raise_up_common(force, *args); end - - # Potentially deprecated. Use `Pry::REPL.new(pry, :target => target).start` - # (If nested sessions are going to exist, this method is fine, but a goal is - # to come up with an alternative to nested sessions altogether.) - # - # source://pry//lib/pry/pry_instance.rb#282 - def repl(target = T.unsafe(nil)); end - - # Reset the current eval string. If the user has entered part of a multiline - # expression, this discards that input. - # - # source://pry//lib/pry/pry_instance.rb#231 - def reset_eval_string; end - - # Run the specified command. - # - # @example - # pry_instance.run_command("ls -m") - # @param val [String] The command (and its params) to execute. - # @return [Pry::Command::VOID_VALUE] - # - # source://pry//lib/pry/pry_instance.rb#375 - def run_command(val); end - - # Returns the appropriate prompt to use. - # - # @return [String] The prompt. - # - # source://pry//lib/pry/pry_instance.rb#453 - def select_prompt; end - - # Set the last result of an eval. - # This method should not need to be invoked directly. - # - # @param result [Object] The result. - # @param code [String] The code that was run. - # - # source://pry//lib/pry/pry_instance.rb#409 - def set_last_result(result, code = T.unsafe(nil)); end - - # Whether the print proc should be invoked. - # Currently only invoked if the output is not suppressed. - # - # @return [Boolean] Whether the print proc should be invoked. - # - # source://pry//lib/pry/pry_instance.rb#447 - def should_print?; end - - # Output the result or pass to an exception handler (if result is an exception). - # - # source://pry//lib/pry/pry_instance.rb#298 - def show_result(result); end - - # source://pry//lib/pry/pry_instance.rb#216 - def sticky_locals; end - - # Returns the value of attribute suppress_output. - # - # source://pry//lib/pry/pry_instance.rb#36 - def suppress_output; end - - # Sets the attribute suppress_output - # - # @param value the value to set the attribute suppress_output to. - # - # source://pry//lib/pry/pry_instance.rb#36 - def suppress_output=(_arg0); end - - # Update Pry's internal state after evalling code. - # This method should not need to be invoked directly. - # - # @param code [String] The code we just eval'd - # - # source://pry//lib/pry/pry_instance.rb#428 - def update_input_history(code); end - - private - - # Force `eval_string` into the encoding of `val`. [Issue #284] - # - # source://pry//lib/pry/pry_instance.rb#680 - def ensure_correct_encoding!(val); end - - # source://pry//lib/pry/pry_instance.rb#688 - def generate_prompt(prompt_proc, conf); end - - # source://pry//lib/pry/pry_instance.rb#598 - def handle_line(line, options); end - - # the array that the prompt stack is stored in - # - # source://pry//lib/pry/pry_instance.rb#697 - def prompt_stack; end - - class << self - # Convert the given object into an instance of `Pry::Code`, if it isn't - # already one. - # - # @param obj [Code, Method, UnboundMethod, Proc, Pry::Method, String, Array, IO] - # - # source://pry//lib/pry/code.rb#12 - def Code(obj); end - - # If the given object is a `Pry::Method`, return it unaltered. If it's - # anything else, return it wrapped in a `Pry::Method` instance. - # - # source://pry//lib/pry/method.rb#9 - def Method(obj); end - - # If the given object is a `Pry::WrappedModule`, return it unaltered. If it's - # anything else, return it wrapped in a `Pry::WrappedModule` instance. - # - # source://pry//lib/pry/wrapped_module.rb#7 - def WrappedModule(obj); end - - # source://pry//lib/pry/pry_class.rb#288 - def auto_resize!; end - - # Return a `Binding` object for `target` or return `target` if it is - # already a `Binding`. - # In the case where `target` is top-level then return `TOPLEVEL_BINDING` - # - # @param target [Object] The object to get a `Binding` object for. - # @return [Binding] The `Binding` object. - # - # source://pry//lib/pry/pry_class.rb#341 - def binding_for(target); end - - # Returns the value of attribute cli. - # - # source://pry//lib/pry/pry_class.rb#22 - def cli; end - - # Sets the attribute cli - # - # @param value the value to set the attribute cli to. - # - # source://pry//lib/pry/pry_class.rb#22 - def cli=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def color=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def commands=(*args, **_arg1, &block); end - - # Returns the value of attribute config. - # - # source://pry//lib/pry/pry_class.rb#25 - def config; end - - # Sets the attribute config - # - # @param value the value to set the attribute config to. - # - # source://pry//lib/pry/pry_class.rb#25 - def config=(_arg0); end - - # @example - # Pry.configure do |config| - # config.eager_load! # optional - # config.input = # .. - # config.foo = 2 - # end - # @yield [config] Yields a block with {Pry.config} as its argument. - # - # source://pry//lib/pry/pry_class.rb#46 - def configure; end - - # source://pry//lib/pry/pry_class.rb#374 - def critical_section; end - - # @return [Pry::Config] Returns a value store for an instance of Pry running on the current thread. - # - # source://pry//lib/pry/pry_class.rb#63 - def current; end - - # Returns the value of attribute current_line. - # - # source://pry//lib/pry/pry_class.rb#19 - def current_line; end - - # Sets the attribute current_line - # - # @param value the value to set the attribute current_line to. - # - # source://pry//lib/pry/pry_class.rb#19 - def current_line=(_arg0); end - - # Returns the value of attribute custom_completions. - # - # source://pry//lib/pry/pry_class.rb#18 - def custom_completions; end - - # Sets the attribute custom_completions - # - # @param value the value to set the attribute custom_completions to. - # - # source://pry//lib/pry/pry_class.rb#18 - def custom_completions=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def editor=(*args, **_arg1, &block); end - - # Returns the value of attribute eval_path. - # - # source://pry//lib/pry/pry_class.rb#21 - def eval_path; end - - # Sets the attribute eval_path - # - # @param value the value to set the attribute eval_path to. - # - # source://pry//lib/pry/pry_class.rb#21 - def eval_path=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def exception_handler=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def extra_sticky_locals=(*args, **_arg1, &block); end - - # source://pry//lib/pry/pry_class.rb#139 - def final_session_setup; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def history(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def history=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hooks=(*args, **_arg1, &block); end - - # @return [Boolean] - # - # source://pry//lib/pry/pry_class.rb#369 - def in_critical_section?; end - - # Basic initialization. - # - # source://pry//lib/pry/pry_class.rb#332 - def init; end - - # @return [Boolean] Whether this is the first time a Pry session has - # been started since loading the Pry class. - # - # source://pry//lib/pry/pry_class.rb#251 - def initial_session?; end - - # Do basic setup for initial session including: loading pryrc, plugins, - # requires, and history. - # - # source://pry//lib/pry/pry_class.rb#129 - def initial_session_setup; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input=(*args, **_arg1, &block); end - - # Returns the value of attribute last_internal_error. - # - # source://pry//lib/pry/pry_class.rb#24 - def last_internal_error; end - - # Sets the attribute last_internal_error - # - # @param value the value to set the attribute last_internal_error to. - # - # source://pry//lib/pry/pry_class.rb#24 - def last_internal_error=(_arg0); end - - # Returns the value of attribute line_buffer. - # - # source://pry//lib/pry/pry_class.rb#20 - def line_buffer; end - - # Sets the attribute line_buffer - # - # @param value the value to set the attribute line_buffer to. - # - # source://pry//lib/pry/pry_class.rb#20 - def line_buffer=(_arg0); end - - # Load the given file in the context of `Pry.toplevel_binding` - # - # @param file [String] The unexpanded file path. - # - # source://pry//lib/pry/pry_class.rb#69 - def load_file_at_toplevel(file); end - - # Execute the file through the REPL loop, non-interactively. - # - # @param file_name [String] File name to load through the REPL. - # - # source://pry//lib/pry/pry_class.rb#196 - def load_file_through_repl(file_name); end - - # Load Readline history if required. - # - # source://pry//lib/pry/pry_class.rb#245 - def load_history; end - - # Load RC files if appropriate This method can also be used to reload the - # files if they have changed. - # - # source://pry//lib/pry/pry_class.rb#77 - def load_rc_files; end - - # Load any Ruby files specified with the -r flag on the command line. - # - # source://pry//lib/pry/pry_class.rb#101 - def load_requires; end - - # Trap interrupts on jruby, and make them behave like MRI so we can - # catch them. - # - # source://pry//lib/pry/pry_class.rb#109 - def load_traps; end - - # source://pry//lib/pry/pry_class.rb#113 - def load_win32console; end - - # @return [main] returns the special instance of Object, "main". - # - # source://pry//lib/pry/pry_class.rb#55 - def main; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def memory_size(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def memory_size=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pager(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pager=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def print=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prompt(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def prompt=(*args, **_arg1, &block); end - - # Returns the value of attribute quiet. - # - # source://pry//lib/pry/pry_class.rb#23 - def quiet; end - - # Sets the attribute quiet - # - # @param value the value to set the attribute quiet to. - # - # source://pry//lib/pry/pry_class.rb#23 - def quiet=(_arg0); end - - # Load the local RC file (./.pryrc) - # - # source://pry//lib/pry/pry_class.rb#86 - def rc_files_to_load; end - - # Expand a file to its canonical name (following symlinks as appropriate) - # - # source://pry//lib/pry/pry_class.rb#94 - def real_path_to(file); end - - # Set all the configurable options back to their default values - # - # source://pry//lib/pry/pry_class.rb#320 - def reset_defaults; end - - # Run a Pry command from outside a session. The commands available are - # those referenced by `Pry.config.commands` (the default command set). - # - # @example Run under Pry class, returning only public methods. - # Pry.run_command "ls -m", :target => Pry - # @example Run at top-level with no output. - # Pry.run_command "ls" - # @example Display command output. - # Pry.run_command "ls -av", :show_output => true - # @option options - # @option options - # @param command_string [String] The Pry command (including arguments, - # if any). - # @param options [Hash] Optional named parameters. - # @return [nil] - # - # source://pry//lib/pry/pry_class.rb#271 - def run_command(command_string, options = T.unsafe(nil)); end - - # Start a Pry REPL. - # This method also loads `pryrc` as necessary the first time it is invoked. - # - # @example - # Pry.start(Object.new, :input => MyInput.new) - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @option options - # @param target [Object, Binding] The receiver of the Pry session - # @param options [Hash] - # - # source://pry//lib/pry/pry_class.rb#156 - def start(target = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://pry//lib/pry/pry_class.rb#348 - def toplevel_binding; end - - # Sets the attribute toplevel_binding - # - # @param value the value to set the attribute toplevel_binding to. - # - # source://pry//lib/pry/pry_class.rb#366 - def toplevel_binding=(_arg0); end - - # An inspector that clips the output to `max_length` chars. - # In case of > `max_length` chars the `# notation is used. - # - # @option options - # @option options - # @param obj [Object] The object to view. - # @param options [Hash] - # @return [String] The string representation of `obj`. - # - # source://pry//lib/pry/pry_class.rb#219 - def view_clip(obj, options = T.unsafe(nil)); end - end -end - -# @return [Array] Code of the method used when implementing Pry's -# __binding__, along with line indication to be used with instance_eval (and -# friends). -# @see Object#__binding__ -# -# source://pry//lib/pry/core_extensions.rb#9 -Pry::BINDING_METHOD_IMPL = T.let(T.unsafe(nil), Array) - -# source://pry//lib/pry/basic_object.rb#4 -class Pry::BasicObject < ::BasicObject - include ::Kernel -end - -# source://pry//lib/pry/basic_object.rb#6 -Pry::BasicObject::Dir = Dir - -# source://pry//lib/pry/basic_object.rb#6 -Pry::BasicObject::ENV = T.let(T.unsafe(nil), Object) - -# source://pry//lib/pry/basic_object.rb#6 -Pry::BasicObject::File = File - -# source://pry//lib/pry/basic_object.rb#6 -Pry::BasicObject::Kernel = Kernel - -# source://pry//lib/pry/basic_object.rb#6 -Pry::BasicObject::LoadError = LoadError - -# source://pry//lib/pry/basic_object.rb#6 -Pry::BasicObject::Pry = Pry - -# A super-class for Commands that are created with a single block. -# -# This class ensures that the block is called with the correct number of -# arguments and the right context. -# -# Create subclasses using {Pry::CommandSet#command}. -# -# source://pry//lib/pry/block_command.rb#10 -class Pry::BlockCommand < ::Pry::Command - # Call the block that was registered with this command. - # - # @param args [Array] The arguments passed - # @return [Object] The return value of the block - # - # source://pry//lib/pry/block_command.rb#14 - def call(*args); end - - # source://pry//lib/pry/block_command.rb#18 - def help; end -end - -# Manage the processing of command line options -# -# source://pry//lib/pry/cli.rb#7 -class Pry::CLI - class << self - # Add a block responsible for processing parsed options. - # - # source://pry//lib/pry/cli.rb#39 - def add_option_processor(&block); end - - # Add another set of CLI options (a Pry::Slop block) - # - # source://pry//lib/pry/cli.rb#24 - def add_options(&block); end - - # @return [Array] The input array of strings to process - # as CLI options. - # - # source://pry//lib/pry/cli.rb#21 - def input_args; end - - # @return [Array] The input array of strings to process - # as CLI options. - # - # source://pry//lib/pry/cli.rb#21 - def input_args=(_arg0); end - - # @return [Array] The Procs that process the parsed options. Plugins can - # utilize this facility in order to add and process their own Pry - # options. - # - # source://pry//lib/pry/cli.rb#17 - def option_processors; end - - # @return [Array] The Procs that process the parsed options. Plugins can - # utilize this facility in order to add and process their own Pry - # options. - # - # source://pry//lib/pry/cli.rb#17 - def option_processors=(_arg0); end - - # @return [Proc] The Proc defining the valid command line options. - # - # source://pry//lib/pry/cli.rb#12 - def options; end - - # @return [Proc] The Proc defining the valid command line options. - # - # source://pry//lib/pry/cli.rb#12 - def options=(_arg0); end - - # source://pry//lib/pry/cli.rb#52 - def parse_options(args = T.unsafe(nil)); end - - # Clear `options` and `option_processors` - # - # source://pry//lib/pry/cli.rb#47 - def reset; end - - # source://pry//lib/pry/cli.rb#90 - def start(opts); end - end -end - -# source://pry//lib/pry/cli.rb#8 -class Pry::CLI::NoOptionsError < ::StandardError; end - -# A super-class of Commands with structure. -# -# This class implements the bare-minimum functionality that a command should -# have, namely a --help switch, and then delegates actual processing to its -# subclasses. -# -# Create subclasses using {Pry::CommandSet#create_command}, and override the -# `options(opt)` method to set up an instance of Pry::Slop, and the `process` -# method to actually run the command. If necessary, you can also override -# `setup` which will be called before `options`, for example to require any -# gems your command needs to run, or to set up state. -# -# source://pry//lib/pry/class_command.rb#15 -class Pry::ClassCommand < ::Pry::Command - # Returns the value of attribute args. - # - # source://pry//lib/pry/class_command.rb#64 - def args; end - - # Sets the attribute args - # - # @param value the value to set the attribute args to. - # - # source://pry//lib/pry/class_command.rb#64 - def args=(_arg0); end - - # Set up `opts` and `args`, and then call `process`. - # - # This method will display help if necessary. - # - # @param args [Array] The arguments passed - # @return [Object] The return value of `process` or VOID_VALUE - # - # source://pry//lib/pry/class_command.rb#72 - def call(*args); end - - # Generate shell completions - # - # @param search [String] The line typed so far - # @return [Array] the words to complete - # - # source://pry//lib/pry/class_command.rb#105 - def complete(search); end - - # Return the help generated by Pry::Slop for this command. - # - # source://pry//lib/pry/class_command.rb#87 - def help; end - - # A method to setup Pry::Slop so it can parse the options your command expects. - # - # method, as it may be called by Pry at any time for introspection reasons. - # If you need to set up default values, use `setup` instead. - # - # @example - # def options(opt) - # opt.banner "Gists methods or classes" - # opt.on(:c, :class, "gist a class") do - # @action = :class - # end - # end - # @note Please don't do anything side-effecty in the main part of this - # - # source://pry//lib/pry/class_command.rb#171 - def options(opt); end - - # Returns the value of attribute opts. - # - # source://pry//lib/pry/class_command.rb#63 - def opts; end - - # Sets the attribute opts - # - # @param value the value to set the attribute opts to. - # - # source://pry//lib/pry/class_command.rb#63 - def opts=(_arg0); end - - # The actual body of your command should go here. - # - # The `opts` mehod can be called to get the options that Pry::Slop has passed, - # and `args` gives the remaining, unparsed arguments. - # - # The return value of this method is discarded unless the command was - # created with `:keep_retval => true`, in which case it is returned to the - # repl. - # - # @example - # def process - # if opts.present?(:class) - # gist_class - # else - # gist_method - # end - # end - # @raise [CommandError] - # - # source://pry//lib/pry/class_command.rb#190 - def process; end - - # A method called just before `options(opt)` as part of `call`. - # - # This method can be used to set up any context your command needs to run, - # for example requiring gems, or setting default values for options. - # - # @example - # def setup - # require 'gist' - # @action = :method - # end - # - # source://pry//lib/pry/class_command.rb#121 - def setup; end - - # Return an instance of Pry::Slop that can parse either subcommands or the - # options that this command accepts. - # - # source://pry//lib/pry/class_command.rb#93 - def slop; end - - # A method to setup Pry::Slop commands so it can parse the subcommands your - # command expects. If you need to set up default values, use `setup` - # instead. - # - # @example A minimal example - # def subcommands(cmd) - # cmd.command :download do |opt| - # description 'Downloads a content from a server' - # - # opt.on :verbose, 'Use verbose output' - # - # run do |options, arguments| - # ContentDownloader.download(options, arguments) - # end - # end - # end - # @example Define the invokation block anywhere you want - # def subcommands(cmd) - # cmd.command :download do |opt| - # description 'Downloads a content from a server' - # - # opt.on :verbose, 'Use verbose output' - # end - # end - # - # def process - # # Perform calculations... - # opts.fetch_command(:download).run do |options, arguments| - # ContentDownloader.download(options, arguments) - # end - # # More calculations... - # end - # - # source://pry//lib/pry/class_command.rb#156 - def subcommands(cmd); end - - class << self - # source://pry//lib/pry/class_command.rb#29 - def doc; end - - # source://pry//lib/pry/class_command.rb#37 - def file; end - - # Ensure that subclasses inherit the options, description and - # match from a ClassCommand super class. - # - # source://pry//lib/pry/class_command.rb#19 - def inherited(klass); end - - # source://pry//lib/pry/class_command.rb#42 - def line; end - - # source://pry//lib/pry/class_command.rb#25 - def source; end - - # source://pry//lib/pry/class_command.rb#37 - def source_file; end - - # source://pry//lib/pry/class_command.rb#42 - def source_line; end - - # source://pry//lib/pry/class_command.rb#33 - def source_location; end - - private - - # The object used to extract the source for the command. - # - # This should be a `Pry::Method(block)` for a command made with `create_command` - # and a `Pry::WrappedModule(self)` for a command that's a standard class. - # - # @return [Pry::WrappedModule, Pry::Method] - # - # source://pry//lib/pry/class_command.rb#54 - def source_object; end - end -end - -# `Pry::Code` is a class that encapsulates lines of source code and their -# line numbers and formats them for terminal output. It can read from a file -# or method definition or be instantiated with a `String` or an `Array`. -# -# In general, the formatting methods in `Code` return a new `Code` object -# which will format the text as specified when `#to_s` is called. This allows -# arbitrary chaining of formatting methods without mutating the original -# object. -# -# source://pry//lib/pry/code.rb#32 -class Pry::Code - extend ::MethodSource::CodeHelpers - - # Instantiate a `Code` object containing code from the given `Array`, - # `String`, or `IO`. The first line will be line 1 unless specified - # otherwise. If you need non-contiguous line numbers, you can create an - # empty `Code` object and then use `#push` to insert the lines. - # - # @param lines [Array, String, IO] - # @param start_line [Integer?] - # @param code_type [Symbol?] - # @return [Code] a new instance of Code - # - # source://pry//lib/pry/code.rb#87 - def initialize(lines = T.unsafe(nil), start_line = T.unsafe(nil), code_type = T.unsafe(nil)); end - - # Append the given line. +lineno+ is one more than the last existing - # line, unless specified otherwise. - # - # @param line [String] - # @return [void] - # - # source://pry//lib/pry/code.rb#102 - def <<(line); end - - # Two `Code` objects are equal if they contain the same lines with the same - # numbers. Otherwise, call `to_s` and `chomp` and compare as Strings. - # - # @param other [Code, Object] - # @return [Boolean] - # - # source://pry//lib/pry/code.rb#325 - def ==(other); end - - # Remove all lines except for the +lines+ after and excluding +lineno+. - # - # @param lineno [Integer] - # @param lines [Integer] - # @return [Code] - # - # source://pry//lib/pry/code.rb#195 - def after(lineno, lines = T.unsafe(nil)); end - - # Remove all lines except for the +lines+ on either side of and including - # +lineno+. - # - # @param lineno [Integer] - # @param lines [Integer] - # @return [Code] - # - # source://pry//lib/pry/code.rb#182 - def around(lineno, lines = T.unsafe(nil)); end - - # Remove all lines except for the +lines+ up to and excluding +lineno+. - # - # @param lineno [Integer] - # @param lines [Integer] - # @return [Code] - # - # source://pry//lib/pry/code.rb#168 - def before(lineno, lines = T.unsafe(nil)); end - - # Remove all lines that aren't in the given range, expressed either as a - # `Range` object or a first and last line number (inclusive). Negative - # indices count from the end of the array of lines. - # - # @param start_line [Range, Integer] - # @param end_line [Integer?] - # @return [Code] - # - # source://pry//lib/pry/code.rb#135 - def between(start_line, end_line = T.unsafe(nil)); end - - # @return [Symbol] The type of code stored in this wrapper. - # - # source://pry//lib/pry/code.rb#77 - def code_type; end - - # @return [Symbol] The type of code stored in this wrapper. - # - # source://pry//lib/pry/code.rb#77 - def code_type=(_arg0); end - - # Get the comment that describes the expression on the given line number. - # - # @param line_number [Integer] (1-based) - # @return [String] the code. - # - # source://pry//lib/pry/code.rb#286 - def comment_describing(line_number); end - - # Get the multiline expression that starts on the given line number. - # - # @param line_number [Integer] (1-based) - # @return [String] the code. - # - # source://pry//lib/pry/code.rb#294 - def expression_at(line_number, consume = T.unsafe(nil)); end - - # Remove all lines that don't match the given `pattern`. - # - # @param pattern [Regexp] - # @return [Code] - # - # source://pry//lib/pry/code.rb#207 - def grep(pattern); end - - # @return [String] a (possibly highlighted) copy of the source code. - # - # source://pry//lib/pry/code.rb#263 - def highlighted; end - - # Return the number of lines stored. - # - # @return [Integer] - # - # source://pry//lib/pry/code.rb#316 - def length; end - - # @return [Integer] the number of digits in the last line. - # - # source://pry//lib/pry/code.rb#252 - def max_lineno_width; end - - # Forward any missing methods to the output of `#to_s`. - # - # source://pry//lib/pry/code.rb#335 - def method_missing(method_name, *args, &block); end - - # Get the (approximate) Module.nesting at the give line number. - # - # @param line_number [Integer] line number starting from 1 - # @return [Array] a list of open modules. - # - # source://pry//lib/pry/code.rb#302 - def nesting_at(line_number); end - - # Writes a formatted representation (based on the configuration of the - # object) to the given output, which must respond to `#<<`. - # - # source://pry//lib/pry/code.rb#269 - def print_to_output(output, color = T.unsafe(nil)); end - - # Append the given line. +lineno+ is one more than the last existing - # line, unless specified otherwise. - # - # @param line [String] - # @return [void] - # - # source://pry//lib/pry/code.rb#102 - def push(line); end - - # Return an unformatted String of the code. - # - # @return [String] - # - # source://pry//lib/pry/code.rb#309 - def raw; end - - # Filter the lines using the given block. - # - # @return [Code] - # @yield [LOC] - # - # source://pry//lib/pry/code.rb#122 - def reject(&block); end - - # Filter the lines using the given block. - # - # @return [Code] - # @yield [LOC] - # - # source://pry//lib/pry/code.rb#112 - def select(&block); end - - # Take `num_lines` from `start_line`, forward or backwards. - # - # @param start_line [Integer] - # @param num_lines [Integer] - # @return [Code] - # - # source://pry//lib/pry/code.rb#150 - def take_lines(start_line, num_lines); end - - # @return [String] a formatted representation (based on the configuration of - # the object). - # - # source://pry//lib/pry/code.rb#258 - def to_s; end - - # Format output with the specified number of spaces in front of every line, - # unless `spaces` is falsy. - # - # @param spaces [Integer?] - # @return [Code] - # - # source://pry//lib/pry/code.rb#244 - def with_indentation(spaces = T.unsafe(nil)); end - - # Format output with line numbers next to it, unless `y_n` is falsy. - # - # @param y_n [Boolean?] - # @return [Code] - # - # source://pry//lib/pry/code.rb#221 - def with_line_numbers(y_n = T.unsafe(nil)); end - - # Format output with a marker next to the given +lineno+, unless +lineno+ is - # falsy. - # - # @param lineno [Integer?] - # @return [Code] - # - # source://pry//lib/pry/code.rb#232 - def with_marker(lineno = T.unsafe(nil)); end - - protected - - # An abstraction of the `dup.instance_eval` pattern used throughout this - # class. - # - # source://pry//lib/pry/code.rb#361 - def alter(&block); end - - private - - # Check whether String responds to missing methods. - # - # @return [Boolean] - # - # source://pry//lib/pry/code.rb#345 - def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end - - class << self - # Instantiate a `Code` object containing code loaded from a file or - # Pry's line buffer. - # - # @param filename [String] The name of a file, or "(pry)". - # @param code_type [Symbol] The type of code the file contains. - # @return [Code] - # - # source://pry//lib/pry/code.rb#42 - def from_file(filename, code_type = T.unsafe(nil)); end - - # Instantiate a `Code` object containing code extracted from a - # `::Method`, `UnboundMethod`, `Proc`, or `Pry::Method` object. - # - # @param meth [::Method, UnboundMethod, Proc, Pry::Method] The method - # object. - # @param start_line [Integer, nil] The line number to start on, or nil to - # use the method's original line numbers. - # @return [Code] - # - # source://pry//lib/pry/code.rb#55 - def from_method(meth, start_line = T.unsafe(nil)); end - - # Attempt to extract the source code for module (or class) `mod`. - # - # @param mod [Module, Class] The module (or class) of interest. - # @param candidate_rank [Integer] The module candidate (by rank) - # to use (see `Pry::WrappedModule::Candidate` for more information). - # @param start_line [Integer, nil] The line number to start on, or nil to - # use the method's original line numbers. - # @return [Code] - # - # source://pry//lib/pry/code.rb#69 - def from_module(mod, candidate_rank = T.unsafe(nil), start_line = T.unsafe(nil)); end - end -end - -# Represents a range of lines in a code listing. -# -# @api private -# -# source://pry//lib/pry/code/code_range.rb#8 -class Pry::Code::CodeRange - # @api private - # @param start_line [Integer] - # @param end_line [Integer?] - # @return [CodeRange] a new instance of CodeRange - # - # source://pry//lib/pry/code/code_range.rb#11 - def initialize(start_line, end_line = T.unsafe(nil)); end - - # @api private - # @param lines [Array] - # @return [Range] - # - # source://pry//lib/pry/code/code_range.rb#19 - def indices_range(lines); end - - private - - # @api private - # - # source://pry//lib/pry/code/code_range.rb#27 - def end_line; end - - # @api private - # @return [Integer] - # - # source://pry//lib/pry/code/code_range.rb#57 - def find_end_index(lines); end - - # @api private - # @return [Integer] - # - # source://pry//lib/pry/code/code_range.rb#50 - def find_start_index(lines); end - - # If `end_line` is equal to `nil`, then calculate it from the first - # parameter, `start_line`. Otherwise, leave it as it is. - # - # @api private - # @return [void] - # - # source://pry//lib/pry/code/code_range.rb#32 - def force_set_end_line; end - - # Finds indices of `start_line` and `end_line` in the given Array of - # +lines+. - # - # @api private - # @param lines [Array] - # @return [Array] - # - # source://pry//lib/pry/code/code_range.rb#45 - def indices(lines); end - - # For example, if the range is 4..10, then `start_line` would be equal to - # 4 and `end_line` to 10. - # - # @api private - # @return [void] - # - # source://pry//lib/pry/code/code_range.rb#66 - def set_end_line_from_range; end - - # @api private - # - # source://pry//lib/pry/code/code_range.rb#25 - def start_line; end -end - -# Represents a line of code (which may, in fact, contain multiple lines if -# the entirety was eval'd as a single unit following the `edit` command). -# -# A line of code is a tuple, which consists of a line and a line number. A -# `LOC` object's state (namely, the line parameter) can be changed via -# instance methods. `Pry::Code` heavily uses this class. -# -# @api private -# @example -# loc = LOC.new("def example\n :example\nend", 1) -# puts loc.line -# def example -# :example -# end -# #=> nil -# -# loc.indent(3) -# loc.line #=> " def example\n :example\nend" -# -# source://pry//lib/pry/code/loc.rb#23 -class Pry::Code::LOC - # @api private - # @param line [String] The line of code. - # @param lineno [Integer] The position of the +line+. - # @return [LOC] a new instance of LOC - # - # source://pry//lib/pry/code/loc.rb#29 - def initialize(line, lineno); end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/code/loc.rb#34 - def ==(other); end - - # Prepends the line number `lineno` to the `line`. - # - # @api private - # @param max_width [Integer] - # @return [void] - # - # source://pry//lib/pry/code/loc.rb#64 - def add_line_number(max_width = T.unsafe(nil), color = T.unsafe(nil)); end - - # Prepends a marker "=>" or an empty marker to the +line+. - # - # @api private - # @param marker_lineno [Integer] If it is equal to the `lineno`, then - # prepend a hashrocket. Otherwise, an empty marker. - # @return [void] - # - # source://pry//lib/pry/code/loc.rb#81 - def add_marker(marker_lineno); end - - # Paints the `line` of code. - # - # @api private - # @param code_type [Symbol] - # @return [void] - # - # source://pry//lib/pry/code/loc.rb#56 - def colorize(code_type); end - - # @api private - # - # source://pry//lib/pry/code/loc.rb#38 - def dup; end - - # @api private - # - # source://pry//lib/pry/code/loc.rb#98 - def handle_multiline_entries_from_edit_command(line, max_width); end - - # Indents the `line` with +distance+ spaces. - # - # @api private - # @param distance [Integer] - # @return [void] - # - # source://pry//lib/pry/code/loc.rb#94 - def indent(distance); end - - # @api private - # @return [String] - # - # source://pry//lib/pry/code/loc.rb#43 - def line; end - - # @api private - # @return [Integer] - # - # source://pry//lib/pry/code/loc.rb#48 - def lineno; end - - # @api private - # @return [Array] - # - # source://pry//lib/pry/code/loc.rb#25 - def tuple; end -end - -# source://pry//lib/pry/code/code_file.rb#6 -class Pry::CodeFile - # @param filename [String] The name of a file with code to be detected - # @param code_type [Symbol] The type of code the `filename` contains - # @return [CodeFile] a new instance of CodeFile - # - # source://pry//lib/pry/code/code_file.rb#41 - def initialize(filename, code_type = T.unsafe(nil)); end - - # @return [String] The code contained in the current `@filename`. - # - # source://pry//lib/pry/code/code_file.rb#47 - def code; end - - # @return [Symbol] The type of code stored in this wrapper. - # - # source://pry//lib/pry/code/code_file.rb#37 - def code_type; end - - private - - # @raise [MethodSource::SourceNotFoundError] if the `filename` is not - # readable for some reason. - # @return [String] absolute path for the given `filename`. - # - # source://pry//lib/pry/code/code_file.rb#64 - def abs_path; end - - # @return [Array] All the paths that contain code that Pry can use for its - # API's. Skips directories. - # - # source://pry//lib/pry/code/code_file.rb#80 - def code_path; end - - # @return [String] - # - # source://pry//lib/pry/code/code_file.rb#110 - def from_load_path; end - - # @return [String] - # - # source://pry//lib/pry/code/code_file.rb#105 - def from_pry_init_pwd; end - - # @return [String] - # - # source://pry//lib/pry/code/code_file.rb#100 - def from_pwd; end - - # @param path [String] - # @return [Boolean] if the path, with or without the default ext, - # is a readable file then `true`, otherwise `false`. - # - # source://pry//lib/pry/code/code_file.rb#73 - def readable?(path); end - - # @param filename [String] - # @param default [Symbol] (:unknown) the file type to assume if none could be - # detected. - # @return [Symbol, nil] The SyntaxHighlighter type of a file from its - # extension, or `nil` if `:unknown`. - # - # source://pry//lib/pry/code/code_file.rb#89 - def type_from_filename(filename, default = T.unsafe(nil)); end -end - -# source://pry//lib/pry/code/code_file.rb#7 -Pry::CodeFile::DEFAULT_EXT = T.let(T.unsafe(nil), String) - -# List of all supported languages. -# -# @return [Hash] -# -# source://pry//lib/pry/code/code_file.rb#11 -Pry::CodeFile::EXTENSIONS = T.let(T.unsafe(nil), Hash) - -# source://pry//lib/pry/code/code_file.rb#28 -Pry::CodeFile::FILES = T.let(T.unsafe(nil), Hash) - -# Store the current working directory. This allows show-source etc. to work if -# your process has changed directory since boot. [Issue #675] -# -# source://pry//lib/pry/code/code_file.rb#34 -Pry::CodeFile::INITIAL_PWD = T.let(T.unsafe(nil), String) - -# This class is responsible for taking a string (identifying a -# command/class/method/etc) and returning the relevant type of object. -# For example, if the user looks up "show-source" then a -# `Pry::Command` will be returned. Alternatively, if the user passes in "Pry#repl" then -# a `Pry::Method` object will be returned. -# -# The `CodeObject.lookup` method is responsible for 1. figuring out what kind of -# object the user wants (applying precedence rules in doing so -- i.e methods -# get precedence over commands with the same name) and 2. Returning -# the appropriate object. If the user fails to provide a string -# identifer for the object (i.e they pass in `nil` or "") then the -# object looked up will be the 'current method' or 'current class' -# associated with the Binding. -# -# TODO: This class is a clusterfuck. We need a much more robust -# concept of what a "Code Object" really is. Currently -# commands/classes/candidates/methods and so on just share a very -# ill-defined interface. -# -# source://pry//lib/pry/code_object.rb#22 -class Pry::CodeObject - include ::Pry::Helpers::OptionsHelpers - include ::Pry::Helpers::CommandHelpers - - # @return [CodeObject] a new instance of CodeObject - # - # source://pry//lib/pry/code_object.rb#82 - def initialize(str, pry_instance, options = T.unsafe(nil)); end - - # TODO: just make it so find_command_by_match_or_listing doesn't raise? - # - # source://pry//lib/pry/code_object.rb#94 - def command_lookup; end - - # lookup variables and constants and `self` that are not modules - # - # source://pry//lib/pry/code_object.rb#118 - def default_lookup; end - - # when no paramter is given (i.e CodeObject.lookup(nil)), then we - # lookup the 'current object' from the binding. - # - # source://pry//lib/pry/code_object.rb#102 - def empty_lookup; end - - # source://pry//lib/pry/code_object.rb#136 - def method_or_class_lookup; end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/code_object.rb#79 - def pry_instance; end - - # Sets the attribute pry_instance - # - # @param value the value to set the attribute pry_instance to. - # - # source://pry//lib/pry/code_object.rb#79 - def pry_instance=(_arg0); end - - # Returns the value of attribute str. - # - # source://pry//lib/pry/code_object.rb#77 - def str; end - - # Sets the attribute str - # - # @param value the value to set the attribute str to. - # - # source://pry//lib/pry/code_object.rb#77 - def str=(_arg0); end - - # Returns the value of attribute super_level. - # - # source://pry//lib/pry/code_object.rb#80 - def super_level; end - - # Sets the attribute super_level - # - # @param value the value to set the attribute super_level to. - # - # source://pry//lib/pry/code_object.rb#80 - def super_level=(_arg0); end - - # Returns the value of attribute target. - # - # source://pry//lib/pry/code_object.rb#78 - def target; end - - # Sets the attribute target - # - # @param value the value to set the attribute target to. - # - # source://pry//lib/pry/code_object.rb#78 - def target=(_arg0); end - - private - - # Returns true if `str` looks like a method, i.e Klass#method - # We need to consider this case because method lookups should fall - # through to the `method_or_class_lookup()` method but a - # defined?() on a "Klass#method` string will see the `#` as a - # comment and only evaluate the `Klass` part. - # - # @param str [String] - # @return [Boolean] Whether the string looks like an instance method. - # - # source://pry//lib/pry/code_object.rb#163 - def looks_like_an_instance_method?(str); end - - # grab the nth (`super_level`) super of `obj - # - # @param obj [Object] - # @param super_level [Fixnum] How far up the super chain to ascend. - # @raise [Pry::CommandError] - # - # source://pry//lib/pry/code_object.rb#188 - def lookup_super(obj, super_level); end - - # We use this method to decide whether code is safe to eval. Method's are - # generally not, but everything else is. - # TODO: is just checking != "method" enough?? - # TODO: see duplication of this method in Pry::WrappedModule - # - # @param str [String] The string to lookup - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#173 - def safe_to_evaluate?(str); end - - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#152 - def sourcable_object?(obj); end - - # source://pry//lib/pry/code_object.rb#181 - def target_self; end - - class << self - # source://pry//lib/pry/code_object.rb#69 - def lookup(str, pry_instance, options = T.unsafe(nil)); end - end -end - -# source://pry//lib/pry/code_object.rb#23 -module Pry::CodeObject::Helpers - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#30 - def c_method?; end - - # @note If a module defined by C was extended with a lot of methods written - # in Ruby, this method would fail. - # @return [Boolean] `true` if this module was defined by means of the C API, - # `false` if it's a Ruby module. - # - # source://pry//lib/pry/code_object.rb#46 - def c_module?; end - - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#38 - def command?; end - - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#34 - def module_with_yard_docs?; end - - # we need this helper as some Pry::Method objects can wrap Procs - # - # @return [Boolean] - # - # source://pry//lib/pry/code_object.rb#26 - def real_method_object?; end -end - -# PP subclass for streaming inspect output in color. -# -# source://pry//lib/pry/color_printer.rb#8 -class Pry::ColorPrinter < ::PP - # source://pry//lib/pry/color_printer.rb#25 - def pp(object); end - - # source://pry//lib/pry/color_printer.rb#37 - def text(str, max_width = T.unsafe(nil)); end - - private - - # source://pry//lib/pry/color_printer.rb#49 - def highlight_object_literal(object_literal); end - - # source://pry//lib/pry/color_printer.rb#55 - def inspect_object(object); end - - class << self - # source://pry//lib/pry/color_printer.rb#11 - def default(_output, value, pry_instance); end - - # source://pry//lib/pry/color_printer.rb#18 - def pp(obj, output = T.unsafe(nil), max_width = T.unsafe(nil)); end - end -end - -# N.B. using a regular expresion here so that "raise-up 'foo'" does the right thing. -# -# source://pry//lib/pry/command.rb#11 -class Pry::Command - include ::Pry::Helpers::BaseHelpers - include ::Pry::Helpers::OptionsHelpers - include ::Pry::Helpers::CommandHelpers - include ::Pry::Helpers::Text - extend ::Pry::Helpers::DocumentationHelpers - extend ::Pry::CodeObject::Helpers - - # Instantiate a command, in preparation for calling it. - # - # @param context [Hash] The runtime context to use with this command. - # @return [Command] a new instance of Command - # - # source://pry//lib/pry/command.rb#230 - def initialize(context = T.unsafe(nil)); end - - # source://pry//lib/pry/command.rb#292 - def _pry_; end - - # Sets the attribute pry_instance - # - # @param value the value to set the attribute pry_instance to. - # - # source://pry//lib/pry/command.rb#217 - def _pry_=(_arg0); end - - # Returns the value of attribute arg_string. - # - # source://pry//lib/pry/command.rb#213 - def arg_string; end - - # Sets the attribute arg_string - # - # @param value the value to set the attribute arg_string to. - # - # source://pry//lib/pry/command.rb#213 - def arg_string=(_arg0); end - - # source://pry//lib/pry/command.rb#253 - def block; end - - # Returns the value of attribute captures. - # - # source://pry//lib/pry/command.rb#211 - def captures; end - - # Sets the attribute captures - # - # @param value the value to set the attribute captures to. - # - # source://pry//lib/pry/command.rb#211 - def captures=(_arg0); end - - # Display a warning if a command collides with a local/method in - # the current scope. - # - # source://pry//lib/pry/command.rb#329 - def check_for_command_collision(command_match, arg_string); end - - # The block we pass *into* a command so long as `:takes_block` is - # not equal to `false` - # - # @example - # my-command | do - # puts "block content" - # end - # - # source://pry//lib/pry/command.rb#226 - def command_block; end - - # The block we pass *into* a command so long as `:takes_block` is - # not equal to `false` - # - # @example - # my-command | do - # puts "block content" - # end - # - # source://pry//lib/pry/command.rb#226 - def command_block=(_arg0); end - - # source://pry//lib/pry/command.rb#261 - def command_name; end - - # source://pry//lib/pry/command.rb#257 - def command_options; end - - # Returns the value of attribute command_set. - # - # source://pry//lib/pry/command.rb#215 - def command_set; end - - # Sets the attribute command_set - # - # @param value the value to set the attribute command_set to. - # - # source://pry//lib/pry/command.rb#215 - def command_set=(_arg0); end - - # source://pry//lib/pry/command.rb#284 - def commands; end - - # Generate completions for this command - # - # @param _search [String] The line typed so far - # @return [Array] Completion words - # - # source://pry//lib/pry/command.rb#411 - def complete(_search); end - - # Returns the value of attribute context. - # - # source://pry//lib/pry/command.rb#214 - def context; end - - # Sets the attribute context - # - # @param value the value to set the attribute context to. - # - # source://pry//lib/pry/command.rb#214 - def context=(_arg0); end - - # source://pry//lib/pry/command.rb#249 - def description; end - - # Returns the value of attribute eval_string. - # - # source://pry//lib/pry/command.rb#212 - def eval_string; end - - # Sets the attribute eval_string - # - # @param value the value to set the attribute eval_string to. - # - # source://pry//lib/pry/command.rb#212 - def eval_string=(_arg0); end - - # Returns the value of attribute hooks. - # - # source://pry//lib/pry/command.rb#216 - def hooks; end - - # Sets the attribute hooks - # - # @param value the value to set the attribute hooks to. - # - # source://pry//lib/pry/command.rb#216 - def hooks=(_arg0); end - - # Revaluate the string (str) and perform interpolation. - # - # @param str [String] The string to reevaluate with interpolation. - # @return [String] The reevaluated string with interpolations - # applied (if any). - # - # source://pry//lib/pry/command.rb#318 - def interpolate_string(str); end - - # source://pry//lib/pry/command.rb#245 - def match; end - - # Make those properties accessible to instances - # - # source://pry//lib/pry/command.rb#241 - def name; end - - # Properties of one execution of a command (passed by {Pry#run_command} as a hash of - # context and expanded in `#initialize` - # - # source://pry//lib/pry/command.rb#209 - def output; end - - # Properties of one execution of a command (passed by {Pry#run_command} as a hash of - # context and expanded in `#initialize` - # - # source://pry//lib/pry/command.rb#209 - def output=(_arg0); end - - # Process a line that Command.matches? this command. - # - # @param line [String] The line to process - # @return [Object, Command::VOID_VALUE] - # - # source://pry//lib/pry/command.rb#394 - def process_line(line); end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/command.rb#217 - def pry_instance; end - - # Sets the attribute pry_instance - # - # @param value the value to set the attribute pry_instance to. - # - # source://pry//lib/pry/command.rb#217 - def pry_instance=(_arg0); end - - # Run a command from another command. - # - # @example - # run "show-input" - # @example - # run ".ls" - # @example - # run "amend-line", "5", 'puts "hello world"' - # @param command_string [String] The string that invokes the command - # @param args [Array] Further arguments to pass to the command - # - # source://pry//lib/pry/command.rb#278 - def run(command_string, *args); end - - # source://pry//lib/pry/command.rb#265 - def source; end - - # @example - # state.my_state = "my state" # this will not conflict with any - # # `state.my_state` used in another command. - # @return [Hash] Pry commands can store arbitrary state - # here. This state persists between subsequent command invocations. - # All state saved here is unique to the command, it does not - # need to be namespaced. - # - # source://pry//lib/pry/command.rb#309 - def state; end - - # Returns the value of attribute target. - # - # source://pry//lib/pry/command.rb#210 - def target; end - - # Sets the attribute target - # - # @param value the value to set the attribute target to. - # - # source://pry//lib/pry/command.rb#210 - def target=(_arg0); end - - # @return [Object] The value of `self` inside the `target` binding. - # - # source://pry//lib/pry/command.rb#298 - def target_self; end - - # Extract necessary information from a line that Command.matches? this - # command. - # - # Returns an array of four elements: - # - # ``` - # [String] the portion of the line that matched with the Command match - # [String] a string of all the arguments (i.e. everything but the match) - # [Array] the captures caught by the command_regex - # [Array] the arguments obtained by splitting the arg_string - # ``` - # - # @param val [String] The line of input - # @return [Array] - # - # source://pry//lib/pry/command.rb#356 - def tokenize(val); end - - # source://pry//lib/pry/command.rb#288 - def void; end - - private - - # source://pry//lib/pry/command.rb#485 - def after_hooks; end - - # source://pry//lib/pry/command.rb#481 - def before_hooks; end - - # Run the command with the given `args`. - # - # This is a public wrapper around `#call` which ensures all preconditions - # are met. - # - # @param args [Array] The arguments to pass to this command. - # @return [Object] The return value of the `#call` method, or - # {Command::VOID_VALUE}. - # - # source://pry//lib/pry/command.rb#425 - def call_safely(*args); end - - # Run the `#call` method and all the registered hooks. - # - # @param args [Array] The arguments to `#call` - # @return [Object] The return value from `#call` - # - # source://pry//lib/pry/command.rb#492 - def call_with_hooks(*args); end - - # source://pry//lib/pry/command.rb#476 - def find_hooks(event); end - - # Normalize method arguments according to its arity. - # - # @param method [Integer] - # @param args [Array] - # @return [Array] a (possibly shorter) array of the arguments to pass - # - # source://pry//lib/pry/command.rb#509 - def normalize_method_args(method, args); end - - # Pass a block argument to a command. - # - # @param arg_string [String] The arguments (as a string) passed to the command. - # We inspect these for a '| do' or a '| {' and if we find it we use it - # to start a block input sequence. Once we have a complete - # block, we save it to an accessor that can be retrieved from the command context. - # Note that if we find the '| do' or '| {' we delete this and the - # elements following it from `arg_string`. - # - # source://pry//lib/pry/command.rb#451 - def pass_block(arg_string); end - - # source://pry//lib/pry/command.rb#436 - def use_unpatched_symbol; end - - class << self - # Define or get the command's banner - # - # source://pry//lib/pry/command.rb#61 - def banner(arg = T.unsafe(nil)); end - - # source://pry//lib/pry/command.rb#66 - def block; end - - # Sets the attribute block - # - # @param value the value to set the attribute block to. - # - # source://pry//lib/pry/command.rb#30 - def block=(_arg0); end - - # source://pry//lib/pry/command.rb#109 - def command_name; end - - # Define or get the command's options - # - # source://pry//lib/pry/command.rb#51 - def command_options(arg = T.unsafe(nil)); end - - # Sets the attribute command_options - # - # @param value the value to set the attribute command_options to. - # - # source://pry//lib/pry/command.rb#32 - def command_options=(_arg0); end - - # source://pry//lib/pry/command.rb#165 - def command_regex; end - - # source://pry//lib/pry/command.rb#172 - def convert_to_regex(obj); end - - # source://pry//lib/pry/command.rb#89 - def default_options(match); end - - # Define or get the command's description - # - # source://pry//lib/pry/command.rb#45 - def description(arg = T.unsafe(nil)); end - - # Sets the attribute description - # - # @param value the value to set the attribute description to. - # - # source://pry//lib/pry/command.rb#31 - def description=(_arg0); end - - # source://pry//lib/pry/command.rb#75 - def doc; end - - # source://pry//lib/pry/command.rb#79 - def file; end - - # The group in which the command should be displayed in "help" output. - # This is usually auto-generated from directory naming, but it can be - # manually overridden if necessary. - # Group should not be changed once it is initialized. - # - # source://pry//lib/pry/command.rb#185 - def group(name = T.unsafe(nil)); end - - # source://pry//lib/pry/command.rb#105 - def inspect; end - - # source://pry//lib/pry/command.rb#84 - def line; end - - # source://pry//lib/pry/command.rb#35 - def match(arg = T.unsafe(nil)); end - - # Sets the attribute match - # - # @param value the value to set the attribute match to. - # - # source://pry//lib/pry/command.rb#33 - def match=(_arg0); end - - # How well does this command match the given line? - # - # Higher scores are better because they imply that this command matches - # the line more closely. - # - # The score is calculated by taking the number of characters at the start - # of the string that are used only to identify the command, not as part of - # the arguments. - # - # @example - # /\.(.*)/.match_score(".foo") #=> 1 - # /\.*(.*)/.match_score("...foo") #=> 3 - # 'hi'.match_score("hi there") #=> 2 - # @param val [String] A line input at the REPL - # @return [Fixnum] - # - # source://pry//lib/pry/command.rb#153 - def match_score(val); end - - # Should this command be called for the given line? - # - # @param val [String] A line input at the REPL - # @return [Boolean] - # - # source://pry//lib/pry/command.rb#133 - def matches?(val); end - - # source://pry//lib/pry/command.rb#101 - def name; end - - # Define or get the command's options - # backward compatibility - # - # source://pry//lib/pry/command.rb#51 - def options(arg = T.unsafe(nil)); end - - # Sets the attribute command_options - # - # @param value the value to set the attribute command_options to. - # - # source://pry//lib/pry/command.rb#32 - def options=(_arg0); end - - # source://pry//lib/pry/command.rb#70 - def source; end - - # source://pry//lib/pry/command.rb#79 - def source_file; end - - # source://pry//lib/pry/command.rb#84 - def source_line; end - - # source://pry//lib/pry/command.rb#202 - def state; end - - # Create a new command with the given properties. - # - # @param match [String, Regex] The thing that triggers this command - # @param description [String] The description to appear in `help` - # @param options [Hash] Behavioral options (see {Pry::CommandSet#command}) - # @param helpers [Module] A module of helper functions to be included. - # @return [Class] (a subclass of {Pry::Command}) - # @yield optional, used for BlockCommands - # - # source://pry//lib/pry/command.rb#120 - def subclass(match, description, options, helpers, &block); end - end -end - -# source://pry//lib/pry/commands/amend_line.rb#5 -class Pry::Command::AmendLine < ::Pry::ClassCommand - # @raise [CommandError] - # - # source://pry//lib/pry/commands/amend_line.rb#22 - def process; end - - private - - # @return [String] A new string with the amendments applied to it. - # - # source://pry//lib/pry/commands/amend_line.rb#33 - def amend_input; end - - # source://pry//lib/pry/commands/amend_line.rb#47 - def delete_from_array(array, range); end - - # source://pry//lib/pry/commands/amend_line.rb#51 - def insert_into_array(array, range); end - - # @return [Fixnum] The number of lines currently in `eval_string` (the - # input buffer) - # - # source://pry//lib/pry/commands/amend_line.rb#62 - def line_count; end - - # The lines (or line) that will be modified by the `amend-line`. - # - # @return [Range, Fixnum] The lines or line. - # - # source://pry//lib/pry/commands/amend_line.rb#90 - def line_range; end - - # source://pry//lib/pry/commands/amend_line.rb#56 - def replace_in_array(array, range); end - - # Returns the (one-indexed) start and end lines given by the user. - # The lines in this range will be affected by the `amend-line`. - # Returns `nil` if no lines were specified by the user. - # - # @return [Array, nil] - # - # source://pry//lib/pry/commands/amend_line.rb#70 - def start_and_end_line_number; end - - # Takes two numbers that are 1-indexed, and returns a range (or - # number) that is 0-indexed. 1-indexed means the first element is - # indentified by 1 rather than by 0 (as is the case for Ruby arrays). - # - # @param start_line_number [Fixnum] One-indexed number. - # @param end_line_number [Fixnum] One-indexed number. - # @return [Range] The zero-indexed range. - # - # source://pry//lib/pry/commands/amend_line.rb#83 - def zero_indexed_range_from_one_indexed_numbers(start_line_number, end_line_number); end -end - -# source://pry//lib/pry/commands/bang.rb#5 -class Pry::Command::Bang < ::Pry::ClassCommand - # source://pry//lib/pry/commands/bang.rb#16 - def process; end -end - -# source://pry//lib/pry/commands/bang_pry.rb#5 -class Pry::Command::BangPry < ::Pry::ClassCommand - # source://pry//lib/pry/commands/bang_pry.rb#14 - def process; end -end - -# source://pry//lib/pry/commands/cat.rb#5 -class Pry::Command::Cat < ::Pry::ClassCommand - # source://pry//lib/pry/commands/cat.rb#53 - def complete(search); end - - # source://pry//lib/pry/commands/cat.rb#57 - def load_path_completions; end - - # source://pry//lib/pry/commands/cat.rb#23 - def options(opt); end - - # source://pry//lib/pry/commands/cat.rb#38 - def process; end -end - -# source://pry//lib/pry/commands/cat/abstract_formatter.rb#6 -class Pry::Command::Cat::AbstractFormatter - include ::Pry::Helpers::OptionsHelpers - include ::Pry::Helpers::CommandHelpers - include ::Pry::Helpers::BaseHelpers - - private - - # source://pry//lib/pry/commands/cat/abstract_formatter.rb#26 - def between_lines; end - - # source://pry//lib/pry/commands/cat/abstract_formatter.rb#18 - def code_type; end - - # source://pry//lib/pry/commands/cat/abstract_formatter.rb#12 - def decorate(content); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/cat/abstract_formatter.rb#22 - def use_line_numbers?; end -end - -# source://pry//lib/pry/commands/cat/exception_formatter.rb#6 -class Pry::Command::Cat::ExceptionFormatter < ::Pry::Command::Cat::AbstractFormatter - include ::Pry::Helpers::Text - - # @return [ExceptionFormatter] a new instance of ExceptionFormatter - # - # source://pry//lib/pry/commands/cat/exception_formatter.rb#12 - def initialize(exception, pry_instance, opts); end - - # Returns the value of attribute ex. - # - # source://pry//lib/pry/commands/cat/exception_formatter.rb#7 - def ex; end - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#18 - def format; end - - # Returns the value of attribute opts. - # - # source://pry//lib/pry/commands/cat/exception_formatter.rb#8 - def opts; end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/commands/cat/exception_formatter.rb#9 - def pry_instance; end - - private - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#56 - def backtrace_file; end - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#37 - def backtrace_level; end - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#60 - def backtrace_line; end - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/cat/exception_formatter.rb#64 - def check_for_errors; end - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#33 - def code_window_size; end - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#78 - def header; end - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#52 - def increment_backtrace_level; end - - # source://pry//lib/pry/commands/cat/exception_formatter.rb#71 - def start_and_end_line_for_code_window; end -end - -# source://pry//lib/pry/commands/cat/file_formatter.rb#6 -class Pry::Command::Cat::FileFormatter < ::Pry::Command::Cat::AbstractFormatter - # @return [FileFormatter] a new instance of FileFormatter - # - # source://pry//lib/pry/commands/cat/file_formatter.rb#11 - def initialize(file_with_embedded_line, pry_instance, opts); end - - # source://pry//lib/pry/commands/cat/file_formatter.rb#27 - def file_and_line; end - - # Returns the value of attribute file_with_embedded_line. - # - # source://pry//lib/pry/commands/cat/file_formatter.rb#7 - def file_with_embedded_line; end - - # source://pry//lib/pry/commands/cat/file_formatter.rb#22 - def format; end - - # Returns the value of attribute opts. - # - # source://pry//lib/pry/commands/cat/file_formatter.rb#8 - def opts; end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/commands/cat/file_formatter.rb#9 - def pry_instance; end - - private - - # source://pry//lib/pry/commands/cat/file_formatter.rb#55 - def code_type; end - - # source://pry//lib/pry/commands/cat/file_formatter.rb#43 - def code_window_size; end - - # source://pry//lib/pry/commands/cat/file_formatter.rb#47 - def decorate(content); end - - # source://pry//lib/pry/commands/cat/file_formatter.rb#59 - def detect_code_type_from_file(file_name); end - - # source://pry//lib/pry/commands/cat/file_formatter.rb#35 - def file_name; end - - # source://pry//lib/pry/commands/cat/file_formatter.rb#39 - def line_number; end -end - -# source://pry//lib/pry/commands/cat/input_expression_formatter.rb#6 -class Pry::Command::Cat::InputExpressionFormatter < ::Pry::Command::Cat::AbstractFormatter - # @return [InputExpressionFormatter] a new instance of InputExpressionFormatter - # - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#10 - def initialize(input_expressions, opts); end - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#15 - def format; end - - # Returns the value of attribute input_expressions. - # - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#7 - def input_expressions; end - - # Sets the attribute input_expressions - # - # @param value the value to set the attribute input_expressions to. - # - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#7 - def input_expressions=(_arg0); end - - # Returns the value of attribute opts. - # - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#8 - def opts; end - - # Sets the attribute opts - # - # @param value the value to set the attribute opts to. - # - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#8 - def opts=(_arg0); end - - private - - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#42 - def normalized_expression_range; end - - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#37 - def numbered_input_items; end - - # source://pry//lib/pry/commands/cat/input_expression_formatter.rb#33 - def selected_input_items; end -end - -# source://pry//lib/pry/commands/cd.rb#5 -class Pry::Command::Cd < ::Pry::ClassCommand - # source://pry//lib/pry/commands/cd.rb#25 - def process; end -end - -# source://pry//lib/pry/commands/change_inspector.rb#5 -class Pry::Command::ChangeInspector < ::Pry::ClassCommand - # source://pry//lib/pry/commands/change_inspector.rb#17 - def process(inspector); end - - private - - # source://pry//lib/pry/commands/change_inspector.rb#28 - def inspector_map; end -end - -# source://pry//lib/pry/commands/change_prompt.rb#5 -class Pry::Command::ChangePrompt < ::Pry::ClassCommand - # source://pry//lib/pry/commands/change_prompt.rb#16 - def options(opt); end - - # source://pry//lib/pry/commands/change_prompt.rb#20 - def process(prompt); end - - private - - # source://pry//lib/pry/commands/change_prompt.rb#38 - def change_prompt(prompt); end - - # source://pry//lib/pry/commands/change_prompt.rb#30 - def list_prompts; end -end - -# source://pry//lib/pry/commands/clear_screen.rb#5 -class Pry::Command::ClearScreen < ::Pry::ClassCommand - # source://pry//lib/pry/commands/clear_screen.rb#10 - def process; end -end - -# source://pry//lib/pry/commands/code_collector.rb#5 -class Pry::Command::CodeCollector - include ::Pry::Helpers::OptionsHelpers - include ::Pry::Helpers::CommandHelpers - - # @return [CodeCollector] a new instance of CodeCollector - # - # source://pry//lib/pry/commands/code_collector.rb#23 - def initialize(args, opts, pry_instance); end - - # Returns the value of attribute args. - # - # source://pry//lib/pry/commands/code_collector.rb#8 - def args; end - - # The code object - # - # @return [Pry::WrappedModule, Pry::Method, Pry::Command] - # - # source://pry//lib/pry/commands/code_collector.rb#86 - def code_object; end - - # The content (i.e code/docs) for the selected object. - # If the user provided a bare code object, it returns the source. - # If the user provided the `-i` or `-o` switches, it returns the - # selected input/output lines joined as a string. If the user used - # `-d CODE_OBJECT` it returns the docs for that code object. - # - # @return [String] - # - # source://pry//lib/pry/commands/code_collector.rb#60 - def content; end - - # The name of the explicitly given file (if any). - # - # source://pry//lib/pry/commands/code_collector.rb#13 - def file; end - - # The name of the explicitly given file (if any). - # - # source://pry//lib/pry/commands/code_collector.rb#13 - def file=(_arg0); end - - # The line range passed to `--lines`, converted to a 0-indexed range. - # - # source://pry//lib/pry/commands/code_collector.rb#123 - def line_range; end - - # Name of the object argument - # - # source://pry//lib/pry/commands/code_collector.rb#128 - def obj_name; end - - # Returns the value of attribute opts. - # - # source://pry//lib/pry/commands/code_collector.rb#9 - def opts; end - - # The selected `pry_instance.input_ring` as a string, as specified by - # the `-i` switch. - # - # @return [String] - # - # source://pry//lib/pry/commands/code_collector.rb#116 - def pry_input_content; end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/commands/code_collector.rb#10 - def pry_instance; end - - # The selected `pry_instance.output_ring` as a string, as specified by - # the `-o` switch. - # - # @return [String] - # - # source://pry//lib/pry/commands/code_collector.rb#104 - def pry_output_content; end - - # Given a string and a range, return the `range` lines of that - # string. - # - # @param content [String] - # @param range [Range, Fixnum] - # @return [String] The string restricted to the given range - # - # source://pry//lib/pry/commands/code_collector.rb#96 - def restrict_to_lines(content, range); end - - private - - # @return [Boolean] - # - # source://pry//lib/pry/commands/code_collector.rb#134 - def bad_option_combination?; end - - # source://pry//lib/pry/commands/code_collector.rb#153 - def code_object_doc; end - - # source://pry//lib/pry/commands/code_collector.rb#157 - def code_object_source_or_file; end - - # source://pry//lib/pry/commands/code_collector.rb#175 - def convert_to_range(range); end - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/code_collector.rb#171 - def could_not_locate(name); end - - # source://pry//lib/pry/commands/code_collector.rb#161 - def file_content; end - - # source://pry//lib/pry/commands/code_collector.rb#139 - def pry_array_content_as_string(array, ranges); end - - class << self - # Add the `--lines`, `-o`, `-i`, `-s`, `-d` options. - # - # source://pry//lib/pry/commands/code_collector.rb#30 - def inject_options(opt); end - - # Returns the value of attribute input_expression_ranges. - # - # source://pry//lib/pry/commands/code_collector.rb#16 - def input_expression_ranges; end - - # Sets the attribute input_expression_ranges - # - # @param value the value to set the attribute input_expression_ranges to. - # - # source://pry//lib/pry/commands/code_collector.rb#16 - def input_expression_ranges=(_arg0); end - - # Returns the value of attribute output_result_ranges. - # - # source://pry//lib/pry/commands/code_collector.rb#17 - def output_result_ranges; end - - # Sets the attribute output_result_ranges - # - # @param value the value to set the attribute output_result_ranges to. - # - # source://pry//lib/pry/commands/code_collector.rb#17 - def output_result_ranges=(_arg0); end - end -end - -# source://pry//lib/pry/commands/disable_pry.rb#5 -class Pry::Command::DisablePry < ::Pry::ClassCommand - # source://pry//lib/pry/commands/disable_pry.rb#23 - def process; end -end - -# source://pry//lib/pry/commands/edit.rb#5 -class Pry::Command::Edit < ::Pry::ClassCommand - # source://pry//lib/pry/commands/edit.rb#89 - def apply_runtime_patch; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#172 - def bad_option_combination?; end - - # source://pry//lib/pry/commands/edit.rb#152 - def code_object; end - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/edit.rb#105 - def ensure_file_name_is_valid(file_name); end - - # source://pry//lib/pry/commands/edit.rb#119 - def file_and_line; end - - # source://pry//lib/pry/commands/edit.rb#115 - def file_and_line_for_current_exception; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#78 - def file_based_exception?; end - - # source://pry//lib/pry/commands/edit.rb#135 - def file_edit; end - - # source://pry//lib/pry/commands/edit.rb#148 - def filename_argument; end - - # source://pry//lib/pry/commands/edit.rb#203 - def initial_temp_file_content; end - - # source://pry//lib/pry/commands/edit.rb#180 - def input_expression; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#195 - def never_reload?; end - - # source://pry//lib/pry/commands/edit.rb#25 - def options(opt); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#168 - def patch_exception?; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#163 - def previously_patched?(code_object); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#215 - def probably_a_file?(str); end - - # source://pry//lib/pry/commands/edit.rb#46 - def process; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#158 - def pry_method?(code_object); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#199 - def reload?(file_name = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#191 - def reloadable?; end - - # source://pry//lib/pry/commands/edit.rb#69 - def repl_edit; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#64 - def repl_edit?; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/edit.rb#82 - def runtime_patch?; end -end - -# source://pry//lib/pry/commands/edit/exception_patcher.rb#6 -class Pry::Command::Edit::ExceptionPatcher - # @return [ExceptionPatcher] a new instance of ExceptionPatcher - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#11 - def initialize(pry_instance, state, exception_file_and_line); end - - # Returns the value of attribute file_and_line. - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#9 - def file_and_line; end - - # Sets the attribute file_and_line - # - # @param value the value to set the attribute file_and_line to. - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#9 - def file_and_line=(_arg0); end - - # perform the patch - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#18 - def perform_patch; end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#7 - def pry_instance; end - - # Sets the attribute pry_instance - # - # @param value the value to set the attribute pry_instance to. - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#7 - def pry_instance=(_arg0); end - - # Returns the value of attribute state. - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#8 - def state; end - - # Sets the attribute state - # - # @param value the value to set the attribute state to. - # - # source://pry//lib/pry/commands/edit/exception_patcher.rb#8 - def state=(_arg0); end -end - -# source://pry//lib/pry/commands/edit/file_and_line_locator.rb#6 -module Pry::Command::Edit::FileAndLineLocator - class << self - # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#8 - def from_binding(target); end - - # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#16 - def from_code_object(code_object, filename_argument); end - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#24 - def from_exception(exception, backtrace_level); end - - # when file and line are passed as a single arg, e.g my_file.rb:30 - # - # source://pry//lib/pry/commands/edit/file_and_line_locator.rb#38 - def from_filename_argument(filename_argument); end - end -end - -# source://pry//lib/pry/commands/exit.rb#5 -class Pry::Command::Exit < ::Pry::ClassCommand - # source://pry//lib/pry/commands/exit.rb#25 - def process; end - - # source://pry//lib/pry/commands/exit.rb#34 - def process_pop_and_return; end -end - -# source://pry//lib/pry/commands/exit_all.rb#5 -class Pry::Command::ExitAll < ::Pry::ClassCommand - # source://pry//lib/pry/commands/exit_all.rb#18 - def process; end -end - -# source://pry//lib/pry/commands/exit_program.rb#5 -class Pry::Command::ExitProgram < ::Pry::ClassCommand - # source://pry//lib/pry/commands/exit_program.rb#18 - def process; end -end - -# source://pry//lib/pry/commands/find_method.rb#5 -class Pry::Command::FindMethod < ::Pry::ClassCommand - extend ::Pry::Helpers::BaseHelpers - - # source://pry//lib/pry/commands/find_method.rb#31 - def options(opt); end - - # source://pry//lib/pry/commands/find_method.rb#36 - def process; end - - private - - # Return the matched lines of method source if `-c` is given or "" - # if `-c` was not given - # - # source://pry//lib/pry/commands/find_method.rb#100 - def additional_info(header, method); end - - # Search for all methods who's implementation matches the given regex - # within a namespace. - # - # @param namespace [Module] The namespace to search - # @return [Array] - # - # source://pry//lib/pry/commands/find_method.rb#186 - def content_search(namespace); end - - # source://pry//lib/pry/commands/find_method.rb#108 - def matched_method_lines(header, method); end - - # Search for all methods with a name that matches the given regex - # within a namespace. - # - # @param namespace [Module] The namespace to search - # @return [Array] - # - # source://pry//lib/pry/commands/find_method.rb#174 - def name_search(namespace); end - - # @return [Regexp] The pattern to search for. - # - # source://pry//lib/pry/commands/find_method.rb#48 - def pattern; end - - # pretty-print a list of matching methods. - # - # @param matches [Array] - # - # source://pry//lib/pry/commands/find_method.rb#80 - def print_matches(matches); end - - # Print matched methods for a class - # - # source://pry//lib/pry/commands/find_method.rb#90 - def print_matches_for_class(klass, grouped); end - - # Run the given block against every constant in the provided namespace. - # - # @param klass [Module] The namespace in which to start the search. - # @param done [Hash] The namespaces we've already visited (private) - # @yieldparam klass Each class/module in the namespace. - # - # source://pry//lib/pry/commands/find_method.rb#120 - def recurse_namespace(klass, done = T.unsafe(nil), &block); end - - # Gather all the methods in a namespace that pass the given block. - # - # @param namespace [Module] The namespace in which to search. - # @return [Array] - # @yieldparam method [Method] The method to test - # @yieldreturn [Boolean] - # - # source://pry//lib/pry/commands/find_method.rb#150 - def search_all_methods(namespace); end - - # The class to search for methods. - # We only search classes, so if the search object is an - # instance, return its class. If no search object is given - # search `target_self`. - # - # source://pry//lib/pry/commands/find_method.rb#67 - def search_class; end - - # Output the result of the search. - # - # @param matches [Array] - # - # source://pry//lib/pry/commands/find_method.rb#55 - def show_search_results(matches); end -end - -# source://pry//lib/pry/commands/fix_indent.rb#5 -class Pry::Command::FixIndent < ::Pry::ClassCommand - # source://pry//lib/pry/commands/fix_indent.rb#15 - def process; end -end - -# source://pry//lib/pry/commands/help.rb#5 -class Pry::Command::Help < ::Pry::ClassCommand - # Get a hash of available commands grouped by the "group" name. - # - # source://pry//lib/pry/commands/help.rb#29 - def command_groups; end - - # Display help for an individual command. - # - # @param command [Pry::Command] - # - # source://pry//lib/pry/commands/help.rb#125 - def display_command(command); end - - # Display help for a searched item, filtered by group - # - # @param search [String] The string to search for. - # @raise [CommandError] - # - # source://pry//lib/pry/commands/help.rb#111 - def display_filtered_commands(search); end - - # Display help for a searched item, filtered first by group - # and if that fails, filtered by command name. - # - # @param search [String] The string to search for. - # - # source://pry//lib/pry/commands/help.rb#98 - def display_filtered_search_results(search); end - - # Display the index view, with headings and short descriptions per command. - # - # @param groups [Hash>] - # - # source://pry//lib/pry/commands/help.rb#44 - def display_index(groups); end - - # Display help for an individual command or group. - # - # @param search [String] The string to search for. - # - # source://pry//lib/pry/commands/help.rb#86 - def display_search(search); end - - # source://pry//lib/pry/commands/help.rb#159 - def group_sort_key(group_name); end - - # Given a group name and an array of commands, - # return the help string for those commands. - # - # @param name [String] The group name. - # @param commands [Array] - # @return [String] The generated help string. - # - # source://pry//lib/pry/commands/help.rb#62 - def help_text_for_commands(name, commands); end - - # Clean search terms to make it easier to search group names - # - # @param key [String] - # @return [String] - # - # source://pry//lib/pry/commands/help.rb#155 - def normalize(key); end - - # source://pry//lib/pry/commands/help.rb#33 - def process; end - - # Find a subset of a hash that matches the user's search term. - # - # If there's an exact match a Hash of one element will be returned, - # otherwise a sub-Hash with every key that matches the search will - # be returned. - # - # @param search [String] the search term - # @param hash [Hash] the hash to search - # - # source://pry//lib/pry/commands/help.rb#137 - def search_hash(search, hash); end - - # Sort an array of commands by their `listing` name. - # - # @param commands [Array] The commands to sort - # @return [Array] commands sorted by listing name. - # - # source://pry//lib/pry/commands/help.rb#79 - def sorted_commands(commands); end - - # @param groups [Hash] - # @return [Array] An array of sorted group names. - # - # source://pry//lib/pry/commands/help.rb#71 - def sorted_group_names(groups); end - - # We only want to show commands that have descriptions, so that the - # easter eggs don't show up. - # - # source://pry//lib/pry/commands/help.rb#20 - def visible_commands; end -end - -# source://pry//lib/pry/commands/hist.rb#5 -class Pry::Command::Hist < ::Pry::ClassCommand - # source://pry//lib/pry/commands/hist.rb#25 - def options(opt); end - - # source://pry//lib/pry/commands/hist.rb#43 - def process; end - - private - - # Checks +replay_sequence+ for the presence of neighboring replay calls. - # - # @example - # [1] pry(main)> hist --show 46894 - # 46894: hist --replay 46675..46677 - # [2] pry(main)> hist --show 46675..46677 - # 46675: 1+1 - # 46676: a = 100 - # 46677: hist --tail - # [3] pry(main)> hist --replay 46894 - # Error: Replay index 46894 points out to another replay call: - # `hist -r 46675..46677` - # [4] pry(main)> - # @param replay_sequence [String] The sequence of commands to be replayed - # (per saltum) - # @raise [Pry::CommandError] If +replay_sequence+ contains another - # "hist --replay" call - # @return [Boolean] `false` if +replay_sequence+ does not contain another - # "hist --replay" call - # - # source://pry//lib/pry/commands/hist.rb#143 - def check_for_juxtaposed_replay(replay_sequence); end - - # Finds history depending on the given switch. - # - # @return [Pry::Code] if it finds `--all` (or `-a`) switch, returns all - # entries in history. Without the switch returns only the entries from the - # current Pry session. - # - # source://pry//lib/pry/commands/hist.rb#168 - def find_history; end - - # source://pry//lib/pry/commands/hist.rb#105 - def process_clear; end - - # source://pry//lib/pry/commands/hist.rb#78 - def process_display; end - - # source://pry//lib/pry/commands/hist.rb#110 - def process_replay; end - - # source://pry//lib/pry/commands/hist.rb#86 - def process_save; end -end - -# source://pry//lib/pry/commands/import_set.rb#5 -class Pry::Command::ImportSet < ::Pry::ClassCommand - # TODO: resolve unused parameter. - # - # @raise [CommandError] - # - # source://pry//lib/pry/commands/import_set.rb#17 - def process(_command_set_name); end -end - -# source://pry//lib/pry/commands/jump_to.rb#5 -class Pry::Command::JumpTo < ::Pry::ClassCommand - # source://pry//lib/pry/commands/jump_to.rb#14 - def process(break_level); end -end - -# source://pry//lib/pry/commands/list_inspectors.rb#5 -class Pry::Command::ListInspectors < ::Pry::ClassCommand - # source://pry//lib/pry/commands/list_inspectors.rb#16 - def process; end - - private - - # source://pry//lib/pry/commands/list_inspectors.rb#28 - def inspector_map; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/list_inspectors.rb#36 - def selected_inspector?(inspector); end - - # source://pry//lib/pry/commands/list_inspectors.rb#32 - def selected_text; end -end - -# source://pry//lib/pry/commands/ls/jruby_hacks.rb#5 -class Pry::Command::Ls < ::Pry::ClassCommand - # Exclude -q, -v and --grep because they, - # don't specify what the user wants to see. - # - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls.rb#85 - def no_user_opts?; end - - # source://pry//lib/pry/commands/ls.rb#52 - def options(opt); end - - # source://pry//lib/pry/commands/ls.rb#90 - def process; end - - private - - # source://pry//lib/pry/commands/ls.rb#106 - def error_list; end - - # source://pry//lib/pry/commands/ls.rb#126 - def raise_errors_if_arguments_are_weird; end -end - -# source://pry//lib/pry/commands/ls/constants.rb#6 -class Pry::Command::Ls::Constants < ::Pry::Command::Ls::Formatter - include ::Pry::Command::Ls::Interrogatable - - # @return [Constants] a new instance of Constants - # - # source://pry//lib/pry/commands/ls/constants.rb#14 - def initialize(interrogatee, no_user_opts, opts, pry_instance); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/constants.rb#23 - def correct_opts?; end - - # source://pry//lib/pry/commands/ls/constants.rb#27 - def output_self; end - - private - - # source://pry//lib/pry/commands/ls/constants.rb#39 - def format(mod, constants); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/constants.rb#35 - def show_deprecated_constants?; end -end - -# source://pry//lib/pry/commands/ls/constants.rb#7 -Pry::Command::Ls::Constants::DEPRECATED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://pry//lib/pry/commands/ls.rb#6 -Pry::Command::Ls::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://pry//lib/pry/commands/ls/formatter.rb#6 -class Pry::Command::Ls::Formatter - # @return [Formatter] a new instance of Formatter - # - # source://pry//lib/pry/commands/ls/formatter.rb#10 - def initialize(pry_instance); end - - # Sets the attribute grep - # - # @param value the value to set the attribute grep to. - # - # source://pry//lib/pry/commands/ls/formatter.rb#7 - def grep=(_arg0); end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/commands/ls/formatter.rb#8 - def pry_instance; end - - # source://pry//lib/pry/commands/ls/formatter.rb#16 - def write_out; end - - private - - # source://pry//lib/pry/commands/ls/formatter.rb#24 - def color(type, str); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/formatter.rb#41 - def correct_opts?; end - - # source://pry//lib/pry/commands/ls/formatter.rb#37 - def format_value(value); end - - # source://pry//lib/pry/commands/ls/formatter.rb#49 - def grep; end - - # Add a new section to the output. - # Outputs nothing if the section would be empty. - # - # source://pry//lib/pry/commands/ls/formatter.rb#30 - def output_section(heading, body); end - - # @raise [NotImplementedError] - # - # source://pry//lib/pry/commands/ls/formatter.rb#45 - def output_self; end -end - -# source://pry//lib/pry/commands/ls/globals.rb#6 -class Pry::Command::Ls::Globals < ::Pry::Command::Ls::Formatter - # @return [Globals] a new instance of Globals - # - # source://pry//lib/pry/commands/ls/globals.rb#24 - def initialize(opts, pry_instance); end - - # source://pry//lib/pry/commands/ls/globals.rb#29 - def output_self; end - - private - - # source://pry//lib/pry/commands/ls/globals.rb#36 - def format(globals); end -end - -# Taken from "puts global_variables.inspect". -# -# source://pry//lib/pry/commands/ls/globals.rb#8 -Pry::Command::Ls::Globals::BUILTIN_GLOBALS = T.let(T.unsafe(nil), Array) - -# `$SAFE` and `$?` are thread-local, the exception stuff only works in a -# rescue clause, everything else is basically a local variable with a `$` -# in its name. -# -# source://pry//lib/pry/commands/ls/globals.rb#19 -Pry::Command::Ls::Globals::PSEUDO_GLOBALS = T.let(T.unsafe(nil), Array) - -# source://pry//lib/pry/commands/ls/grep.rb#6 -class Pry::Command::Ls::Grep - # @return [Grep] a new instance of Grep - # - # source://pry//lib/pry/commands/ls/grep.rb#7 - def initialize(grep_regexp); end - - # source://pry//lib/pry/commands/ls/grep.rb#11 - def regexp; end -end - -# source://pry//lib/pry/commands/ls/instance_vars.rb#6 -class Pry::Command::Ls::InstanceVars < ::Pry::Command::Ls::Formatter - include ::Pry::Command::Ls::Interrogatable - - # @return [InstanceVars] a new instance of InstanceVars - # - # source://pry//lib/pry/commands/ls/instance_vars.rb#9 - def initialize(interrogatee, no_user_opts, opts, pry_instance); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/instance_vars.rb#16 - def correct_opts?; end - - # source://pry//lib/pry/commands/ls/instance_vars.rb#20 - def output_self; end - - private - - # source://pry//lib/pry/commands/ls/instance_vars.rb#34 - def format(type, vars); end -end - -# source://pry//lib/pry/commands/ls/interrogatable.rb#6 -module Pry::Command::Ls::Interrogatable - private - - # source://pry//lib/pry/commands/ls/interrogatable.rb#13 - def interrogatee_mod; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/interrogatable.rb#9 - def interrogating_a_module?; end -end - -# source://pry//lib/pry/commands/ls/jruby_hacks.rb#6 -module Pry::Command::Ls::JRubyHacks - private - - # When removing jruby aliases, we want to keep the alias that is - # "least rubbish" according to this metric. - # - # source://pry//lib/pry/commands/ls/jruby_hacks.rb#40 - def rubbishness(name); end - - # JRuby creates lots of aliases for methods imported from java in an attempt - # to make life easier for ruby programmers. (e.g. getFooBar becomes - # get_foo_bar and foo_bar, and maybe foo_bar? if it returns a Boolean). The - # full transformations are in the assignAliases method of: - # https://github.com/jruby/jruby/blob/master/src/org/jruby/javasupport/JavaClass.java - # - # This has the unfortunate side-effect of making the output of ls even more - # incredibly verbose than it normally would be for these objects; and so we - # filter out all but the nicest of these aliases here. - # - # TODO: This is a little bit vague, better heuristics could be used. - # JRuby also has a lot of scala-specific logic, which we don't copy. - # - # source://pry//lib/pry/commands/ls/jruby_hacks.rb#21 - def trim_jruby_aliases(methods); end -end - -# source://pry//lib/pry/commands/ls/local_names.rb#6 -class Pry::Command::Ls::LocalNames < ::Pry::Command::Ls::Formatter - # @return [LocalNames] a new instance of LocalNames - # - # source://pry//lib/pry/commands/ls/local_names.rb#7 - def initialize(no_user_opts, args, pry_instance); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/local_names.rb#14 - def correct_opts?; end - - # source://pry//lib/pry/commands/ls/local_names.rb#18 - def output_self; end - - private - - # source://pry//lib/pry/commands/ls/local_names.rb#25 - def format(locals); end -end - -# source://pry//lib/pry/commands/ls/local_vars.rb#6 -class Pry::Command::Ls::LocalVars < ::Pry::Command::Ls::Formatter - # @return [LocalVars] a new instance of LocalVars - # - # source://pry//lib/pry/commands/ls/local_vars.rb#7 - def initialize(opts, pry_instance); end - - # source://pry//lib/pry/commands/ls/local_vars.rb#13 - def output_self; end - - private - - # source://pry//lib/pry/commands/ls/local_vars.rb#34 - def colorized_assignment_style(lhs, rhs, desired_width = T.unsafe(nil)); end - - # source://pry//lib/pry/commands/ls/local_vars.rb#25 - def format(name_value_pairs); end -end - -# source://pry//lib/pry/commands/ls/ls_entity.rb#6 -class Pry::Command::Ls::LsEntity - # @return [LsEntity] a new instance of LsEntity - # - # source://pry//lib/pry/commands/ls/ls_entity.rb#9 - def initialize(opts); end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#18 - def entities_table; end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/commands/ls/ls_entity.rb#7 - def pry_instance; end - - private - - # source://pry//lib/pry/commands/ls/ls_entity.rb#32 - def constants; end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#56 - def entities; end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#28 - def globals; end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#24 - def grep(entity); end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#44 - def instance_vars; end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#48 - def local_names; end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#52 - def local_vars; end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#36 - def methods; end - - # source://pry//lib/pry/commands/ls/ls_entity.rb#40 - def self_methods; end -end - -# source://pry//lib/pry/commands/ls/methods.rb#6 -class Pry::Command::Ls::Methods < ::Pry::Command::Ls::Formatter - include ::Pry::Command::Ls::Interrogatable - include ::Pry::Command::Ls::JRubyHacks - include ::Pry::Command::Ls::MethodsHelper - - # @return [Methods] a new instance of Methods - # - # source://pry//lib/pry/commands/ls/methods.rb#10 - def initialize(interrogatee, no_user_opts, opts, pry_instance); end - - # source://pry//lib/pry/commands/ls/methods.rb#22 - def output_self; end - - private - - # Get a lambda that can be used with `take_while` to prevent over-eager - # traversal of the Object's ancestry graph. - # - # source://pry//lib/pry/commands/ls/methods.rb#41 - def below_ceiling; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/methods.rb#35 - def correct_opts?; end -end - -# source://pry//lib/pry/commands/ls/methods_helper.rb#6 -module Pry::Command::Ls::MethodsHelper - include ::Pry::Command::Ls::JRubyHacks - - private - - # Get all the methods that we'll want to output. - # - # source://pry//lib/pry/commands/ls/methods_helper.rb#12 - def all_methods(instance_methods = T.unsafe(nil)); end - - # source://pry//lib/pry/commands/ls/methods_helper.rb#34 - def format(methods); end - - # source://pry//lib/pry/commands/ls/methods_helper.rb#26 - def resolution_order; end -end - -# source://pry//lib/pry/commands/ls/self_methods.rb#6 -class Pry::Command::Ls::SelfMethods < ::Pry::Command::Ls::Formatter - include ::Pry::Command::Ls::Interrogatable - include ::Pry::Command::Ls::JRubyHacks - include ::Pry::Command::Ls::MethodsHelper - - # @return [SelfMethods] a new instance of SelfMethods - # - # source://pry//lib/pry/commands/ls/self_methods.rb#10 - def initialize(interrogatee, no_user_opts, opts, pry_instance); end - - # source://pry//lib/pry/commands/ls/self_methods.rb#18 - def output_self; end - - private - - # @return [Boolean] - # - # source://pry//lib/pry/commands/ls/self_methods.rb#28 - def correct_opts?; end -end - -# source://pry//lib/pry/commands/nesting.rb#5 -class Pry::Command::Nesting < ::Pry::ClassCommand - # source://pry//lib/pry/commands/nesting.rb#14 - def process; end -end - -# source://pry//lib/pry/commands/play.rb#5 -class Pry::Command::Play < ::Pry::ClassCommand - # source://pry//lib/pry/commands/play.rb#74 - def code_object; end - - # source://pry//lib/pry/commands/play.rb#82 - def content; end - - # source://pry//lib/pry/commands/play.rb#60 - def content_after_options; end - - # source://pry//lib/pry/commands/play.rb#70 - def content_at_expression; end - - # The file to play from when no code object is specified. - # e.g `play --lines 4..10` - # - # source://pry//lib/pry/commands/play.rb#92 - def default_file; end - - # source://pry//lib/pry/commands/play.rb#102 - def file_content; end - - # source://pry//lib/pry/commands/play.rb#29 - def options(opt); end - - # source://pry//lib/pry/commands/play.rb#48 - def perform_play; end - - # source://pry//lib/pry/commands/play.rb#41 - def process; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/play.rb#78 - def should_use_default_file?; end - - # source://pry//lib/pry/commands/play.rb#53 - def show_input; end -end - -# source://pry//lib/pry/commands/pry_backtrace.rb#5 -class Pry::Command::PryBacktrace < ::Pry::ClassCommand - # source://pry//lib/pry/commands/pry_backtrace.rb#22 - def process; end -end - -# source://pry//lib/pry/commands/raise_up.rb#6 -class Pry::Command::RaiseUp < ::Pry::ClassCommand - # source://pry//lib/pry/commands/raise_up.rb#27 - def process; end -end - -# source://pry//lib/pry/commands/reload_code.rb#5 -class Pry::Command::ReloadCode < ::Pry::ClassCommand - # source://pry//lib/pry/commands/reload_code.rb#20 - def process; end - - private - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/reload_code.rb#58 - def check_for_reloadability(code_object, identifier); end - - # source://pry//lib/pry/commands/reload_code.rb#32 - def current_file; end - - # source://pry//lib/pry/commands/reload_code.rb#42 - def reload_current_file; end - - # source://pry//lib/pry/commands/reload_code.rb#51 - def reload_object(identifier); end -end - -# source://pry//lib/pry/commands/reset.rb#5 -class Pry::Command::Reset < ::Pry::ClassCommand - # source://pry//lib/pry/commands/reset.rb#14 - def process; end -end - -# source://pry//lib/pry/commands/ri.rb#7 -class Pry::Command::Ri < ::Pry::ClassCommand - # source://pry//lib/pry/commands/ri.rb#21 - def process(spec); end -end - -# source://pry//lib/pry/commands/save_file.rb#5 -class Pry::Command::SaveFile < ::Pry::ClassCommand - # source://pry//lib/pry/commands/save_file.rb#50 - def display_content; end - - # source://pry//lib/pry/commands/save_file.rb#39 - def file_name; end - - # source://pry//lib/pry/commands/save_file.rb#56 - def mode; end - - # source://pry//lib/pry/commands/save_file.rb#21 - def options(opt); end - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/save_file.rb#28 - def process; end - - # source://pry//lib/pry/commands/save_file.rb#43 - def save_file; end -end - -# source://pry//lib/pry/commands/shell_command.rb#5 -class Pry::Command::ShellCommand < ::Pry::ClassCommand - # source://pry//lib/pry/commands/shell_command.rb#21 - def process(cmd); end - - private - - # source://pry//lib/pry/commands/shell_command.rb#50 - def cd_path_env; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/shell_command.rb#54 - def cd_path_exists?; end - - # source://pry//lib/pry/commands/shell_command.rb#36 - def parse_destination(dest); end - - # source://pry//lib/pry/commands/shell_command.rb#58 - def path_from_cd_path(dest); end - - # source://pry//lib/pry/commands/shell_command.rb#43 - def process_cd(dest); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/shell_command.rb#68 - def special_case_path?(dest); end -end - -# source://pry//lib/pry/commands/shell_mode.rb#5 -class Pry::Command::ShellMode < ::Pry::ClassCommand - # source://pry//lib/pry/commands/shell_mode.rb#14 - def process; end -end - -# source://pry//lib/pry/commands/show_doc.rb#5 -class Pry::Command::ShowDoc < ::Pry::Command::ShowInfo - include ::Pry::Helpers::DocumentationHelpers - - # The docs for code_object prepared for display. - # - # source://pry//lib/pry/commands/show_doc.rb#35 - def content_for(code_object); end - - # Return docs for the code_object, adjusting for whether the code_object - # has yard docs available, in which case it returns those. - # (note we only have to check yard docs for modules since they can - # have multiple docs, but methods can only be doc'd once so we - # dont need to check them) - # - # source://pry//lib/pry/commands/show_doc.rb#64 - def docs_for(code_object); end - - # Which sections to include in the 'header', can toggle: :owner, - # :signature and visibility. - # - # source://pry//lib/pry/commands/show_doc.rb#76 - def header_options; end - - # source://pry//lib/pry/commands/show_doc.rb#24 - def process; end - - # process the markup (if necessary) and apply colors - # - # source://pry//lib/pry/commands/show_doc.rb#44 - def render_doc_markup_for(code_object); end - - # figure out start line of docs by back-calculating based on - # number of lines in the comment and the start line of the code_object - # - # @return [Fixnum] start line of docs - # - # source://pry//lib/pry/commands/show_doc.rb#83 - def start_line_for(code_object); end -end - -# source://pry//lib/pry/commands/show_info.rb#5 -class Pry::Command::ShowInfo < ::Pry::ClassCommand - extend ::Pry::Helpers::BaseHelpers - - # @return [ShowInfo] a new instance of ShowInfo - # - # source://pry//lib/pry/commands/show_info.rb#10 - def initialize(*_arg0); end - - # source://pry//lib/pry/commands/show_info.rb#127 - def code_object_header(code_object, line_num); end - - # This method checks whether the `code_object` is a WrappedModule, if it - # is, then it returns the first candidate (monkeypatch) with accessible - # source (or docs). If `code_object` is not a WrappedModule (i.e a method - # or a command) then the `code_object` itself is just returned. - # - # @raise [CommandError] - # @return [Pry::WrappedModule, Pry::Method, Pry::Command] - # - # source://pry//lib/pry/commands/show_info.rb#61 - def code_object_with_accessible_source(code_object); end - - # source://pry//lib/pry/commands/show_info.rb#213 - def complete(input); end - - # source://pry//lib/pry/commands/show_info.rb#77 - def content_and_header_for_code_object(code_object); end - - # source://pry//lib/pry/commands/show_info.rb#81 - def content_and_headers_for_all_module_candidates(mod); end - - # takes into account possible yard docs, and returns yard_file / yard_line - # Also adjusts for start line of comments (using start_line_for), which it - # has to infer by subtracting number of lines of comment from start line - # of code_object - # - # source://pry//lib/pry/commands/show_info.rb#205 - def file_and_line_for(code_object); end - - # Generate a header (meta-data information) for all the code - # object types: methods, modules, commands, procs... - # - # source://pry//lib/pry/commands/show_info.rb#106 - def header(code_object); end - - # source://pry//lib/pry/commands/show_info.rb#173 - def header_options; end - - # source://pry//lib/pry/commands/show_info.rb#142 - def method_header(code_object, line_num); end - - # source://pry//lib/pry/commands/show_info.rb#165 - def method_sections(code_object); end - - # source://pry//lib/pry/commands/show_info.rb#151 - def module_header(code_object, line_num); end - - # source://pry//lib/pry/commands/show_info.rb#100 - def no_definition_message; end - - # source://pry//lib/pry/commands/show_info.rb#185 - def obj_name; end - - # source://pry//lib/pry/commands/show_info.rb#16 - def options(opt); end - - # @raise [CommandError] - # - # source://pry//lib/pry/commands/show_info.rb#26 - def process; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/show_info.rb#181 - def show_all_modules?(code_object); end - - # source://pry//lib/pry/commands/show_info.rb#193 - def start_line_for(code_object); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/show_info.rb#189 - def use_line_numbers?; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/show_info.rb#73 - def valid_superclass?(code_object); end -end - -# source://pry//lib/pry/commands/show_input.rb#5 -class Pry::Command::ShowInput < ::Pry::ClassCommand - # source://pry//lib/pry/commands/show_input.rb#15 - def process; end -end - -# source://pry//lib/pry/commands/show_source.rb#5 -class Pry::Command::ShowSource < ::Pry::Command::ShowInfo - include ::Pry::Helpers::DocumentationHelpers - - # The source for code_object prepared for display. - # - # source://pry//lib/pry/commands/show_source.rb#48 - def content_for(code_object); end - - # Return docs for the code_object, adjusting for whether the code_object - # has yard docs available, in which case it returns those. - # (note we only have to check yard docs for modules since they can - # have multiple docs, but methods can only be doc'd once so we - # dont need to check them) - # - # source://pry//lib/pry/commands/show_source.rb#86 - def docs_for(code_object); end - - # Which sections to include in the 'header', can toggle: :owner, - # :signature and visibility. - # - # source://pry//lib/pry/commands/show_source.rb#98 - def header_options; end - - # source://pry//lib/pry/commands/show_source.rb#31 - def options(opt); end - - # source://pry//lib/pry/commands/show_source.rb#38 - def process; end - - # process the markup (if necessary) and apply colors - # - # source://pry//lib/pry/commands/show_source.rb#66 - def render_doc_markup_for(code_object); end - - # figure out start line of docs by back-calculating based on - # number of lines in the comment and the start line of the code_object - # - # @return [Fixnum] start line of docs - # - # source://pry//lib/pry/commands/show_source.rb#105 - def start_line_for(code_object); end -end - -# source://pry//lib/pry/commands/stat.rb#5 -class Pry::Command::Stat < ::Pry::ClassCommand - # source://pry//lib/pry/commands/stat.rb#19 - def options(opt); end - - # source://pry//lib/pry/commands/stat.rb#23 - def process; end -end - -# source://pry//lib/pry/commands/switch_to.rb#5 -class Pry::Command::SwitchTo < ::Pry::ClassCommand - # source://pry//lib/pry/commands/switch_to.rb#14 - def process(selection); end -end - -# source://pry//lib/pry/commands/toggle_color.rb#5 -class Pry::Command::ToggleColor < ::Pry::ClassCommand - # source://pry//lib/pry/commands/toggle_color.rb#21 - def color_toggle; end - - # source://pry//lib/pry/commands/toggle_color.rb#16 - def process; end -end - -# represents a void return value for a command -# -# source://pry//lib/pry/command.rb#20 -Pry::Command::VOID_VALUE = T.let(T.unsafe(nil), Object) - -# source://pry//lib/pry/commands/pry_version.rb#5 -class Pry::Command::Version < ::Pry::ClassCommand - # source://pry//lib/pry/commands/pry_version.rb#14 - def process; end -end - -# source://pry//lib/pry/commands/watch_expression.rb#5 -class Pry::Command::WatchExpression < ::Pry::ClassCommand - # source://pry//lib/pry/commands/watch_expression.rb#31 - def options(opt); end - - # source://pry//lib/pry/commands/watch_expression.rb#42 - def process; end - - private - - # TODO: fix arguments. - # https://github.com/pry/pry/commit/b031df2f2f5850ee6e9018f33d35f3485a9b0423 - # - # source://pry//lib/pry/commands/watch_expression.rb#93 - def add_expression(_arguments); end - - # source://pry//lib/pry/commands/watch_expression.rb#98 - def add_hook; end - - # source://pry//lib/pry/commands/watch_expression.rb#59 - def delete(index); end - - # source://pry//lib/pry/commands/watch_expression.rb#84 - def eval_and_print_changed(output); end - - # source://pry//lib/pry/commands/watch_expression.rb#55 - def expressions; end - - # source://pry//lib/pry/commands/watch_expression.rb#69 - def list; end -end - -# source://pry//lib/pry/commands/watch_expression/expression.rb#6 -class Pry::Command::WatchExpression::Expression - # @return [Expression] a new instance of Expression - # - # source://pry//lib/pry/commands/watch_expression/expression.rb#9 - def initialize(pry_instance, target, source); end - - # Has the value of the expression changed? - # - # We use the pretty-printed string represenation to detect differences - # as this avoids problems with dup (causes too many differences) and == - # (causes too few) - # - # @return [Boolean] - # - # source://pry//lib/pry/commands/watch_expression/expression.rb#29 - def changed?; end - - # source://pry//lib/pry/commands/watch_expression/expression.rb#15 - def eval!; end - - # Returns the value of attribute previous_value. - # - # source://pry//lib/pry/commands/watch_expression/expression.rb#7 - def previous_value; end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/commands/watch_expression/expression.rb#7 - def pry_instance; end - - # Returns the value of attribute source. - # - # source://pry//lib/pry/commands/watch_expression/expression.rb#7 - def source; end - - # Returns the value of attribute target. - # - # source://pry//lib/pry/commands/watch_expression/expression.rb#7 - def target; end - - # source://pry//lib/pry/commands/watch_expression/expression.rb#20 - def to_s; end - - # Returns the value of attribute value. - # - # source://pry//lib/pry/commands/watch_expression/expression.rb#7 - def value; end - - private - - # source://pry//lib/pry/commands/watch_expression/expression.rb#35 - def target_eval(target, source); end -end - -# source://pry//lib/pry/commands/whereami.rb#7 -class Pry::Command::Whereami < ::Pry::ClassCommand - # @return [Whereami] a new instance of Whereami - # - # source://pry//lib/pry/commands/whereami.rb#8 - def initialize(*_arg0); end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#83 - def bad_option_combination?; end - - # source://pry//lib/pry/commands/whereami.rb#63 - def code; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#77 - def code?; end - - # source://pry//lib/pry/commands/whereami.rb#88 - def location; end - - # source://pry//lib/pry/commands/whereami.rb#55 - def options(opt); end - - # source://pry//lib/pry/commands/whereami.rb#92 - def process; end - - # source://pry//lib/pry/commands/whereami.rb#44 - def setup; end - - private - - # source://pry//lib/pry/commands/whereami.rb#171 - def class_code; end - - # source://pry//lib/pry/commands/whereami.rb#152 - def code_window; end - - # source://pry//lib/pry/commands/whereami.rb#144 - def default_code; end - - # source://pry//lib/pry/commands/whereami.rb#185 - def expand_path(filename); end - - # source://pry//lib/pry/commands/whereami.rb#132 - def handle_internal_binding; end - - # source://pry//lib/pry/commands/whereami.rb#124 - def marker; end - - # source://pry//lib/pry/commands/whereami.rb#156 - def method_code; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#116 - def nothing_to_do?; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#140 - def small_method?; end - - # This either returns the `target_self` - # or it returns the class of `target_self` if `target_self` is not a class. - # - # @return [Pry::WrappedModule] - # - # source://pry//lib/pry/commands/whereami.rb#165 - def target_class; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#128 - def top_level?; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#120 - def use_line_numbers?; end - - # @return [Boolean] - # - # source://pry//lib/pry/commands/whereami.rb#180 - def valid_method?; end - - # source://pry//lib/pry/commands/whereami.rb#192 - def window_size; end - - class << self - # Returns the value of attribute method_size_cutoff. - # - # source://pry//lib/pry/commands/whereami.rb#15 - def method_size_cutoff; end - - # Sets the attribute method_size_cutoff - # - # @param value the value to set the attribute method_size_cutoff to. - # - # source://pry//lib/pry/commands/whereami.rb#15 - def method_size_cutoff=(_arg0); end - end -end - -# source://pry//lib/pry/commands/wtf.rb#5 -class Pry::Command::Wtf < ::Pry::ClassCommand - # source://pry//lib/pry/commands/wtf.rb#27 - def options(opt); end - - # source://pry//lib/pry/commands/wtf.rb#32 - def process; end - - private - - # source://pry//lib/pry/commands/wtf.rb#64 - def format_backtrace(backtrace); end - - # source://pry//lib/pry/commands/wtf.rb#60 - def format_header(title, exception); end - - # source://pry//lib/pry/commands/wtf.rb#83 - def read_line(file, line); end - - # source://pry//lib/pry/commands/wtf.rb#76 - def trim_backtrace(backtrace); end - - # source://pry//lib/pry/commands/wtf.rb#48 - def unwind_exceptions; end -end - -# source://pry//lib/pry/commands/wtf.rb#25 -Pry::Command::Wtf::RUBY_FRAME_PATTERN = T.let(T.unsafe(nil), Regexp) - -# CommandErrors are caught by the REPL loop and displayed to the user. They -# indicate an exceptional condition that's fatal to the current command. -# -# source://pry//lib/pry/exceptions.rb#68 -class Pry::CommandError < ::StandardError; end - -# This class is used to create sets of commands. Commands can be imported from -# different sets, aliased, removed, etc. -# -# source://pry//lib/pry/command_set.rb#12 -class Pry::CommandSet - include ::Enumerable - include ::Pry::Helpers::BaseHelpers - - # @param imported_sets [Array] Sets which will be imported automatically - # @return [CommandSet] a new instance of CommandSet - # @yield Optional block run to define commands - # - # source://pry//lib/pry/command_set.rb#20 - def initialize(*imported_sets, &block); end - - # Find a command that matches the given line - # - # @param pattern [String] The line that might be a command invocation - # @return [Pry::Command, nil] - # - # source://pry//lib/pry/command_set.rb#275 - def [](pattern); end - - # Re-assign the command found at _pattern_ with _command_. - # - # @example - # Pry.config.commands["help"] = MyHelpCommand - # @param pattern [Regexp, String] The command to add or replace(found at _pattern_). - # @param command [Pry::Command] The command to add. - # @return [Pry::Command] Returns the new command (matched with "pattern".) - # - # source://pry//lib/pry/command_set.rb#298 - def []=(pattern, command); end - - # Add a command to set. - # - # @param command [Command] a subclass of Pry::Command. - # - # source://pry//lib/pry/command_set.rb#324 - def add_command(command); end - - # Aliases a command - # - # @example Creating an alias for `ls -M` - # Pry.config.commands.alias_command "lM", "ls -M" - # @example Pass explicit description (overriding default). - # Pry.config.commands.alias_command "lM", "ls -M", :desc => "cutiepie" - # @param match [String, Regex] The match of the alias (can be a regex). - # @param action [String] The action to be performed (typically - # another command). - # @param options [Hash] The optional configuration parameters, - # accepts the same as the `command` method, but also allows the - # command description to be passed this way too as `:desc` - # - # source://pry//lib/pry/command_set.rb#190 - def alias_command(match, action, options = T.unsafe(nil)); end - - # Defines a new Pry command. - # - # @example - # MyCommands = Pry::CommandSet.new do - # command "greet", "Greet somebody" do |name| - # puts "Good afternoon #{name.capitalize}!" - # end - # end - # - # # From pry: - # # pry(main)> pry_instance.commands = MyCommands - # # pry(main)> greet john - # # Good afternoon John! - # # pry(main)> help greet - # # Greet somebody - # @example Regexp command - # MyCommands = Pry::CommandSet.new do - # command( - # /number-(\d+)/, "number-N regex command", :listing => "number" - # ) do |num, name| - # puts "hello #{name}, nice number: #{num}" - # end - # end - # - # # From pry: - # # pry(main)> pry_instance.commands = MyCommands - # # pry(main)> number-10 john - # # hello john, nice number: 10 - # # pry(main)> help number - # # number-N regex command - # @option options - # @option options - # @option options - # @option options - # @option options - # @param match [String, Regexp] The start of invocations of this command. - # @param description [String] A description of the command. - # @param options [Hash] The optional configuration parameters. - # @yield The action to perform. The parameters in the block - # determines the parameters the command will receive. All - # parameters passed into the block will be strings. Successive - # command parameters are separated by whitespace at the Pry prompt. - # - # source://pry//lib/pry/command_set.rb#78 - def block_command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # Defines a new Pry command. - # - # @example - # MyCommands = Pry::CommandSet.new do - # command "greet", "Greet somebody" do |name| - # puts "Good afternoon #{name.capitalize}!" - # end - # end - # - # # From pry: - # # pry(main)> pry_instance.commands = MyCommands - # # pry(main)> greet john - # # Good afternoon John! - # # pry(main)> help greet - # # Greet somebody - # @example Regexp command - # MyCommands = Pry::CommandSet.new do - # command( - # /number-(\d+)/, "number-N regex command", :listing => "number" - # ) do |num, name| - # puts "hello #{name}, nice number: #{num}" - # end - # end - # - # # From pry: - # # pry(main)> pry_instance.commands = MyCommands - # # pry(main)> number-10 john - # # hello john, nice number: 10 - # # pry(main)> help number - # # number-N regex command - # @option options - # @option options - # @option options - # @option options - # @option options - # @param match [String, Regexp] The start of invocations of this command. - # @param description [String] A description of the command. - # @param options [Hash] The optional configuration parameters. - # @yield The action to perform. The parameters in the block - # determines the parameters the command will receive. All - # parameters passed into the block will be strings. Successive - # command parameters are separated by whitespace at the Pry prompt. - # - # source://pry//lib/pry/command_set.rb#78 - def command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # Generate completions for the user's search. - # - # @param search [String] The line to search for - # @param context [Hash] The context to create the command with - # @return [Array] - # - # source://pry//lib/pry/command_set.rb#365 - def complete(search, context = T.unsafe(nil)); end - - # Defines a new Pry command class. - # - # @example - # Pry::Commands.create_command "echo", "echo's the input", :shellwords => false do - # def options(opt) - # opt.banner "Usage: echo [-u | -d] " - # opt.on :u, :upcase, "ensure the output is all upper-case" - # opt.on :d, :downcase, "ensure the output is all lower-case" - # end - # - # def process - # if opts.present?(:u) && opts.present?(:d) - # raise Pry::CommandError, "-u and -d makes no sense" - # end - # result = args.join(" ") - # result.downcase! if opts.present?(:downcase) - # result.upcase! if opts.present?(:upcase) - # output.puts result - # end - # end - # @param match [String, Regexp] The start of invocations of this command. - # @param description [String] A description of the command. - # @param options [Hash] The optional configuration parameters, see {#command} - # @yield The class body's definition. - # - # source://pry//lib/pry/command_set.rb#117 - def create_command(match, description = T.unsafe(nil), options = T.unsafe(nil), &block); end - - # Removes some commands from the set - # - # @param searches [Array] the matches or listings of the commands - # to remove - # - # source://pry//lib/pry/command_set.rb#138 - def delete(*searches); end - - # Sets or gets the description for a command (replacing the old - # description). Returns current description if no description - # parameter provided. - # - # @example Setting - # MyCommands = Pry::CommandSet.new do - # desc "help", "help description" - # end - # @example Getting - # Pry.config.commands.desc "amend-line" - # @param search [String, Regexp] The command match. - # @param description [String?] (nil) The command description. - # - # source://pry//lib/pry/command_set.rb#253 - def desc(search, description = T.unsafe(nil)); end - - # source://pry//lib/pry/command_set.rb#131 - def each(&block); end - - # Find a command that matches the given line - # - # @param pattern [String] The line that might be a command invocation - # @return [Pry::Command, nil] - # - # source://pry//lib/pry/command_set.rb#275 - def find_command(pattern); end - - # @param match_or_listing [String, Regexp] The match or listing of a command. - # of the command to retrieve. - # @return [Command] The command object matched. - # - # source://pry//lib/pry/command_set.rb#173 - def find_command_by_match_or_listing(match_or_listing); end - - # Find the command that the user might be trying to refer to. - # - # @param search [String] The user's search. - # @return [Pry::Command?] - # - # source://pry//lib/pry/command_set.rb#331 - def find_command_for_help(search); end - - # Returns the value of attribute helper_module. - # - # source://pry//lib/pry/command_set.rb#15 - def helper_module; end - - # Imports all the commands from one or more sets. - # - # @param sets [Array] Command sets, all of the commands of which - # will be imported. - # @return [Pry::CommandSet] Returns the reciever (a command set). - # - # source://pry//lib/pry/command_set.rb#149 - def import(*sets); end - - # Imports some commands from a set - # - # @param set [CommandSet] Set to import commands from - # @param matches [Array] Commands to import - # @return [Pry::CommandSet] Returns the reciever (a command set). - # - # source://pry//lib/pry/command_set.rb#161 - def import_from(set, *matches); end - - # @return [Array] The list of commands provided by the command set. - # - # source://pry//lib/pry/command_set.rb#262 - def keys; end - - # @return [Array] The list of commands provided by the command set. - # - # source://pry//lib/pry/command_set.rb#262 - def list_commands; end - - # Process the given line to see whether it needs executing as a command. - # - # @param val [String] The line to execute - # @param context [Hash] The context to execute the commands with - # @return [CommandSet::Result] - # - # source://pry//lib/pry/command_set.rb#351 - def process_line(val, context = T.unsafe(nil)); end - - # Rename a command. Accepts either match or listing for the search. - # - # @example Renaming the `ls` command and changing its description. - # Pry.config.commands.rename "dir", "ls", :description => "DOS friendly ls" - # @param new_match [String, Regexp] The new match for the command. - # @param search [String, Regexp] The command's current match or listing. - # @param options [Hash] The optional configuration parameters, - # accepts the same as the `command` method, but also allows the - # command description to be passed this way too. - # - # source://pry//lib/pry/command_set.rb#227 - def rename_command(new_match, search, options = T.unsafe(nil)); end - - # source://pry//lib/pry/command_set.rb#267 - def to_h; end - - # source://pry//lib/pry/command_set.rb#267 - def to_hash; end - - # Is the given line a command invocation? - # - # @param val [String] - # @return [Boolean] - # - # source://pry//lib/pry/command_set.rb#343 - def valid_command?(val); end - - private - - # Defines helpers methods for this command sets. - # Those helpers are only defined in this command set. - # - # @example - # helpers do - # def hello - # puts "Hello!" - # end - # - # include OtherModule - # end - # @yield A block defining helper methods - # - # source://pry//lib/pry/command_set.rb#390 - def helpers(&block); end -end - -# CommandState is a data structure to hold per-command state. -# -# Pry commands can store arbitrary state here. This state persists between -# subsequent command invocations. All state saved here is unique to the -# command. -# -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/command_state.rb#14 -class Pry::CommandState - # @api private - # @return [CommandState] a new instance of CommandState - # @since v0.13.0 - # - # source://pry//lib/pry/command_state.rb#19 - def initialize; end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/command_state.rb#27 - def reset(command_name); end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/command_state.rb#23 - def state_for(command_name); end - - class << self - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/command_state.rb#15 - def default; end - end -end - -# source://pry//lib/pry.rb#35 -Pry::Commands = T.let(T.unsafe(nil), Pry::CommandSet) - -# @api private -# -# source://pry//lib/pry/config/attributable.rb#4 -class Pry::Config - extend ::Pry::Config::Attributable - - # @api private - # @return [Config] a new instance of Config - # - # source://pry//lib/pry/config.rb#154 - def initialize; end - - # @api private - # - # source://pry//lib/pry/config.rb#234 - def [](attr); end - - # @api private - # - # source://pry//lib/pry/config.rb#230 - def []=(attr, value); end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 - def auto_indent; end - - # source://pry//lib/pry/config/attributable.rb#18 - def auto_indent=(_arg0); end - - # @api private - # @return [Boolean] whether or not display a warning when a command name - # collides with a method/local in the current context. - # - # source://pry//lib/pry/config/attributable.rb#13 - def collision_warning; end - - # source://pry//lib/pry/config/attributable.rb#18 - def collision_warning=(_arg0); end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 - def color; end - - # source://pry//lib/pry/config/attributable.rb#18 - def color=(_arg0); end - - # @api private - # @return [Proc] - # - # source://pry//lib/pry/config/attributable.rb#13 - def command_completions; end - - # source://pry//lib/pry/config/attributable.rb#18 - def command_completions=(_arg0); end - - # A string that must precede all commands. For example, if is is - # set to "%", the "cd" command must be invoked as "%cd"). - # - # @api private - # @return [String] - # - # source://pry//lib/pry/config/attributable.rb#13 - def command_prefix; end - - # source://pry//lib/pry/config/attributable.rb#18 - def command_prefix=(_arg0); end - - # @api private - # @return [Pry::CommandSet] - # - # source://pry//lib/pry/config/attributable.rb#13 - def commands; end - - # source://pry//lib/pry/config/attributable.rb#18 - def commands=(_arg0); end - - # @api private - # @return [#build_completion_proc] a completer to use - # - # source://pry//lib/pry/config/attributable.rb#13 - def completer; end - - # source://pry//lib/pry/config/attributable.rb#18 - def completer=(_arg0); end - - # @api private - # - # source://pry//lib/pry/config.rb#259 - def control_d_handler; end - - # @api private - # - # source://pry//lib/pry/config.rb#260 - def control_d_handler=(value); end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 - def correct_indent; end - - # source://pry//lib/pry/config/attributable.rb#18 - def correct_indent=(_arg0); end - - # @api private - # @return [Integer] The number of lines of context to show before and after - # exceptions - # - # source://pry//lib/pry/config/attributable.rb#13 - def default_window_size; end - - # source://pry//lib/pry/config/attributable.rb#18 - def default_window_size=(_arg0); end - - # @api private - # @return [Boolean] whether to disable edit-method's auto-reloading behavior - # - # source://pry//lib/pry/config/attributable.rb#13 - def disable_auto_reload; end - - # source://pry//lib/pry/config/attributable.rb#18 - def disable_auto_reload=(_arg0); end - - # If it is a String, then that String is used as the shell - # command to invoke the editor. - # - # If it responds to #call is callable then `file`, `line`, and `reloading` - # are passed to it. `reloading` indicates whether Pry will be reloading code - # after the shell command returns. All parameters are optional. - # - # @api private - # @return [String, #call] - # - # source://pry//lib/pry/config/attributable.rb#13 - def editor; end - - # source://pry//lib/pry/config/attributable.rb#18 - def editor=(_arg0); end - - # @api private - # @return [Proc] the printer for exceptions - # - # source://pry//lib/pry/config/attributable.rb#13 - def exception_handler; end - - # source://pry//lib/pry/config/attributable.rb#18 - def exception_handler=(_arg0); end - - # @api private - # @deprecated - # @return [Array] Exception that Pry shouldn't rescue - # - # source://pry//lib/pry/config/attributable.rb#13 - def exception_whitelist; end - - # source://pry//lib/pry/config/attributable.rb#18 - def exception_whitelist=(_arg0); end - - # @api private - # @return [String] a line of code to execute in context before the session - # starts - # - # source://pry//lib/pry/config/attributable.rb#13 - def exec_string; end - - # source://pry//lib/pry/config/attributable.rb#18 - def exec_string=(_arg0); end - - # @api private - # @return [Hash{Symbol=>Proc}] - # - # source://pry//lib/pry/config/attributable.rb#13 - def extra_sticky_locals; end - - # source://pry//lib/pry/config/attributable.rb#18 - def extra_sticky_locals=(_arg0); end - - # @api private - # @return [Proc] - # - # source://pry//lib/pry/config/attributable.rb#13 - def file_completions; end - - # source://pry//lib/pry/config/attributable.rb#18 - def file_completions=(_arg0); end - - # @api private - # @return [Pry::History] - # - # source://pry//lib/pry/config/attributable.rb#13 - def history; end - - # source://pry//lib/pry/config/attributable.rb#18 - def history=(_arg0); end - - # @api private - # @return [String] - # - # source://pry//lib/pry/config/attributable.rb#13 - def history_file; end - - # source://pry//lib/pry/config/attributable.rb#18 - def history_file=(_arg0); end - - # @api private - # @return [Array] - # - # source://pry//lib/pry/config/attributable.rb#13 - def history_ignorelist; end - - # source://pry//lib/pry/config/attributable.rb#18 - def history_ignorelist=(_arg0); end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 - def history_load; end - - # source://pry//lib/pry/config/attributable.rb#18 - def history_load=(_arg0); end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 - def history_save; end - - # source://pry//lib/pry/config/attributable.rb#18 - def history_save=(_arg0); end - - # @api private - # @return [Pry::Hooks] - # - # source://pry//lib/pry/config/attributable.rb#13 - def hooks; end - - # source://pry//lib/pry/config/attributable.rb#18 - def hooks=(_arg0); end - - # @api private - # @return [IO, #readline] he object from which Pry retrieves its lines of - # input - # - # source://pry//lib/pry/config/attributable.rb#13 - def input; end - - # source://pry//lib/pry/config/attributable.rb#18 - def input=(_arg0); end - - # @api private - # @return [Hash] - # - # source://pry//lib/pry/config/attributable.rb#13 - def ls; end - - # source://pry//lib/pry/config/attributable.rb#18 - def ls=(_arg0); end - - # @api private - # @return [Integer] how many input/output lines to keep in memory - # - # source://pry//lib/pry/config/attributable.rb#13 - def memory_size; end - - # source://pry//lib/pry/config/attributable.rb#18 - def memory_size=(_arg0); end - - # @api private - # - # source://pry//lib/pry/config.rb#226 - def merge(config_hash); end - - # @api private - # - # source://pry//lib/pry/config.rb#221 - def merge!(config_hash); end - - # @api private - # - # source://pry//lib/pry/config.rb#239 - def method_missing(method_name, *args, &_block); end - - # @api private - # @return [IO, #puts] where Pry should output results provided by {input} - # - # source://pry//lib/pry/config/attributable.rb#13 - def output; end - - # source://pry//lib/pry/config/attributable.rb#18 - def output=(_arg0); end - - # @api private - # @return [String] - # - # source://pry//lib/pry/config/attributable.rb#13 - def output_prefix; end - - # source://pry//lib/pry/config/attributable.rb#18 - def output_prefix=(_arg0); end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 - def pager; end - - # source://pry//lib/pry/config/attributable.rb#18 - def pager=(_arg0); end - - # @api private - # @return [Proc] the printer for Ruby expressions (not commands) - # - # source://pry//lib/pry/config/attributable.rb#13 - def print; end - - # source://pry//lib/pry/config/attributable.rb#18 - def print=(_arg0); end - - # @api private - # @return [Pry::Prompt] - # - # source://pry//lib/pry/config/attributable.rb#13 - def prompt; end - - # source://pry//lib/pry/config/attributable.rb#18 - def prompt=(_arg0); end - - # @api private - # @return [String] The display name that is part of the prompt - # - # source://pry//lib/pry/config/attributable.rb#13 - def prompt_name; end - - # source://pry//lib/pry/config/attributable.rb#18 - def prompt_name=(_arg0); end - - # @api private - # @return [Array] the list of objects that are known to have a - # 1-line #inspect output suitable for prompt - # - # source://pry//lib/pry/config/attributable.rb#13 - def prompt_safe_contexts; end - - # source://pry//lib/pry/config/attributable.rb#18 - def prompt_safe_contexts=(_arg0); end - - # @api private - # @return [Boolean] suppresses whereami output on `binding.pry` - # - # source://pry//lib/pry/config/attributable.rb#13 - def quiet; end - - # source://pry//lib/pry/config/attributable.rb#18 - def quiet=(_arg0); end - - # @api private - # @return [String] - # @since v0.13.0 - # - # source://pry//lib/pry/config/attributable.rb#13 - def rc_file; end - - # source://pry//lib/pry/config/attributable.rb#18 - def rc_file=(_arg0); end - - # @api private - # @return [Array] Ruby files to be required - # - # source://pry//lib/pry/config/attributable.rb#13 - def requires; end - - # source://pry//lib/pry/config/attributable.rb#18 - def requires=(_arg0); end - - # @api private - # @return [Boolean] whether the local ./.pryrc should be loaded - # - # source://pry//lib/pry/config/attributable.rb#13 - def should_load_local_rc; end - - # source://pry//lib/pry/config/attributable.rb#18 - def should_load_local_rc=(_arg0); end - - # @api private - # @return [Boolean] whether the global ~/.pryrc should be loaded - # - # source://pry//lib/pry/config/attributable.rb#13 - def should_load_rc; end - - # source://pry//lib/pry/config/attributable.rb#18 - def should_load_rc=(_arg0); end - - # @api private - # @return [Boolean] whether to load files specified with the -r flag - # - # source://pry//lib/pry/config/attributable.rb#13 - def should_load_requires; end - - # source://pry//lib/pry/config/attributable.rb#18 - def should_load_requires=(_arg0); end - - # Whether Pry should trap SIGINT and cause it to raise an Interrupt - # exception. This is only useful on JRuby, MRI does this for us. - # - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config/attributable.rb#13 - def should_trap_interrupts; end - - # source://pry//lib/pry/config/attributable.rb#18 - def should_trap_interrupts=(_arg0); end - - # @api private - # @return [Proc] The proc that runs system commands - # - # source://pry//lib/pry/config/attributable.rb#13 - def system; end - - # source://pry//lib/pry/config/attributable.rb#18 - def system=(_arg0); end - - # @api private - # @return [Array] Exception that Pry shouldn't rescue - # - # source://pry//lib/pry/config/attributable.rb#13 - def unrescued_exceptions; end - - # source://pry//lib/pry/config/attributable.rb#18 - def unrescued_exceptions=(_arg0); end - - # @api private - # @return [Boolean] displays a warning about experience improvement on - # Windows - # - # source://pry//lib/pry/config/attributable.rb#13 - def windows_console_warning; end - - # source://pry//lib/pry/config/attributable.rb#18 - def windows_console_warning=(_arg0); end - - private - - # @api private - # - # source://pry//lib/pry/config.rb#303 - def default_rc_file; end - - # @api private - # - # source://pry//lib/pry/config.rb#254 - def initialize_dup(other); end - - # @api private - # - # source://pry//lib/pry/config.rb#289 - def lazy_readline; end - - # @api private - # @return [Boolean] - # - # source://pry//lib/pry/config.rb#250 - def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end -end - -# Attributable provides the ability to create "attribute" -# accessors. Attribute accessors create a standard "attr_writer" and a -# customised "attr_reader". This reader is Proc-aware (lazy). -# -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/config/attributable.rb#11 -module Pry::Config::Attributable - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/config/attributable.rb#12 - def attribute(attr_name); end -end - -# LazyValue is a Proc (block) wrapper. It is meant to be used as a -# configuration value. Subsequent `#call` calls always evaluate the given -# block. -# -# @api private -# @example -# num = 19 -# value = Pry::Config::LazyValue.new { num += 1 } -# value.foo # => 20 -# value.foo # => 21 -# value.foo # => 22 -# @see Pry::Config::MemoizedValue -# @since v0.13.0 -# -# source://pry//lib/pry/config/lazy_value.rb#19 -class Pry::Config::LazyValue - # @api private - # @return [LazyValue] a new instance of LazyValue - # @since v0.13.0 - # - # source://pry//lib/pry/config/lazy_value.rb#20 - def initialize(&block); end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/config/lazy_value.rb#24 - def call; end -end - -# MemoizedValue is a Proc (block) wrapper. It is meant to be used as a -# configuration value. Subsequent `#call` calls return the same memoized -# result. -# -# @api private -# @example -# num = 19 -# value = Pry::Config::MemoizedValue.new { num += 1 } -# value.call # => 20 -# value.call # => 20 -# value.call # => 20 -# @see Pry::Config::LazyValue -# @since v0.13.0 -# -# source://pry//lib/pry/config/memoized_value.rb#19 -class Pry::Config::MemoizedValue - # @api private - # @return [MemoizedValue] a new instance of MemoizedValue - # @since v0.13.0 - # - # source://pry//lib/pry/config/memoized_value.rb#20 - def initialize(&block); end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/config/memoized_value.rb#26 - def call; end -end - -# Value holds a value for the given attribute and decides how it should -# be read. Procs get called, other values are returned as is. -# -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/config/value.rb#10 -class Pry::Config::Value - # @api private - # @return [Value] a new instance of Value - # @since v0.13.0 - # - # source://pry//lib/pry/config/value.rb#11 - def initialize(value); end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/config/value.rb#15 - def call; end -end - -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/control_d_handler.rb#6 -module Pry::ControlDHandler - class << self - # Deal with the ^D key being pressed. Different behaviour in different - # cases: - # 1. In an expression behave like `!` command. - # 2. At top-level session behave like `exit` command. - # 3. In a nested session behave like `cd ..`. - # - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/control_d_handler.rb#12 - def default(pry_instance); end - end -end - -# source://pry//lib/pry/pry_instance.rb#59 -Pry::EMPTY_COMPLETIONS = T.let(T.unsafe(nil), Array) - -# source://pry//lib/pry/editor.rb#6 -class Pry::Editor - include ::Pry::Helpers::OptionsHelpers - include ::Pry::Helpers::CommandHelpers - - # @return [Editor] a new instance of Editor - # - # source://pry//lib/pry/editor.rb#27 - def initialize(pry_instance); end - - # Generate the string that's used to start the editor. This includes - # all the flags we want as well as the file and line number we - # want to open at. - # - # source://pry//lib/pry/editor.rb#60 - def build_editor_invocation_string(file, line, blocking); end - - # source://pry//lib/pry/editor.rb#31 - def edit_tempfile_with_content(initial_content, line = T.unsafe(nil)); end - - # source://pry//lib/pry/editor.rb#41 - def invoke_editor(file, line, blocking = T.unsafe(nil)); end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/editor.rb#25 - def pry_instance; end - - private - - # Some editors that run outside the terminal allow you to control whether or - # not to block the process from which they were launched (in this case, Pry). - # For those editors, return the flag that produces the desired behavior. - # - # source://pry//lib/pry/editor.rb#100 - def blocking_flag_for_editor(blocking); end - - # Get the name of the binary that Pry.config.editor points to. - # - # This is useful for deciding which flags we pass to the editor as - # we can just use the program's name and ignore any absolute paths. - # - # @example - # Pry.config.editor="/home/conrad/bin/textmate -w" - # editor_name - # # => textmate - # - # source://pry//lib/pry/editor.rb#151 - def editor_name; end - - # Start the editor running, using the calculated invocation string - # - # source://pry//lib/pry/editor.rb#76 - def open_editor(editor_invocation); end - - # We need JRuby specific code here cos just shelling out using - # system() appears to be pretty broken :/ - # - # source://pry//lib/pry/editor.rb#89 - def open_editor_on_jruby(editor_invocation); end - - # Return the syntax for a given editor for starting the editor - # and moving to a particular line within that file - # - # source://pry//lib/pry/editor.rb#115 - def start_line_syntax_for_editor(file_name, line_number); end - - class << self - # source://pry//lib/pry/editor.rb#7 - def default; end - end -end - -# Env is a helper module to work with environment variables. -# -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/env.rb#8 -module Pry::Env - class << self - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/env.rb#9 - def [](key); end - end -end - -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/exception_handler.rb#6 -module Pry::ExceptionHandler - class << self - # Will only show the first line of the backtrace. - # - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/exception_handler.rb#9 - def handle_exception(output, exception, _pry_instance); end - - private - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/exception_handler.rb#37 - def cause_text(cause); end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/exception_handler.rb#32 - def exception_text(exception); end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/exception_handler.rb#19 - def standard_error_text_for(exception); end - end -end - -# source://pry//lib/pry/forwardable.rb#4 -module Pry::Forwardable - include ::Forwardable - - # Since Ruby 2.4, Forwardable will print a warning when - # calling a method that is private on a delegate, and - # in the future it could be an error: https://bugs.ruby-lang.org/issues/12782#note-3 - # - # That's why we revert to a custom implementation for delegating one - # private method to another. - # - # source://pry//lib/pry/forwardable.rb#16 - def def_private_delegators(target, *private_delegates); end -end - -# When we try to get a binding for an object, we try to define a method on -# that Object's singleton class. This doesn't work for "frozen" Object's, and -# the exception is just a vanilla RuntimeError. -# -# source://pry//lib/pry/exceptions.rb#56 -module Pry::FrozenObjectException - class << self - # source://pry//lib/pry/exceptions.rb#57 - def ===(exception); end - end -end - -# @return [Boolean] true if this Ruby supports safe levels and tainting, -# to guard against using deprecated or unsupported features -# -# source://pry//lib/pry/pry_class.rb#11 -Pry::HAS_SAFE_LEVEL = T.let(T.unsafe(nil), FalseClass) - -# source://pry//lib/pry/helpers/base_helpers.rb#4 -module Pry::Helpers - class << self - # source://pry//lib/pry/helpers/table.rb#27 - def tablify(things, line_length, pry_instance = T.unsafe(nil)); end - - # source://pry//lib/pry/helpers/table.rb#5 - def tablify_or_one_line(heading, things, pry_instance = T.unsafe(nil)); end - - # source://pry//lib/pry/helpers/table.rb#16 - def tablify_to_screen_width(things, options, pry_instance = T.unsafe(nil)); end - end -end - -# source://pry//lib/pry/helpers/base_helpers.rb#5 -module Pry::Helpers::BaseHelpers - extend ::Pry::Helpers::BaseHelpers - - # source://pry//lib/pry/helpers/base_helpers.rb#43 - def colorize_code(code); end - - # source://pry//lib/pry/helpers/base_helpers.rb#27 - def find_command(name, set = T.unsafe(nil)); end - - # formatting - # - # source://pry//lib/pry/helpers/base_helpers.rb#54 - def heading(text); end - - # source://pry//lib/pry/helpers/base_helpers.rb#47 - def highlight(string, regexp, highlight_color = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://pry//lib/pry/helpers/base_helpers.rb#34 - def not_a_real_file?(file); end - - # Acts like send but ignores any methods defined below Object or Class in the - # inheritance hierarchy. - # This is required to introspect methods on objects like Net::HTTP::Get that - # have overridden the `method` method. - # - # source://pry//lib/pry/helpers/base_helpers.rb#22 - def safe_send(obj, method, *args, &block); end - - # source://pry//lib/pry/helpers/base_helpers.rb#8 - def silence_warnings; end - - # Send the given text through the best available pager (if Pry.config.pager is - # enabled). Infers where to send the output if used as a mixin. - # DEPRECATED. - # - # source://pry//lib/pry/helpers/base_helpers.rb#62 - def stagger_output(text, _out = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://pry//lib/pry/helpers/base_helpers.rb#38 - def use_ansi_codes?; end -end - -# source://pry//lib/pry/helpers/command_helpers.rb#7 -module Pry::Helpers::CommandHelpers - include ::Pry::Helpers::OptionsHelpers - extend ::Pry::Helpers::OptionsHelpers - extend ::Pry::Helpers::CommandHelpers - - # source://pry//lib/pry/helpers/command_helpers.rb#115 - def absolute_index_number(line_number, array_length); end - - # source://pry//lib/pry/helpers/command_helpers.rb#123 - def absolute_index_range(range_or_number, array_length); end - - # source://pry//lib/pry/helpers/command_helpers.rb#31 - def get_method_or_raise(method_name, context, opts = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://pry//lib/pry/helpers/command_helpers.rb#21 - def internal_binding?(context); end - - # source://pry//lib/pry/helpers/command_helpers.rb#97 - def one_index_number(line_number); end - - # convert a 1-index range to a 0-indexed one - # - # source://pry//lib/pry/helpers/command_helpers.rb#102 - def one_index_range(range); end - - # source://pry//lib/pry/helpers/command_helpers.rb#106 - def one_index_range_or_number(range_or_number); end - - # Restrict a string to the given range of lines (1-indexed) - # - # @param content [String] The string. - # @param lines [Range, Integer] The line(s) to restrict it to. - # @return [String] The resulting string. - # - # source://pry//lib/pry/helpers/command_helpers.rb#92 - def restrict_to_lines(content, lines); end - - # source://pry//lib/pry/helpers/command_helpers.rb#135 - def set_file_and_dir_locals(file_name, pry = T.unsafe(nil), ctx = T.unsafe(nil)); end - - # Open a temp file and yield it to the block, closing it after - # - # @return [String] The path of the temp file - # - # source://pry//lib/pry/helpers/command_helpers.rb#14 - def temp_file(ext = T.unsafe(nil)); end - - # Remove any common leading whitespace from every line in `text`. This - # can be used to make a HEREDOC line up with the left margin, without - # sacrificing the indentation level of the source code. - # - # @example - # opt.banner(unindent(<<-USAGE)) - # Lorem ipsum dolor sit amet, consectetur adipisicing elit, - # sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - # "Ut enim ad minim veniam." - # USAGE - # @param dirty_text [String] The text from which to remove indentation - # @return [String] the text with indentation stripped - # - # source://pry//lib/pry/helpers/command_helpers.rb#68 - def unindent(dirty_text, left_padding = T.unsafe(nil)); end -end - -# This class contains methods useful for extracting -# documentation from methods and classes. -# -# source://pry//lib/pry/helpers/documentation_helpers.rb#7 -module Pry::Helpers::DocumentationHelpers - private - - # Given a string that makes up a comment in a source-code file parse out the content - # that the user is intended to read. (i.e. without leading indentation, #-characters - # or shebangs) - # - # @param comment [String] - # @return [String] - # - # source://pry//lib/pry/helpers/documentation_helpers.rb#67 - def get_comment_content(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#51 - def process_comment_markup(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#15 - def process_rdoc(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#45 - def process_yardoc(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#30 - def process_yardoc_tag(comment, tag); end - - # @param code [String] - # @return [String] - # - # source://pry//lib/pry/helpers/documentation_helpers.rb#57 - def strip_comments_from_c_code(code); end - - # @param text [String] - # @return [String] - # - # source://pry//lib/pry/helpers/documentation_helpers.rb#79 - def strip_leading_whitespace(text); end - - class << self - # Given a string that makes up a comment in a source-code file parse out the content - # that the user is intended to read. (i.e. without leading indentation, #-characters - # or shebangs) - # - # @param comment [String] - # @return [String] - # - # source://pry//lib/pry/helpers/documentation_helpers.rb#67 - def get_comment_content(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#51 - def process_comment_markup(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#15 - def process_rdoc(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#45 - def process_yardoc(comment); end - - # source://pry//lib/pry/helpers/documentation_helpers.rb#30 - def process_yardoc_tag(comment, tag); end - - # @param code [String] - # @return [String] - # - # source://pry//lib/pry/helpers/documentation_helpers.rb#57 - def strip_comments_from_c_code(code); end - - # @param text [String] - # @return [String] - # - # source://pry//lib/pry/helpers/documentation_helpers.rb#79 - def strip_leading_whitespace(text); end - end -end - -# source://pry//lib/pry/helpers/documentation_helpers.rb#8 -Pry::Helpers::DocumentationHelpers::YARD_TAGS = T.let(T.unsafe(nil), Array) - -# source://pry//lib/pry/helpers/options_helpers.rb#5 -module Pry::Helpers::OptionsHelpers - private - - # Get the method object parsed by the slop instance - # - # source://pry//lib/pry/helpers/options_helpers.rb#23 - def method_object; end - - # Add method options to the Pry::Slop instance - # - # source://pry//lib/pry/helpers/options_helpers.rb#9 - def method_options(opt); end - - class << self - # Get the method object parsed by the slop instance - # - # source://pry//lib/pry/helpers/options_helpers.rb#23 - def method_object; end - - # Add method options to the Pry::Slop instance - # - # source://pry//lib/pry/helpers/options_helpers.rb#9 - def method_options(opt); end - end -end - -# Contains methods for querying the platform that Pry is running on -# -# @api public -# @since v0.12.0 -# -# source://pry//lib/pry/helpers/platform.rb#10 -module Pry::Helpers::Platform - class << self - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#35 - def jruby?; end - - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#40 - def jruby_19?; end - - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#17 - def linux?; end - - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#12 - def mac_osx?; end - - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#45 - def mri?; end - - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#50 - def mri_19?; end - - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#55 - def mri_2?; end - - # @api public - # @return [Boolean] true when Pry is running on Windows with ANSI support, - # false otherwise - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#23 - def windows?; end - - # @api public - # @return [Boolean] - # @since v0.12.0 - # - # source://pry//lib/pry/helpers/platform.rb#28 - def windows_ansi?; end - end -end - -# source://pry//lib/pry/helpers/table.rb#35 -class Pry::Helpers::Table - # @return [Table] a new instance of Table - # - # source://pry//lib/pry/helpers/table.rb#37 - def initialize(items, args, pry_instance = T.unsafe(nil)); end - - # source://pry//lib/pry/helpers/table.rb#81 - def ==(other); end - - # Returns the value of attribute column_count. - # - # source://pry//lib/pry/helpers/table.rb#36 - def column_count; end - - # source://pry//lib/pry/helpers/table.rb#68 - def column_count=(count); end - - # source://pry//lib/pry/helpers/table.rb#77 - def columns; end - - # @return [Boolean] - # - # source://pry//lib/pry/helpers/table.rb#73 - def fits_on_line?(line_length); end - - # Returns the value of attribute items. - # - # source://pry//lib/pry/helpers/table.rb#36 - def items; end - - # source://pry//lib/pry/helpers/table.rb#62 - def items=(items); end - - # source://pry//lib/pry/helpers/table.rb#47 - def rows_to_s(style = T.unsafe(nil)); end - - # source://pry//lib/pry/helpers/table.rb#85 - def to_a; end - - # source://pry//lib/pry/helpers/table.rb#43 - def to_s; end - - private - - # source://pry//lib/pry/helpers/table.rb#91 - def _max_width(things); end - - # source://pry//lib/pry/helpers/table.rb#95 - def _rebuild_colorless_cache; end - - # source://pry//lib/pry/helpers/table.rb#116 - def _recall_color_for(thing); end - - # source://pry//lib/pry/helpers/table.rb#105 - def _recolumn; end -end - -# The methods defined on {Text} are available to custom commands via -# {Pry::Command#text}. -# -# source://pry//lib/pry/helpers/text.rb#7 -module Pry::Helpers::Text - extend ::Pry::Helpers::Text - - # source://pry//lib/pry/helpers/text.rb#23 - def black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def black_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#23 - def blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def blue_on_yellow(text); end - - # Returns _text_ as bold text for use on a terminal. - # - # @param text [String, #to_s] - # @return [String] _text_ - # - # source://pry//lib/pry/helpers/text.rb#54 - def bold(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_black_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_blue_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_cyan_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_green_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_magenta_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_purple_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_red_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_white_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#27 - def bright_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#36 - def bright_yellow_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#23 - def cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def cyan_on_yellow(text); end - - # Returns `text` in the default foreground colour. - # Use this instead of "black" or "white" when you mean absence of colour. - # - # @param text [String, #to_s] - # @return [String] - # - # source://pry//lib/pry/helpers/text.rb#63 - def default(text); end - - # source://pry//lib/pry/helpers/text.rb#23 - def green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def green_on_yellow(text); end - - # Returns _text_ indented by _chars_ spaces. - # - # @param text [String] - # @param chars [Fixnum] - # - # source://pry//lib/pry/helpers/text.rb#113 - def indent(text, chars); end - - # source://pry//lib/pry/helpers/text.rb#23 - def magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def magenta_on_yellow(text); end - - # @return [void] - # @yield Yields a block with color turned off. - # - # source://pry//lib/pry/helpers/text.rb#73 - def no_color; end - - # @return [void] - # @yield Yields a block with paging turned off. - # - # source://pry//lib/pry/helpers/text.rb#87 - def no_pager; end - - # source://pry//lib/pry/helpers/text.rb#23 - def purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def purple_on_yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#23 - def red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def red_on_yellow(text); end - - # Remove any color codes from _text_. - # - # @param text [String, #to_s] - # @return [String] _text_ stripped of any color codes. - # - # source://pry//lib/pry/helpers/text.rb#46 - def strip_color(text); end - - # source://pry//lib/pry/helpers/text.rb#23 - def white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def white_on_yellow(text); end - - # Returns _text_ in a numbered list, beginning at _offset_. - # - # @param text [#each_line] - # @param offset [Fixnum] - # @return [String] - # - # source://pry//lib/pry/helpers/text.rb#100 - def with_line_numbers(text, offset, color = T.unsafe(nil)); end - - # source://pry//lib/pry/helpers/text.rb#23 - def yellow(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_black(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_blue(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_cyan(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_green(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_magenta(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_purple(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_red(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_white(text); end - - # source://pry//lib/pry/helpers/text.rb#32 - def yellow_on_yellow(text); end -end - -# source://pry//lib/pry/helpers/text.rb#10 -Pry::Helpers::Text::COLORS = T.let(T.unsafe(nil), Hash) - -# The History class is responsible for maintaining the user's input history, -# both internally and within Readline. -# -# source://pry//lib/pry/history.rb#6 -class Pry::History - # @return [History] a new instance of History - # - # source://pry//lib/pry/history.rb#29 - def initialize(options = T.unsafe(nil)); end - - # Add a line to the input history, ignoring blank and duplicate lines. - # - # @param line [String] - # @return [String] The same line that was passed in - # - # source://pry//lib/pry/history.rb#53 - def <<(line); end - - # Clear this session's history. This won't affect the contents of the - # history file. - # - # source://pry//lib/pry/history.rb#74 - def clear; end - - # Filter the history with the histignore options - # - # @return [Array] An array containing all the lines that are not - # included in the histignore. - # - # source://pry//lib/pry/history.rb#95 - def filter(history); end - - # @return [Integer] total number of lines, including original lines - # - # source://pry//lib/pry/history.rb#27 - def history_line_count; end - - # Load the input history using `History.loader`. - # - # @return [Integer] The number of lines loaded - # - # source://pry//lib/pry/history.rb#40 - def load; end - - # Returns the value of attribute loader. - # - # source://pry//lib/pry/history.rb#21 - def loader; end - - # Sets the attribute loader - # - # @param value the value to set the attribute loader to. - # - # source://pry//lib/pry/history.rb#21 - def loader=(_arg0); end - - # @return [Fixnum] Number of lines in history when Pry first loaded. - # - # source://pry//lib/pry/history.rb#24 - def original_lines; end - - # Add a line to the input history, ignoring blank and duplicate lines. - # - # @param line [String] - # @return [String] The same line that was passed in - # - # source://pry//lib/pry/history.rb#53 - def push(line); end - - # Returns the value of attribute saver. - # - # source://pry//lib/pry/history.rb#21 - def saver; end - - # Sets the attribute saver - # - # @param value the value to set the attribute saver to. - # - # source://pry//lib/pry/history.rb#21 - def saver=(_arg0); end - - # @return [Fixnum] The number of lines in history from just this session. - # - # source://pry//lib/pry/history.rb#81 - def session_line_count; end - - # Return an Array containing all stored history. - # - # @return [Array] An Array containing all lines of history loaded - # or entered by the user in the current session. - # - # source://pry//lib/pry/history.rb#88 - def to_a; end - - private - - # The history file, opened for appending. - # - # source://pry//lib/pry/history.rb#127 - def history_file; end - - # source://pry//lib/pry/history.rb#143 - def history_file_path; end - - # @return [Boolean] - # - # source://pry//lib/pry/history.rb#147 - def invalid_readline_line?(line); end - - # The default loader. Yields lines from `Pry.config.history_file`. - # - # source://pry//lib/pry/history.rb#113 - def read_from_file; end - - # The default saver. Appends the given line to `Pry.config.history_file`. - # - # source://pry//lib/pry/history.rb#122 - def save_to_file(line); end - - # Check if the line match any option in the histignore - # [Pry.config.history_ignorelist] - # - # @return [Boolean] a boolean that notifies if the line was found in the - # histignore array. - # - # source://pry//lib/pry/history.rb#105 - def should_ignore?(line); end - - class << self - # source://pry//lib/pry/history.rb#7 - def default_file; end - end -end - -# Implements a hooks system for Pry. A hook is a callable that is associated -# with an event. A number of events are currently provided by Pry, these -# include: `:when_started`, `:before_session`, `:after_session`. A hook must -# have a name, and is connected with an event by the `Pry::Hooks#add_hook` -# method. -# -# @example Adding a hook for the `:before_session` event. -# Pry.config.hooks.add_hook(:before_session, :say_hi) do -# puts "hello" -# end -# -# source://pry//lib/pry/hooks.rb#14 -class Pry::Hooks - # @return [Hooks] a new instance of Hooks - # - # source://pry//lib/pry/hooks.rb#25 - def initialize; end - - # Add a new hook to be executed for the `event_name` event. - # - # @param event_name [Symbol] The name of the event. - # @param hook_name [Symbol] The name of the hook. - # @param callable [#call] The callable. - # @raise [ArgumentError] - # @return [Pry:Hooks] The receiver. - # @yield The block to use as the callable (if no `callable` provided). - # - # source://pry//lib/pry/hooks.rb#81 - def add_hook(event_name, hook_name, callable = T.unsafe(nil), &block); end - - # Clear all hooks functions for a given event. - # - # @param event_name [String] The name of the event. - # @return [void] - # - # source://pry//lib/pry/hooks.rb#165 - def clear_event_hooks(event_name); end - - # @param event_name [Symbol] The name of the event. - # @param hook_name [Symbol] The name of the hook. - # to delete. - # @return [#call] The deleted hook. - # - # source://pry//lib/pry/hooks.rb#147 - def delete_hook(event_name, hook_name); end - - # source://pry//lib/pry/hooks.rb#39 - def errors; end - - # Execute the list of hooks for the `event_name` event. - # - # @param event_name [Symbol] The name of the event. - # @param args [Array] The arguments to pass to each hook function. - # @return [Object] The return value of the last executed hook. - # - # source://pry//lib/pry/hooks.rb#108 - def exec_hook(event_name, *args, &block); end - - # @param event_name [Symbol] The name of the event. - # @param hook_name [Symbol] The name of the hook - # @return [#call] a specific hook for a given event. - # - # source://pry//lib/pry/hooks.rb#128 - def get_hook(event_name, hook_name); end - - # `add_hook`/`delete_hook` for that. - # - # @note Modifying the returned hash does not alter the hooks, use - # @param event_name [Symbol] The name of the event. - # @return [Hash] The hash of hook names / hook functions. - # - # source://pry//lib/pry/hooks.rb#139 - def get_hooks(event_name); end - - # @param event_name [Symbol] The name of the event. - # @return [Fixnum] The number of hook functions for `event_name`. - # - # source://pry//lib/pry/hooks.rb#121 - def hook_count(event_name); end - - # @param event_name [Symbol] Name of the event. - # @param hook_name [Symbol] Name of the hook. - # @return [Boolean] Whether the hook by the name `hook_name`. - # - # source://pry//lib/pry/hooks.rb#172 - def hook_exists?(event_name, hook_name); end - - # @example - # hooks = Pry::Hooks.new.add_hook(:before_session, :say_hi) { puts "hi!" } - # Pry::Hooks.new.merge(hooks) - # @param other [Pry::Hooks] The `Pry::Hooks` instance to merge - # @return [Pry::Hooks] a new `Pry::Hooks` instance containing a merge of the - # contents of two `Pry:Hooks` instances. - # - # source://pry//lib/pry/hooks.rb#69 - def merge(other); end - - # Destructively merge the contents of two `Pry:Hooks` instances. - # - # @param other [Pry::Hooks] The `Pry::Hooks` instance to merge - # @return [Pry:Hooks] The receiver. - # @see #merge - # - # source://pry//lib/pry/hooks.rb#48 - def merge!(other); end - - protected - - # Returns the value of attribute hooks. - # - # source://pry//lib/pry/hooks.rb#178 - def hooks; end - - private - - # Ensure that duplicates have their @hooks object. - # - # source://pry//lib/pry/hooks.rb#30 - def initialize_copy(_orig); end - - class << self - # source://pry//lib/pry/hooks.rb#15 - def default; end - end -end - -# Pry::Indent is a class that can be used to indent a number of lines -# containing Ruby code similar as to how IRB does it (but better). The class -# works by tokenizing a string using CodeRay and then looping over those -# tokens. Based on the tokens in a line of code that line (or the next one) -# will be indented or un-indented by correctly. -# -# source://pry//lib/pry/indent.rb#11 -class Pry::Indent - include ::Pry::Helpers::BaseHelpers - - # @return [Indent] a new instance of Indent - # - # source://pry//lib/pry/indent.rb#104 - def initialize(pry_instance = T.unsafe(nil)); end - - # Return a string which, when printed, will rewrite the previous line with - # the correct indentation. Mostly useful for fixing 'end'. - # - # @param prompt [String] The user's prompt - # @param code [String] The code the user just typed in - # @param overhang [Integer] The number of characters to erase afterwards (the - # the difference in length between the old line and the new one) - # @return [String] correctly indented line - # - # source://pry//lib/pry/indent.rb#393 - def correct_indentation(prompt, code, overhang = T.unsafe(nil)); end - - # Get the indentation for the start of the next line. - # - # This is what's used between the prompt and the cursor in pry. - # - # @return String The correct number of spaces - # - # source://pry//lib/pry/indent.rb#181 - def current_prefix; end - - # If the code just before an "if" or "while" token on a line looks like the - # end of a statement, then we want to treat that "if" as a singleline, not - # multiline statement. - # - # @return [Boolean] - # - # source://pry//lib/pry/indent.rb#264 - def end_of_statement?(last_token, last_kind); end - - # Are we currently in the middle of a string literal. - # - # This is used to determine whether to re-indent a given line, we mustn't - # re-indent within string literals because to do so would actually change - # the value of the String! - # - # @return [Boolean] Boolean - # - # source://pry//lib/pry/indent.rb#275 - def in_string?; end - - # Indents a string and returns it. This string can either be a single line - # or multiple ones. - # - # @example - # str = <] - # - # source://pry//lib/pry/indent.rb#376 - def module_nesting; end - - # All the open delimiters, in the order that they first appeared. - # - # @return [String] - # - # source://pry//lib/pry/indent.rb#312 - def open_delimiters; end - - # Return a string which restores the CodeRay string status to the correct value by - # opening HEREDOCs and strings. - # - # @return String - # - # source://pry//lib/pry/indent.rb#320 - def open_delimiters_line; end - - # reset internal state - # - # source://pry//lib/pry/indent.rb#110 - def reset; end - - # @return [Array] The stack of open tokens. - # - # source://pry//lib/pry/indent.rb#21 - def stack; end - - # Given a string of Ruby code, use CodeRay to export the tokens. - # - # @param string [String] The Ruby to lex - # @return [Array] An Array of pairs of [token_value, token_type] - # - # source://pry//lib/pry/indent.rb#283 - def tokenize(string); end - - # Update the internal state about what kind of strings are open. - # - # Most of the complication here comes from the fact that HEREDOCs can be - # nested. For normal strings (which can't be nested) we assume that CodeRay - # correctly pairs open-and-close delimiters so we don't bother checking what - # they are. - # - # @param token [String] The token (of type :delimiter) - # - # source://pry//lib/pry/indent.rb#297 - def track_delimiter(token); end - - # Update the internal state relating to module nesting. - # - # It's responsible for adding to the @module_nesting array, which looks - # something like: - # - # [ ["class", "Foo"], ["module", "Bar::Baz"], ["class <<", "self"] ] - # - # A nil value in the @module_nesting array happens in two places: either - # when @awaiting_class is true and we're still waiting for the string to - # fill that space, or when a parse was rejected. - # - # At the moment this function is quite restricted about what formats it will - # parse, for example we disallow expressions after the class keyword. This - # could maybe be improved in the future. - # - # @param token [String] a token from Coderay - # @param kind [Symbol] the kind of that token - # - # source://pry//lib/pry/indent.rb#341 - def track_module_nesting(token, kind); end - - # Update the internal state relating to module nesting on 'end'. - # - # If the current 'end' pairs up with a class or a module then we should - # pop an array off of @module_nesting - # - # @param token [String] a token from Coderay - # @param kind [Symbol] the kind of that token - # - # source://pry//lib/pry/indent.rb#366 - def track_module_nesting_end(token, kind = T.unsafe(nil)); end - - class << self - # Clean the indentation of a fragment of ruby. - # - # @param str [String] - # @return [String] - # - # source://pry//lib/pry/indent.rb#82 - def indent(str); end - - # Get the module nesting at the given point in the given string. - # - # NOTE If the line specified contains a method definition, then the nesting - # at the start of the method definition is used. Otherwise the nesting from - # the end of the line is used. - # - # @param str [String] The ruby code to analyze - # @param line_number [Fixnum] The line number (starting from 1) - # @return [Array] - # - # source://pry//lib/pry/indent.rb#95 - def nesting_at(str, line_number); end - end -end - -# Collection of token types that should be ignored. Without this list -# keywords such as "class" inside strings would cause the code to be -# indented incorrectly. -# -# :pre_constant and :preserved_constant are the CodeRay 0.9.8 and 1.0.0 -# classifications of "true", "false", and "nil". -# -# source://pry//lib/pry/indent.rb#60 -Pry::Indent::IGNORE_TOKENS = T.let(T.unsafe(nil), Array) - -# Collection of tokens that should appear dedented even though they -# don't affect the surrounding code. -# -# source://pry//lib/pry/indent.rb#76 -Pry::Indent::MIDWAY_TOKENS = T.let(T.unsafe(nil), Array) - -# Hash containing all the tokens that should increase the indentation -# level. The keys of this hash are open tokens, the values the matching -# tokens that should prevent a line from being indented if they appear on -# the same line. -# -# source://pry//lib/pry/indent.rb#30 -Pry::Indent::OPEN_TOKENS = T.let(T.unsafe(nil), Hash) - -# Which tokens can be followed by an optional "do" keyword. -# -# source://pry//lib/pry/indent.rb#52 -Pry::Indent::OPTIONAL_DO_TOKENS = T.let(T.unsafe(nil), Array) - -# Which tokens can either be open tokens, or appear as modifiers on -# a single-line. -# -# source://pry//lib/pry/indent.rb#49 -Pry::Indent::SINGLELINE_TOKENS = T.let(T.unsafe(nil), Array) - -# The amount of spaces to insert for each indent level. -# -# source://pry//lib/pry/indent.rb#24 -Pry::Indent::SPACES = T.let(T.unsafe(nil), String) - -# Tokens that indicate the end of a statement (i.e. that, if they appear -# directly before an "if" indicates that that if applies to the same line, -# not the next line) -# -# :reserved and :keywords are the CodeRay 0.9.8 and 1.0.0 respectively -# classifications of "super", "next", "return", etc. -# -# source://pry//lib/pry/indent.rb#69 -Pry::Indent::STATEMENT_END_TOKENS = T.let(T.unsafe(nil), Array) - -# Raised if {#module_nesting} would not work. -# -# source://pry//lib/pry/indent.rb#15 -class Pry::Indent::UnparseableNestingError < ::StandardError; end - -# source://pry//lib/pry/input_completer.rb#6 -class Pry::InputCompleter - # @return [InputCompleter] a new instance of InputCompleter - # - # source://pry//lib/pry/input_completer.rb#42 - def initialize(input, pry = T.unsafe(nil)); end - - # build_path seperates the input into two parts: path and input. - # input is the partial string that should be completed - # path is a proc that takes an input and builds a full path. - # - # source://pry//lib/pry/input_completer.rb#240 - def build_path(input); end - - # Return a new completion proc for use by Readline. - # - # source://pry//lib/pry/input_completer.rb#56 - def call(str, options = T.unsafe(nil)); end - - # source://pry//lib/pry/input_completer.rb#255 - def ignored_modules; end - - # source://pry//lib/pry/input_completer.rb#229 - def select_message(path, receiver, message, candidates); end -end - -# source://pry//lib/pry/input_completer.rb#8 -Pry::InputCompleter::ARRAY_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#15 -Pry::InputCompleter::CONSTANT_OR_METHOD_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#14 -Pry::InputCompleter::CONSTANT_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#17 -Pry::InputCompleter::GLOBALVARIABLE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#16 -Pry::InputCompleter::HEX_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#7 -Pry::InputCompleter::NUMERIC_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#12 -Pry::InputCompleter::PROC_OR_HASH_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#11 -Pry::InputCompleter::REGEX_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#20 -Pry::InputCompleter::RESERVED_WORDS = T.let(T.unsafe(nil), Array) - -# source://pry//lib/pry/input_completer.rb#10 -Pry::InputCompleter::SYMBOL_METHOD_CALL_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#9 -Pry::InputCompleter::SYMBOL_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#13 -Pry::InputCompleter::TOPLEVEL_LOOKUP_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#18 -Pry::InputCompleter::VARIABLE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://pry//lib/pry/input_completer.rb#40 -Pry::InputCompleter::WORD_ESCAPE_STR = T.let(T.unsafe(nil), String) - -# There is one InputLock per input (such as STDIN) as two REPLs on the same -# input makes things delirious. InputLock serializes accesses to the input so -# that threads to not conflict with each other. The latest thread to request -# ownership of the input wins. -# -# source://pry//lib/pry/input_lock.rb#8 -class Pry::InputLock - # @return [InputLock] a new instance of InputLock - # - # source://pry//lib/pry/input_lock.rb#29 - def initialize; end - - # Adds ourselves to the ownership list. The last one in the list may access - # the input through interruptible_region(). - # - # source://pry//lib/pry/input_lock.rb#38 - def __with_ownership; end - - # source://pry//lib/pry/input_lock.rb#81 - def enter_interruptible_region; end - - # source://pry//lib/pry/input_lock.rb#108 - def interruptible_region; end - - # source://pry//lib/pry/input_lock.rb#95 - def leave_interruptible_region; end - - # source://pry//lib/pry/input_lock.rb#75 - def with_ownership(&block); end - - class << self - # source://pry//lib/pry/input_lock.rb#19 - def for(input); end - - # Returns the value of attribute global_lock. - # - # source://pry//lib/pry/input_lock.rb#13 - def global_lock; end - - # Sets the attribute global_lock - # - # @param value the value to set the attribute global_lock to. - # - # source://pry//lib/pry/input_lock.rb#13 - def global_lock=(_arg0); end - - # Returns the value of attribute input_locks. - # - # source://pry//lib/pry/input_lock.rb#12 - def input_locks; end - - # Sets the attribute input_locks - # - # @param value the value to set the attribute input_locks to. - # - # source://pry//lib/pry/input_lock.rb#12 - def input_locks=(_arg0); end - end -end - -# source://pry//lib/pry/input_lock.rb#9 -class Pry::InputLock::Interrupt < ::Exception; end - -# source://pry//lib/pry/inspector.rb#4 -class Pry::Inspector; end - -# source://pry//lib/pry/inspector.rb#5 -Pry::Inspector::MAP = T.let(T.unsafe(nil), Hash) - -# source://pry//lib/pry/pry_class.rb#7 -Pry::LOCAL_RC_FILE = T.let(T.unsafe(nil), String) - -# source://pry//lib/pry/last_exception.rb#12 -class Pry::LastException < ::BasicObject - # @return [LastException] a new instance of LastException - # - # source://pry//lib/pry/last_exception.rb#15 - def initialize(exception); end - - # Returns the value of attribute bt_index. - # - # source://pry//lib/pry/last_exception.rb#13 - def bt_index; end - - # Sets the attribute bt_index - # - # @param value the value to set the attribute bt_index to. - # - # source://pry//lib/pry/last_exception.rb#13 - def bt_index=(_arg0); end - - # source://pry//lib/pry/last_exception.rb#52 - def bt_source_location_for(index); end - - # @return [String] returns the path to a file for the current backtrace. see {#bt_index}. - # - # source://pry//lib/pry/last_exception.rb#37 - def file; end - - # source://pry//lib/pry/last_exception.rb#57 - def inc_bt_index; end - - # @return [Fixnum] returns the line for the current backtrace. see {#bt_index}. - # - # source://pry//lib/pry/last_exception.rb#43 - def line; end - - # source://pry//lib/pry/last_exception.rb#21 - def method_missing(name, *args, &block); end - - # @return [Exception] returns the wrapped exception - # - # source://pry//lib/pry/last_exception.rb#48 - def wrapped_exception; end - - private - - # @return [Boolean] - # - # source://pry//lib/pry/last_exception.rb#29 - def respond_to_missing?(name, include_all = T.unsafe(nil)); end -end - -# This class wraps the normal `Method` and `UnboundMethod` classes -# to provide extra functionality useful to Pry. -# -# source://pry//lib/pry/method.rb#20 -class Pry::Method - include ::Pry::Helpers::BaseHelpers - include ::Pry::Helpers::DocumentationHelpers - include ::Pry::CodeObject::Helpers - extend ::Pry::Helpers::BaseHelpers - extend ::Forwardable - extend ::Pry::Forwardable - - # A new instance of `Pry::Method` wrapping the given `::Method`, - # `UnboundMethod`, or `Proc`. - # - # @param method [::Method, UnboundMethod, Proc] - # @param known_info [Hash] Can be used to pre-cache expensive to compute stuff. - # @return [Pry::Method] - # - # source://pry//lib/pry/method.rb#263 - def initialize(method, known_info = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#483 - def ==(other); end - - # @return [Boolean] Is the method definitely an alias? - # - # source://pry//lib/pry/method.rb#478 - def alias?; end - - # @return [Array] All known aliases for the method. - # - # source://pry//lib/pry/method.rb#461 - def aliases; end - - # @return [Boolean] Whether the method is bound. - # - # source://pry//lib/pry/method.rb#446 - def bound_method?; end - - # source://pry//lib/pry/method.rb#515 - def comment; end - - # @return [String, nil] The documentation for the method, or `nil` if it's - # unavailable. - # - # source://pry//lib/pry/method.rb#329 - def doc; end - - # @return [Boolean] Was the method defined outside a source file? - # - # source://pry//lib/pry/method.rb#436 - def dynamically_defined?; end - - # @param klass [Class] - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#491 - def is_a?(klass); end - - # @param klass [Class] - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#491 - def kind_of?(klass); end - - # Delegate any unknown calls to the wrapped method. - # - # source://pry//lib/pry/method.rb#503 - def method_missing(method_name, *args, &block); end - - # Get the name of the method as a String, regardless of the underlying - # Method#name type. - # - # @return [String] - # - # source://pry//lib/pry/method.rb#272 - def name; end - - # Get the name of the method including the class on which it was defined. - # - # @example - # method(:puts).method_name - # => "Kernel.puts" - # @return [String] - # - # source://pry//lib/pry/method.rb#299 - def name_with_owner; end - - # @return [String, nil] The original name the method was defined under, - # before any aliasing, or `nil` if it can't be determined. - # - # source://pry//lib/pry/method.rb#429 - def original_name; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def owner(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def parameters(*args, **_arg1, &block); end - - # @return [Boolean] Was the method defined within the Pry REPL? - # - # source://pry//lib/pry/method.rb#456 - def pry_method?; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def receiver(*args, **_arg1, &block); end - - # Update the live copy of the method's source. - # - # source://pry//lib/pry/method.rb#314 - def redefine(source); end - - # @param method_name [String, Symbol] - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#498 - def respond_to?(method_name, include_all = T.unsafe(nil)); end - - # @return [String] A representation of the method's signature, including its - # name and parameters. Optional and "rest" parameters are marked with `*` - # and block parameters with `&`. Keyword arguments are shown with `:` - # If the parameter names are unavailable, they're given numbered names instead. - # Paraphrased from `awesome_print` gem. - # - # source://pry//lib/pry/method.rb#391 - def signature; end - - # @return [Boolean] Whether the method is a singleton method. - # - # source://pry//lib/pry/method.rb#451 - def singleton_method?; end - - # @return [String, nil] The source code of the method, or `nil` if it's unavailable. - # - # source://pry//lib/pry/method.rb#304 - def source; end - - # Can we get the source code for this method? - # - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#321 - def source?; end - - # @return [String, nil] The name of the file the method is defined in, or - # `nil` if the filename is unavailable. - # - # source://pry//lib/pry/method.rb#348 - def source_file; end - - # @return [Fixnum, nil] The line of code in `source_file` which begins - # the method's definition, or `nil` if that information is unavailable. - # - # source://pry//lib/pry/method.rb#361 - def source_line; end - - # @return [Range, nil] The range of lines in `source_file` which contain - # the method's definition, or `nil` if that information is unavailable. - # - # source://pry//lib/pry/method.rb#367 - def source_range; end - - # @return [Symbol] The source type of the method. The options are - # `:ruby` for Ruby methods or `:c` for methods written in C. - # - # source://pry//lib/pry/method.rb#342 - def source_type; end - - # @return [Pry::Method, nil] The wrapped method that is called when you - # use "super" in the body of this method. - # - # source://pry//lib/pry/method.rb#417 - def super(times = T.unsafe(nil)); end - - # @return [Boolean] Whether the method is unbound. - # - # source://pry//lib/pry/method.rb#441 - def unbound_method?; end - - # Is the method undefined? (aka `Disowned`) - # - # @return [Boolean] false - # - # source://pry//lib/pry/method.rb#290 - def undefined?; end - - # @return [Symbol] The visibility of the method. May be `:public`, - # `:protected`, or `:private`. - # - # source://pry//lib/pry/method.rb#373 - def visibility; end - - # Get underlying object wrapped by this Pry::Method instance - # - # @return [Method, UnboundMethod, Proc] - # - # source://pry//lib/pry/method.rb#284 - def wrapped; end - - # Get the owner of the method as a Pry::Module - # - # @return [Pry::Module] - # - # source://pry//lib/pry/method.rb#278 - def wrapped_owner; end - - private - - # source://pry//lib/pry/method.rb#577 - def c_source; end - - # @param first_ln [String] The first line of a method definition. - # @return [String, nil] - # - # source://pry//lib/pry/method.rb#563 - def method_name_from_first_line(first_ln); end - - # @raise [CommandError] when the method can't be found or `pry-doc` isn't installed. - # @return [YARD::CodeObjects::MethodObject] - # - # source://pry//lib/pry/method.rb#523 - def pry_doc_info; end - - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#511 - def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end - - # source://pry//lib/pry/method.rb#582 - def ruby_source; end - - # @param ancestors [Class, Module] The ancestors to investigate - # @return [Method] The unwrapped super-method - # - # source://pry//lib/pry/method.rb#542 - def super_using_ancestors(ancestors, times = T.unsafe(nil)); end - - class << self - # Get all of the instance methods of a `Class` or `Module` - # - # @param klass [Class, Module] - # @param include_super [Boolean] Whether to include methods from ancestors. - # @return [Array[Pry::Method]] - # - # source://pry//lib/pry/method.rb#161 - def all_from_class(klass, include_super = T.unsafe(nil)); end - - # Get all of the methods on an `Object` - # - # @param obj [Object] - # @param include_super [Boolean] indicates whether or not to include methods from ancestors. - # @return [Array[Pry::Method]] - # - # source://pry//lib/pry/method.rb#184 - def all_from_obj(obj, include_super = T.unsafe(nil)); end - - # Given a `Binding`, try to extract the `::Method` it originated from and - # use it to instantiate a `Pry::Method`. Return `nil` if this isn't - # possible. - # - # @param binding [Binding] - # @return [Pry::Method, nil] - # - # source://pry//lib/pry/method.rb#77 - def from_binding(binding); end - - # Given a `Class` or `Module` and the name of a method, try to - # instantiate a `Pry::Method` containing the instance method of - # that name. Return `nil` if no such method exists. - # - # @param klass [Class, Module] - # @param name [String] - # @param target [Binding] The binding where the method is looked up. - # @return [Pry::Method, nil] - # - # source://pry//lib/pry/method.rb#136 - def from_class(klass, name, target = T.unsafe(nil)); end - - # Given a `Class` or `Module` and the name of a method, try to - # instantiate a `Pry::Method` containing the instance method of - # that name. Return `nil` if no such method exists. - # - # @param klass [Class, Module] - # @param name [String] - # @param target [Binding] The binding where the method is looked up. - # @return [Pry::Method, nil] - # - # source://pry//lib/pry/method.rb#136 - def from_module(klass, name, target = T.unsafe(nil)); end - - # Given an object and the name of a method, try to instantiate - # a `Pry::Method` containing the method of that name bound to - # that object. Return `nil` if no such method exists. - # - # @param obj [Object] - # @param name [String] - # @param target [Binding] The binding where the method is looked up. - # @return [Pry::Method, nil] - # - # source://pry//lib/pry/method.rb#151 - def from_obj(obj, name, target = T.unsafe(nil)); end - - # Given a string representing a method name and optionally a binding to - # search in, find and return the requested method wrapped in a - # `Pry::Method` instance. - # - # @option options - # @option options - # @param name [String] The name of the method to retrieve. - # @param target [Binding] The context in which to search for the method. - # @param options [Hash] - # @return [Pry::Method, nil] A `Pry::Method` instance containing the - # requested method, or `nil` if name is `nil` or no method could be - # located matching the parameters. - # - # source://pry//lib/pry/method.rb#43 - def from_str(name, target = T.unsafe(nil), options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#227 - def instance_method_definition?(name, definition_line); end - - # Get every `Class` and `Module`, in order, that will be checked when looking - # for methods on instances of the given `Class` or `Module`. - # This does not treat singleton classes of classes specially. - # - # @param klass [Class, Module] - # @return [Array[Class, Module]] - # - # source://pry//lib/pry/method.rb#210 - def instance_resolution_order(klass); end - - # In order to support 2.0 Refinements we need to look up methods - # inside the relevant Binding. - # - # @param obj [Object] The owner/receiver of the method. - # @param method_name [Symbol] The name of the method. - # @param method_type [Symbol] The type of method: :method or :instance_method - # @param target [Binding] The binding where the method is looked up. - # @return [Method, UnboundMethod] The 'refined' method object. - # - # source://pry//lib/pry/method.rb#114 - def lookup_method_via_binding(obj, method_name, method_type, target = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#215 - def method_definition?(name, definition_line); end - - # Get every `Class` and `Module`, in order, that will be checked when looking - # for an instance method to call on this object. - # - # @param obj [Object] - # @return [Array[Class, Module]] - # - # source://pry//lib/pry/method.rb#192 - def resolution_order(obj); end - - # source://pry//lib/pry/method.rb#247 - def singleton_class_of(obj); end - - # Get the singleton classes of superclasses that could define methods on - # the given class object, and any modules they include. - # If a module is included at multiple points in the ancestry, only - # the lowest copy will be returned. - # - # source://pry//lib/pry/method.rb#238 - def singleton_class_resolution_order(klass); end - - # @return [Boolean] - # - # source://pry//lib/pry/method.rb#220 - def singleton_method_definition?(name, definition_line); end - end -end - -# A Disowned Method is one that's been removed from the class on which it was defined. -# -# e.g. -# class C -# def foo -# C.send(:undefine_method, :foo) -# Pry::Method.from_binding(binding) -# end -# end -# -# In this case we assume that the "owner" is the singleton class of the receiver. -# -# This occurs mainly in Sinatra applications. -# -# source://pry//lib/pry/method/disowned.rb#18 -class Pry::Method::Disowned < ::Pry::Method - # Create a new Disowned method. - # - # @param receiver [Object] - # @param method_name [String] - # @return [Disowned] a new instance of Disowned - # - # source://pry//lib/pry/method/disowned.rb#25 - def initialize(receiver, method_name); end - - # Raise a more useful error message instead of trying to forward to nil. - # - # source://pry//lib/pry/method/disowned.rb#52 - def method_missing(method_name, *args, &block); end - - # Returns the value of attribute name. - # - # source://pry//lib/pry/method/disowned.rb#19 - def name; end - - # Get the hypothesized owner of the method. - # - # @return [Object] - # - # source://pry//lib/pry/method/disowned.rb#46 - def owner; end - - # Returns the value of attribute receiver. - # - # source://pry//lib/pry/method/disowned.rb#19 - def receiver; end - - # Can we get the source for this method? - # - # @return [Boolean] false - # - # source://pry//lib/pry/method/disowned.rb#39 - def source?; end - - # Is the method undefined? (aka `Disowned`) - # - # @return [Boolean] true - # - # source://pry//lib/pry/method/disowned.rb#33 - def undefined?; end - - private - - # @return [Boolean] - # - # source://pry//lib/pry/method/disowned.rb#62 - def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end -end - -# source://pry//lib/pry/method/patcher.rb#5 -class Pry::Method::Patcher - # @return [Patcher] a new instance of Patcher - # - # source://pry//lib/pry/method/patcher.rb#12 - def initialize(method); end - - # Returns the value of attribute method. - # - # source://pry//lib/pry/method/patcher.rb#6 - def method; end - - # Sets the attribute method - # - # @param value the value to set the attribute method to. - # - # source://pry//lib/pry/method/patcher.rb#6 - def method=(_arg0); end - - # perform the patch - # - # source://pry//lib/pry/method/patcher.rb#21 - def patch_in_ram(source); end - - private - - # source://pry//lib/pry/method/patcher.rb#38 - def cache_key; end - - # Update the definition line so that it can be eval'd directly on the Method's - # owner instead of from the original context. - # - # In particular this takes `def self.foo` and turns it into `def foo` so that we - # don't end up creating the method on the singleton class of the singleton class - # by accident. - # - # This is necessarily done by String manipulation because we can't find out what - # syntax is needed for the argument list by ruby-level introspection. - # - # @param line [String] The original definition line. e.g. def self.foo(bar, baz=1) - # @return [String] The new definition line. e.g. def foo(bar, baz=1) - # - # source://pry//lib/pry/method/patcher.rb#78 - def definition_for_owner(line); end - - # source://pry//lib/pry/method/patcher.rb#33 - def redefine(source); end - - # Run some code ensuring that at the end target#meth_name will not have changed. - # - # When we're redefining aliased methods we will overwrite the method at the - # unaliased name (so that super continues to work). By wrapping that code in a - # transation we make that not happen, which means that alias_method_chains, etc. - # continue to work. - # - # source://pry//lib/pry/method/patcher.rb#49 - def with_method_transaction; end - - # Apply wrap_for_owner and wrap_for_nesting successively to `source` - # - # @param source [String] - # @return [String] The wrapped source. - # - # source://pry//lib/pry/method/patcher.rb#91 - def wrap(source); end - - # Update the new source code to have the correct Module.nesting. - # - # This method uses syntactic analysis of the original source file to determine - # the new nesting, so that we can tell the difference between: - # - # class A; def self.b; end; end - # class << A; def b; end; end - # - # The resulting code should be evaluated in the TOPLEVEL_BINDING. - # - # @param source [String] The source to wrap. - # @return [String] - # - # source://pry//lib/pry/method/patcher.rb#122 - def wrap_for_nesting(source); end - - # Update the source code so that when it has the right owner when eval'd. - # - # This (combined with definition_for_owner) is backup for the case that - # wrap_for_nesting fails, to ensure that the method will stil be defined in - # the correct place. - # - # @param source [String] The source to wrap - # @return [String] - # - # source://pry//lib/pry/method/patcher.rb#103 - def wrap_for_owner(source); end - - class << self - # source://pry//lib/pry/method/patcher.rb#16 - def code_for(filename); end - end -end - -# This class is responsible for locating the *real* `Pry::Method` -# object captured by a binding. -# -# Given a `Binding` from inside a method and a 'seed' Pry::Method object, -# there are primarily two situations where the seed method doesn't match -# the Binding: -# 1. The Pry::Method is from a subclass -# 2. The Pry::Method represents a method of the same name while the original -# was renamed to something else. For 1. we search vertically up the -# inheritance chain, and for 2. we search laterally along the object's -# method table. -# -# When we locate the method that matches the Binding we wrap it in -# Pry::Method and return it, or return nil if we fail. -# -# source://pry//lib/pry/method/weird_method_locator.rb#19 -class Pry::Method::WeirdMethodLocator - # @param method [Pry::Method] The seed method. - # @param target [Binding] The Binding that captures the method - # we want to locate. - # @return [WeirdMethodLocator] a new instance of WeirdMethodLocator - # - # source://pry//lib/pry/method/weird_method_locator.rb#55 - def initialize(method, target); end - - # @return [Pry::Method, nil] The Pry::Method that matches the - # given binding. - # - # source://pry//lib/pry/method/weird_method_locator.rb#62 - def find_method; end - - # @return [Boolean] Whether the Pry::Method is unrecoverable - # This usually happens when the method captured by the Binding - # has been subsequently deleted. - # - # source://pry//lib/pry/method/weird_method_locator.rb#69 - def lost_method?; end - - # Returns the value of attribute method. - # - # source://pry//lib/pry/method/weird_method_locator.rb#49 - def method; end - - # Sets the attribute method - # - # @param value the value to set the attribute method to. - # - # source://pry//lib/pry/method/weird_method_locator.rb#49 - def method=(_arg0); end - - # Returns the value of attribute target. - # - # source://pry//lib/pry/method/weird_method_locator.rb#50 - def target; end - - # Sets the attribute target - # - # @param value the value to set the attribute target to. - # - # source://pry//lib/pry/method/weird_method_locator.rb#50 - def target=(_arg0); end - - private - - # source://pry//lib/pry/method/weird_method_locator.rb#215 - def all_methods_for(obj); end - - # source://pry//lib/pry/method/weird_method_locator.rb#167 - def expanded_source_location(source_location); end - - # it's possible in some cases that the method we find by this approach is - # a sub-method of the one we're currently in, consider: - # - # class A; def b; binding.pry; end; end - # class B < A; def b; super; end; end - # - # Given that we can normally find the source_range of methods, and that we - # know which __FILE__ and __LINE__ the binding is at, we can hope to - # disambiguate these cases. - # - # This obviously won't work if the source is unavaiable for some reason, - # or if both methods have the same __FILE__ and __LINE__. - # - # @return [Pry::Method, nil] The Pry::Method representing the - # superclass method. - # - # source://pry//lib/pry/method/weird_method_locator.rb#131 - def find_method_in_superclass; end - - # This is the case where the name of a method has changed - # (via alias_method) so we locate the Method object for the - # renamed method. - # - # @return [Pry::Method, nil] The Pry::Method representing the - # renamed method - # - # source://pry//lib/pry/method/weird_method_locator.rb#156 - def find_renamed_method; end - - # source://pry//lib/pry/method/weird_method_locator.rb#197 - def index_to_line_number(index); end - - # source://pry//lib/pry/method/weird_method_locator.rb#206 - def lines_for_file(file); end - - # @return [Boolean] - # - # source://pry//lib/pry/method/weird_method_locator.rb#80 - def normal_method?(method); end - - # @return [Boolean] - # - # source://pry//lib/pry/method/weird_method_locator.rb#106 - def pry_file?; end - - # Use static analysis to locate the start of the method definition. - # We have the `__FILE__` and `__LINE__` from the binding and the - # original name of the method so we search up until we find a - # def/define_method, etc defining a method of the appropriate name. - # - # @return [Array] The `source_location` of the - # renamed method - # - # source://pry//lib/pry/method/weird_method_locator.rb#184 - def renamed_method_source_location; end - - # @return [Boolean] - # - # source://pry//lib/pry/method/weird_method_locator.rb#75 - def skip_superclass_search?; end - - # source://pry//lib/pry/method/weird_method_locator.rb#88 - def target_file; end - - # source://pry//lib/pry/method/weird_method_locator.rb#98 - def target_line; end - - # source://pry//lib/pry/method/weird_method_locator.rb#84 - def target_self; end - - # @return [Boolean] - # - # source://pry//lib/pry/method/weird_method_locator.rb#202 - def valid_file?(file); end - - class << self - # Whether the given method object matches the associated binding. - # If the method object does not match the binding, then it's - # most likely not the method captured by the binding, and we - # must commence a search. - # - # @param method [Pry::Method] - # @param binding [Binding] - # @return [Boolean] - # - # source://pry//lib/pry/method/weird_method_locator.rb#29 - def normal_method?(method, binding); end - - # @return [Boolean] - # - # source://pry//lib/pry/method/weird_method_locator.rb#44 - def weird_method?(method, binding); end - end -end - -# source://pry//lib/pry/exceptions.rb#69 -class Pry::MethodNotFound < ::Pry::CommandError; end - -# source://pry//lib/pry/command_set.rb#4 -class Pry::NoCommandError < ::StandardError - # @return [NoCommandError] a new instance of NoCommandError - # - # source://pry//lib/pry/command_set.rb#5 - def initialize(match, owner); end -end - -# `ObjectPath` implements the resolution of "object paths", which are strings -# that are similar to filesystem paths but meant for traversing Ruby objects. -# Examples of valid object paths include: -# -# x -# @foo/@bar -# "string"/upcase -# Pry/Method -# -# Object paths are mostly relevant in the context of the `cd` command. -# -# @see https://github.com/pry/pry/wiki/State-navigation -# -# source://pry//lib/pry/object_path.rb#17 -class Pry::ObjectPath - # @param path_string [String] The object path expressed as a string. - # @param current_stack [Array] The current state of the binding - # stack. - # @return [ObjectPath] a new instance of ObjectPath - # - # source://pry//lib/pry/object_path.rb#23 - def initialize(path_string, current_stack); end - - # @return [Array] a new stack resulting from applying the given - # path to the current stack. - # - # source://pry//lib/pry/object_path.rb#30 - def resolve; end - - private - - # @return [Boolean] - # - # source://pry//lib/pry/object_path.rb#74 - def complete?(segment); end - - # source://pry//lib/pry/object_path.rb#78 - def handle_failure(context, err); end -end - -# source://pry//lib/pry/object_path.rb#18 -Pry::ObjectPath::SPECIAL_TERMS = T.let(T.unsafe(nil), Array) - -# indicates obsolete API -# -# source://pry//lib/pry/exceptions.rb#72 -class Pry::ObsoleteError < ::StandardError; end - -# source://pry//lib/pry/output.rb#4 -class Pry::Output - # @return [Output] a new instance of Output - # - # source://pry//lib/pry/output.rb#10 - def initialize(pry_instance); end - - # source://pry//lib/pry/output.rb#28 - def <<(*objs); end - - # source://pry//lib/pry/output.rb#53 - def decolorize_maybe(str); end - - # Return a screen height or the default if that fails. - # - # source://pry//lib/pry/output.rb#74 - def height; end - - # source://pry//lib/pry/output.rb#41 - def method_missing(method_name, *args, &block); end - - # source://pry//lib/pry/output.rb#28 - def print(*objs); end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/output.rb#8 - def pry_instance; end - - # source://pry//lib/pry/output.rb#15 - def puts(*objs); end - - # @return [Array] a pair of [rows, columns] which gives the size of - # the window. If the window size cannot be determined, the default value. - # - # source://pry//lib/pry/output.rb#61 - def size; end - - # @return [Boolean] - # - # source://pry//lib/pry/output.rb#37 - def tty?; end - - # Return a screen width or the default if that fails. - # - # source://pry//lib/pry/output.rb#69 - def width; end - - # source://pry//lib/pry/output.rb#28 - def write(*objs); end - - private - - # source://pry//lib/pry/output.rb#80 - def actual_screen_size; end - - # source://pry//lib/pry/output.rb#125 - def ansicon_env_size; end - - # source://pry//lib/pry/output.rb#109 - def env_size; end - - # source://pry//lib/pry/output.rb#92 - def io_console_size; end - - # @return [Boolean] - # - # source://pry//lib/pry/output.rb#132 - def nonzero_column?(size); end - - # source://pry//lib/pry/output.rb#114 - def readline_size; end - - # @return [Boolean] - # - # source://pry//lib/pry/output.rb#49 - def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end -end - -# @return [Array] default terminal screen size [rows, cols] -# -# source://pry//lib/pry/output.rb#6 -Pry::Output::DEFAULT_SIZE = T.let(T.unsafe(nil), Array) - -# source://pry//lib/pry/pager.rb#7 -class Pry::Pager - # @return [Pager] a new instance of Pager - # - # source://pry//lib/pry/pager.rb#13 - def initialize(pry_instance); end - - # Yields a pager object (`NullPager`, `SimplePager`, or `SystemPager`). - # All pagers accept output with `#puts`, `#print`, `#write`, and `#<<`. - # - # source://pry//lib/pry/pager.rb#33 - def open; end - - # Send the given text through the best available pager (if - # `Pry.config.pager` is enabled). If you want to send text through in - # chunks as you generate it, use `open` to get a writable object - # instead. - # - # @param text [String] Text to run through a pager. - # - # source://pry//lib/pry/pager.rb#25 - def page(text); end - - # Returns the value of attribute pry_instance. - # - # source://pry//lib/pry/pager.rb#11 - def pry_instance; end - - private - - # Return an instance of the "best" available pager class -- - # `SystemPager` if possible, `SimplePager` if `SystemPager` isn't - # available, and `NullPager` if the user has disabled paging. All - # pagers accept output with `#puts`, `#print`, `#write`, and `#<<`. You - # must call `#close` when you're done writing output to a pager, and - # you must rescue `Pry::Pager::StopPaging`. These requirements can be - # avoided by using `.open` instead. - # - # source://pry//lib/pry/pager.rb#56 - def best_available; end - - # @return [Boolean] - # - # source://pry//lib/pry/pager.rb#43 - def enabled?; end - - # Returns the value of attribute output. - # - # source://pry//lib/pry/pager.rb#47 - def output; end -end - -# `NullPager` is a "pager" that actually just prints all output as it -# comes in. Used when `Pry.config.pager` is false. -# -# source://pry//lib/pry/pager.rb#68 -class Pry::Pager::NullPager - # @return [NullPager] a new instance of NullPager - # - # source://pry//lib/pry/pager.rb#69 - def initialize(out); end - - # source://pry//lib/pry/pager.rb#77 - def <<(str); end - - # source://pry//lib/pry/pager.rb#86 - def close; end - - # source://pry//lib/pry/pager.rb#77 - def print(str); end - - # source://pry//lib/pry/pager.rb#73 - def puts(str); end - - # source://pry//lib/pry/pager.rb#82 - def write(str); end - - private - - # source://pry//lib/pry/pager.rb#90 - def height; end - - # source://pry//lib/pry/pager.rb#94 - def width; end -end - -# `PageTracker` tracks output to determine whether it's likely to take -# up a whole page. This doesn't need to be super precise, but we can -# use it for `SimplePager` and to avoid invoking the system pager -# unnecessarily. -# -# One simplifying assumption is that we don't need `#page?` to return -# `true` on the basis of an incomplete line. Long lines should be -# counted as multiple lines, but we don't have to transition from -# `false` to `true` until we see a newline. -# -# source://pry//lib/pry/pager.rb#213 -class Pry::Pager::PageTracker - # @return [PageTracker] a new instance of PageTracker - # - # source://pry//lib/pry/pager.rb#214 - def initialize(rows, cols); end - - # @return [Boolean] - # - # source://pry//lib/pry/pager.rb#231 - def page?; end - - # source://pry//lib/pry/pager.rb#220 - def record(str); end - - # source://pry//lib/pry/pager.rb#235 - def reset; end - - private - - # Approximation of the printable length of a given line, without the - # newline and without ANSI color codes. - # - # source://pry//lib/pry/pager.rb#244 - def line_length(line); end -end - -# `SimplePager` is a straightforward pure-Ruby pager. We use it on -# JRuby and when we can't find a usable external pager. -# -# source://pry//lib/pry/pager.rb#101 -class Pry::Pager::SimplePager < ::Pry::Pager::NullPager - # @return [SimplePager] a new instance of SimplePager - # - # source://pry//lib/pry/pager.rb#102 - def initialize(*_arg0); end - - # source://pry//lib/pry/pager.rb#107 - def write(str); end -end - -# source://pry//lib/pry/pager.rb#8 -class Pry::Pager::StopPaging < ::StandardError; end - -# `SystemPager` buffers output until we're pretty sure it's at least a -# page long, then invokes an external pager and starts streaming output -# to it. If `#close` is called before then, it just prints out the -# buffered content. -# -# source://pry//lib/pry/pager.rb#129 -class Pry::Pager::SystemPager < ::Pry::Pager::NullPager - # @return [SystemPager] a new instance of SystemPager - # - # source://pry//lib/pry/pager.rb#161 - def initialize(*_arg0); end - - # source://pry//lib/pry/pager.rb#181 - def close; end - - # source://pry//lib/pry/pager.rb#168 - def write(str); end - - private - - # @return [Boolean] - # - # source://pry//lib/pry/pager.rb#195 - def invoked_pager?; end - - # source://pry//lib/pry/pager.rb#199 - def pager; end - - # source://pry//lib/pry/pager.rb#191 - def write_to_pager(text); end - - class << self - # @return [Boolean] - # - # source://pry//lib/pry/pager.rb#142 - def available?; end - - # source://pry//lib/pry/pager.rb#130 - def default_pager; end - end -end - -# Prompt represents the Pry prompt, which can be used with Readline-like -# libraries. It defines a few default prompts (default prompt, simple prompt, -# etc) and also provides an API for adding and implementing custom prompts. -# -# @api public -# @example Registering a new Pry prompt -# Pry::Prompt.add( -# :ipython, -# 'IPython-like prompt', [':', '...:'] -# ) do |_context, _nesting, pry_instance, sep| -# sep == ':' ? "In [#{pry_instance.input_ring.count}]: " : ' ...: ' -# end -# -# # Produces: -# # In [3]: def foo -# # ...: puts 'foo' -# # ...: end -# # => :foo -# # In [4]: -# @example Manually instantiating the Prompt class -# prompt_procs = [ -# proc { '#{rand(1)}>" }, -# proc { "#{('a'..'z').to_a.sample}*" } -# ] -# prompt = Pry::Prompt.new( -# :random, -# 'Random number or letter prompt.', -# prompt_procs -# ) -# prompt.wait_proc.call(...) #=> -# prompt.incomplete_proc.call(...) -# @since v0.11.0 -# -# source://pry//lib/pry/prompt.rb#38 -class Pry::Prompt - # @api public - # @param name [String] - # @param description [String] - # @param prompt_procs [Array] - # @return [Prompt] a new instance of Prompt - # @since v0.11.0 - # - # source://pry//lib/pry/prompt.rb#117 - def initialize(name, description, prompt_procs); end - - # @api public - # @deprecated Use a `Pry::Prompt` instance directly - # @since v0.11.0 - # - # source://pry//lib/pry/prompt.rb#135 - def [](key); end - - # @api public - # @return [String] - # @since v0.11.0 - # - # source://pry//lib/pry/prompt.rb#108 - def description; end - - # @api public - # @return [Proc] the proc which builds the prompt when in the middle of an - # expression such as open method, etc. (`*`) - # @since v0.11.0 - # - # source://pry//lib/pry/prompt.rb#130 - def incomplete_proc; end - - # @api public - # @return [String] - # @since v0.11.0 - # - # source://pry//lib/pry/prompt.rb#105 - def name; end - - # @api public - # @return [Array] the array of procs that hold - # `[wait_proc, incomplete_proc]` - # @since v0.11.0 - # - # source://pry//lib/pry/prompt.rb#112 - def prompt_procs; end - - # @api public - # @return [Proc] the proc which builds the wait prompt (`>`) - # @since v0.11.0 - # - # source://pry//lib/pry/prompt.rb#124 - def wait_proc; end - - class << self - # Retrieves a prompt. - # - # @api public - # @example - # Prompt[:my_prompt] - # @param name [Symbol] The name of the prompt you want to access - # @return [Hash{Symbol=>Object}] - # @since v0.12.0 - # - # source://pry//lib/pry/prompt.rb#52 - def [](name); end - - # Adds a new prompt to the prompt hash. - # - # @api public - # @param name [Symbol] - # @param description [String] - # @param separators [Array] The separators to differentiate - # between prompt modes (default mode and class/method definition mode). - # The Array *must* have a size of 2. - # @raise [ArgumentError] if the size of `separators` is not 2 - # @raise [ArgumentError] if `prompt_name` is already occupied - # @return [nil] - # @since v0.12.0 - # @yield [context, nesting, pry_instance, sep] - # @yieldparam context [Object] the context where Pry is currently in - # @yieldparam nesting [Integer] whether the context is nested - # @yieldparam pry_instance [Pry] the Pry instance - # @yieldparam separator [String] separator string - # - # source://pry//lib/pry/prompt.rb#79 - def add(name, description = T.unsafe(nil), separators = T.unsafe(nil)); end - - # @api public - # @note Use this for read-only operations - # @return [Hash{Symbol=>Hash}] the duplicate of the internal prompts hash - # @since v0.12.0 - # - # source://pry//lib/pry/prompt.rb#59 - def all; end - end -end - -# source://pry//lib/pry/repl.rb#4 -class Pry::REPL - extend ::Forwardable - extend ::Pry::Forwardable - - # Create an instance of {REPL} wrapping the given {Pry}. - # - # @option options - # @param pry [Pry] The instance of {Pry} that this {REPL} will control. - # @param options [Hash] Options for this {REPL} instance. - # @return [REPL] a new instance of REPL - # - # source://pry//lib/pry/repl.rb#22 - def initialize(pry, options = T.unsafe(nil)); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def input(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def output(*args, **_arg1, &block); end - - # @return [Pry] The instance of {Pry} that the user is controlling. - # - # source://pry//lib/pry/repl.rb#9 - def pry; end - - # @return [Pry] The instance of {Pry} that the user is controlling. - # - # source://pry//lib/pry/repl.rb#9 - def pry=(_arg0); end - - # Start the read-eval-print loop. - # - # @raise [Exception] If the session throws `:raise_up`, raise the exception - # thrown with it. - # @return [Object?] If the session throws `:breakout`, return the value - # thrown with it. - # - # source://pry//lib/pry/repl.rb#36 - def start; end - - private - - # Calculates correct overhang for current line. Supports vi Readline - # mode and its indicators such as "(ins)" or "(cmd)". - # - # @note This doesn't calculate overhang for Readline's emacs mode with an - # indicator because emacs is the default mode and it doesn't use - # indicators in 99% of cases. - # @return [Integer] - # - # source://pry//lib/pry/repl.rb#238 - def calculate_overhang(current_prompt, original_val, indented_val); end - - # @return [Boolean] - # - # source://pry//lib/pry/repl.rb#206 - def coolline_available?; end - - # Clean up after the repl session. - # - # @return [void] - # - # source://pry//lib/pry/repl.rb#84 - def epilogue; end - - # Manage switching of input objects on encountering `EOFError`s. - # - # @return [Object] Whatever the given block returns. - # @return [:no_more_input] Indicates that no more input can be read. - # - # source://pry//lib/pry/repl.rb#127 - def handle_read_errors; end - - # source://pry//lib/pry/repl.rb#196 - def input_readline(*args); end - - # If `$stdout` is not a tty, it's probably a pipe. - # - # @example - # # `piping?` returns `false` - # % pry - # [1] pry(main) - # - # # `piping?` returns `true` - # % pry | tee log - # @return [Boolean] - # - # source://pry//lib/pry/repl.rb#218 - def piping?; end - - # Set up the repl session. - # - # @return [void] - # - # source://pry//lib/pry/repl.rb#47 - def prologue; end - - # Read a line of input from the user. - # - # @return [String] The line entered by the user. - # @return [nil] On ``. - # @return [:control_c] On ``. - # @return [:no_more_input] On EOF. - # - # source://pry//lib/pry/repl.rb#93 - def read; end - - # Returns the next line of input to be sent to the {Pry} instance. - # - # @param current_prompt [String] The prompt to use for input. - # @return [String?] The next line of input, or `nil` on . - # - # source://pry//lib/pry/repl.rb#170 - def read_line(current_prompt); end - - # @return [Boolean] - # - # source://pry//lib/pry/repl.rb#202 - def readline_available?; end - - # The actual read-eval-print loop. - # - # The {REPL} instance is responsible for reading and looping, whereas the - # {Pry} instance is responsible for evaluating user input and printing - # return values and command output. - # - # @raise [Exception] If the session throws `:raise_up`, raise the exception - # thrown with it. - # @return [Object?] If the session throws `:breakout`, return the value - # thrown with it. - # - # source://pry//lib/pry/repl.rb#66 - def repl; end - - # @return [void] - # - # source://pry//lib/pry/repl.rb#225 - def set_readline_output; end - - class << self - # Instantiate a new {Pry} instance with the given options, then start a - # {REPL} instance wrapping it. - # - # @option options - # @param options [Hash] a customizable set of options - # - # source://pry-byebug/3.10.1/lib/pry-byebug/pry_ext.rb#8 - def start(options = T.unsafe(nil)); end - - # source://pry-byebug/3.10.1/lib/pry-byebug/pry_ext.rb#8 - def start_with_pry_byebug(options = T.unsafe(nil)); end - - # source://pry//lib/pry/repl.rb#14 - def start_without_pry_byebug(options); end - end -end - -# A class to manage the loading of files through the REPL loop. -# This is an interesting trick as it processes your file as if it -# was user input in an interactive session. As a result, all Pry -# commands are available, and they are executed non-interactively. Furthermore -# the session becomes interactive when the repl loop processes a -# 'make-interactive' command in the file. The session also becomes -# interactive when an exception is encountered, enabling you to fix -# the error before returning to non-interactive processing with the -# 'make-non-interactive' command. -# -# source://pry//lib/pry/repl_file_loader.rb#14 -class Pry::REPLFileLoader - # @return [REPLFileLoader] a new instance of REPLFileLoader - # - # source://pry//lib/pry/repl_file_loader.rb#15 - def initialize(file_name); end - - # Define a few extra commands useful for flipping back & forth - # between interactive/non-interactive modes - # - # source://pry//lib/pry/repl_file_loader.rb#59 - def define_additional_commands; end - - # Switch to interactive mode, i.e take input from the user - # and use the regular print and exception handlers. - # - # @param pry_instance [Pry] the Pry instance to make interactive. - # - # source://pry//lib/pry/repl_file_loader.rb#26 - def interactive_mode(pry_instance); end - - # Actually load the file through the REPL by setting file content - # as the REPL input stream. - # - # source://pry//lib/pry/repl_file_loader.rb#75 - def load; end - - # Switch to non-interactive mode. Essentially - # this means there is no result output - # and that the session becomes interactive when an exception is encountered. - # - # @param pry_instance [Pry] the Pry instance to make non-interactive. - # - # source://pry//lib/pry/repl_file_loader.rb#37 - def non_interactive_mode(pry_instance, content); end -end - -# As a REPL, we often want to catch any unexpected exceptions that may have -# been raised; however we don't want to go overboard and prevent the user -# from exiting Pry when they want to. -# -# source://pry//lib/pry/exceptions.rb#7 -module Pry::RescuableException - class << self - # source://pry//lib/pry/exceptions.rb#8 - def ===(exception); end - end -end - -# Wraps the return result of process_commands, indicates if the -# result IS a command and what kind of command (e.g void) -# -# source://pry//lib/pry/command_set.rb#397 -class Pry::Result - # @return [Result] a new instance of Result - # - # source://pry//lib/pry/command_set.rb#400 - def initialize(is_command, retval = T.unsafe(nil)); end - - # Is the result a command? - # - # @return [Boolean] - # - # source://pry//lib/pry/command_set.rb#407 - def command?; end - - # Returns the value of attribute retval. - # - # source://pry//lib/pry/command_set.rb#398 - def retval; end - - # Is the result a command and if it is, is it a void command? - # (one that does not return a value) - # - # @return [Boolean] - # - # source://pry//lib/pry/command_set.rb#414 - def void_command?; end -end - -# A ring is a thread-safe fixed-capacity array to which you can only add -# elements. Older entries are overwritten as you add new elements, so that the -# ring can never contain more than `max_size` elemens. -# -# @api public -# @example -# ring = Pry::Ring.new(3) -# ring << 1 << 2 << 3 -# ring.to_a #=> [1, 2, 3] -# ring << 4 -# ring.to_a #=> [2, 3, 4] -# -# ring[0] #=> 2 -# ring[-1] #=> 4 -# ring.clear -# ring[0] #=> nil -# @since v0.12.0 -# -# source://pry//lib/pry/ring.rb#22 -class Pry::Ring - # @api public - # @param max_size [Integer] Maximum buffer size. The buffer will start - # overwriting elements once its reaches its maximum capacity - # @return [Ring] a new instance of Ring - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#33 - def initialize(max_size); end - - # Push `value` to the current index. - # - # @api public - # @param value [Object] - # @return [self] - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#43 - def <<(value); end - - # Read the value stored at `index`. - # - # @api public - # @param index [Integer, Range] The element (if Integer) or elements - # (if Range) associated with `index` - # @return [Object, Array, nil] element(s) at `index`, `nil` if none - # exist - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#57 - def [](index); end - - # Clear the buffer and reset count. - # - # @api public - # @return [void] - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#75 - def clear; end - - # @api public - # @return [Integer] how many objects were added during the lifetime of the - # ring - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#28 - def count; end - - # @api public - # @return [Integer] maximum buffer size - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#24 - def max_size; end - - # @api public - # @return [Integer] how many objects were added during the lifetime of the - # ring - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#28 - def size; end - - # @api public - # @return [Array] the buffer as unwinded array - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#67 - def to_a; end - - private - - # @api public - # @since v0.12.0 - # - # source://pry//lib/pry/ring.rb#84 - def transpose_buffer_tail; end -end - -# source://pry//lib/pry/slop.rb#5 -class Pry::Slop - include ::Enumerable - - # Create a new instance of Slop and optionally build options via a block. - # - # config - A Hash of configuration options. - # block - An optional block used to specify options. - # - # @return [Slop] a new instance of Slop - # - # source://pry//lib/pry/slop.rb#127 - def initialize(config = T.unsafe(nil), &block); end - - # Fetch an options argument value. - # - # key - The Symbol or String option short or long flag. - # - # Returns the Object value for this option, or nil. - # - # source://pry//lib/pry/slop.rb#278 - def [](key); end - - # Add a callback. - # - # label - The Symbol identifier to attach this callback. - # - # Returns nothing. - # - # source://pry//lib/pry/slop.rb#398 - def add_callback(label, &block); end - - # Get or set the banner. - # - # banner - The String to set the banner. - # - # Returns the banner String. - # - # source://pry//lib/pry/slop.rb#168 - def banner(banner = T.unsafe(nil)); end - - # Set the banner. - # - # banner - The String to set the banner. - # - # source://pry//lib/pry/slop.rb#159 - def banner=(banner); end - - # Add a new command. - # - # command - The Symbol or String used to identify this command. - # options - A Hash of configuration options (see Slop::new) - # - # Returns a new instance of Slop mapped to this command. - # - # source://pry//lib/pry/slop.rb#196 - def command(command, options = T.unsafe(nil), &block); end - - # The Hash of configuration options for this Slop instance. - # - # source://pry//lib/pry/slop.rb#118 - def config; end - - # Get or set the description (used for commands). - # - # desc - The String to set the description. - # - # Returns the description String. - # - # source://pry//lib/pry/slop.rb#185 - def description(desc = T.unsafe(nil)); end - - # Set the description (used for commands). - # - # desc - The String to set the description. - # - # source://pry//lib/pry/slop.rb#176 - def description=(desc); end - - # Enumerable interface. Yields each Slop::Option. - # - # source://pry//lib/pry/slop.rb#297 - def each(&block); end - - # Fetch a Slop object associated with this command. - # - # command - The String or Symbol name of the command. - # - # Examples: - # - # opts.command :foo do - # on :v, :verbose, 'Enable verbose mode' - # end - # - # # ruby run.rb foo -v - # opts.fetch_command(:foo).verbose? #=> true - # - # source://pry//lib/pry/slop.rb#389 - def fetch_command(command); end - - # Fetch a Slop::Option object. - # - # key - The Symbol or String option key. - # - # Examples: - # - # opts.on(:foo, 'Something fooey', :argument => :optional) - # opt = opts.fetch_option(:foo) - # opt.class #=> Slop::Option - # opt.accepts_optional_argument? #=> true - # - # Returns an Option or nil if none were found. - # - # source://pry//lib/pry/slop.rb#373 - def fetch_option(key); end - - # Fetch an options argument value. - # - # key - The Symbol or String option short or long flag. - # - # Returns the Object value for this option, or nil. - # - # source://pry//lib/pry/slop.rb#278 - def get(key); end - - # Print a handy Slop help string. - # - # Returns the banner followed by available option help strings. - # - # source://pry//lib/pry/slop.rb#416 - def help; end - - # Fetch a list of options which were missing from the parsed list. - # - # Examples: - # - # opts = Slop.new do - # on :n, :name= - # on :p, :password= - # end - # - # opts.parse %w[ --name Lee ] - # opts.missing #=> ['password'] - # - # Returns an Array of Strings representing missing options. - # - # source://pry//lib/pry/slop.rb#357 - def missing; end - - # Add an Option. - # - # objects - An Array with an optional Hash as the last element. - # - # Examples: - # - # on '-u', '--username=', 'Your username' - # on :v, :verbose, 'Enable verbose mode' - # - # Returns the created instance of Slop::Option. - # - # source://pry//lib/pry/slop.rb#265 - def on(*objects, &block); end - - # Add an Option. - # - # objects - An Array with an optional Hash as the last element. - # - # Examples: - # - # on '-u', '--username=', 'Your username' - # on :v, :verbose, 'Enable verbose mode' - # - # Returns the created instance of Slop::Option. - # - # source://pry//lib/pry/slop.rb#265 - def opt(*objects, &block); end - - # Add an Option. - # - # objects - An Array with an optional Hash as the last element. - # - # Examples: - # - # on '-u', '--username=', 'Your username' - # on :v, :verbose, 'Enable verbose mode' - # - # Returns the created instance of Slop::Option. - # - # source://pry//lib/pry/slop.rb#265 - def option(*objects, &block); end - - # The Array of Slop::Option objects tied to this Slop instance. - # - # source://pry//lib/pry/slop.rb#121 - def options; end - - # Parse a list of items, executing and gathering options along the way. - # - # items - The Array of items to extract options from (default: ARGV). - # block - An optional block which when used will yield non options. - # - # Returns an Array of original items. - # - # source://pry//lib/pry/slop.rb#206 - def parse(items = T.unsafe(nil), &block); end - - # Parse a list of items, executing and gathering options along the way. - # unlike parse() this method will remove any options and option arguments - # from the original Array. - # - # items - The Array of items to extract options from (default: ARGV). - # block - An optional block which when used will yield non options. - # - # Returns an Array of original items with options removed. - # - # source://pry//lib/pry/slop.rb#219 - def parse!(items = T.unsafe(nil), &block); end - - # Check for an options presence. - # - # Examples: - # - # opts.parse %w( --foo ) - # opts.present?(:foo) #=> true - # opts.present?(:bar) #=> false - # - # Returns true if all of the keys are present in the parsed arguments. - # - # @return [Boolean] - # - # source://pry//lib/pry/slop.rb#333 - def present?(*keys); end - - # Specify code to be executed when these options are parsed. - # - # callable - An object responding to a call method. - # - # yields - The instance of Slop parsing these options - # An Array of unparsed arguments - # - # Example: - # - # Slop.parse do - # on :v, :verbose - # - # run do |opts, args| - # puts "Arguments: #{args.inspect}" if opts.verbose? - # end - # end - # - # @raise [ArgumentError] - # - # source://pry//lib/pry/slop.rb#317 - def run(callable = T.unsafe(nil), &block); end - - # Add string separators between options. - # - # text - The String text to print. - # - # source://pry//lib/pry/slop.rb#405 - def separator(text); end - - # Is strict mode enabled? - # - # Returns true if strict mode is enabled, false otherwise. - # - # @return [Boolean] - # - # source://pry//lib/pry/slop.rb#152 - def strict?; end - - # Returns a new Hash with option flags as keys and option values as values. - # - # include_commands - If true, merge options from all sub-commands. - # - # source://pry//lib/pry/slop.rb#287 - def to_h(include_commands = T.unsafe(nil)); end - - # Returns a new Hash with option flags as keys and option values as values. - # - # include_commands - If true, merge options from all sub-commands. - # - # source://pry//lib/pry/slop.rb#287 - def to_hash(include_commands = T.unsafe(nil)); end - - # Print a handy Slop help string. - # - # Returns the banner followed by available option help strings. - # - # source://pry//lib/pry/slop.rb#416 - def to_s; end - - private - - # Autocreate an option on the fly. See the :autocreate Slop config option. - # - # items - The Array of items we're parsing. - # index - The current Integer index for the item we're processing. - # - # Returns nothing. - # - # source://pry//lib/pry/slop.rb#590 - def autocreate(items, index); end - - # Build an option from a list of objects. - # - # objects - An Array of objects used to build this option. - # - # Returns a new instance of Slop::Option. - # - # source://pry//lib/pry/slop.rb#606 - def build_option(objects, &block); end - - # Remove any leading -- characters from a string. - # - # object - The Object we want to cast to a String and clean. - # - # Returns the newly cleaned String with leading -- characters removed. - # - # source://pry//lib/pry/slop.rb#659 - def clean(object); end - - # source://pry//lib/pry/slop.rb#663 - def commands_to_help; end - - # Execute a `-abc` type option where a, b and c are all options. This - # method is only executed if the multiple_switches argument is true. - # - # option - The first Option object. - # argument - The argument to this option. (Split into multiple Options). - # index - The index of the current item being processed. - # - # Returns nothing. - # - # source://pry//lib/pry/slop.rb#552 - def execute_multiple_switches(option, argument, index); end - - # Execute an option, firing off callbacks and assigning arguments. - # - # option - The Slop::Option object found by #process_item. - # argument - The argument Object to assign to this option. - # index - The current Integer index of the object we're processing. - # item - The optional String item we're processing. - # - # Returns nothing. - # - # source://pry//lib/pry/slop.rb#519 - def execute_option(option, argument, index, item = T.unsafe(nil)); end - - # Extract the long flag from an item. - # - # objects - The Array of objects passed from #build_option. - # config - The Hash of configuration options built in #build_option. - # - # source://pry//lib/pry/slop.rb#644 - def extract_long_flag(objects, config); end - - # Extract an option from a flag. - # - # flag - The flag key used to extract an option. - # - # Returns an Array of [option, argument]. - # - # source://pry//lib/pry/slop.rb#567 - def extract_option(flag); end - - # Extract the short flag from an item. - # - # objects - The Array of objects passed from #build_option. - # config - The Hash of configuration options built in #build_option. - # - # source://pry//lib/pry/slop.rb#626 - def extract_short_flag(objects, config); end - - # Convenience method for present?(:option). - # - # Examples: - # - # opts.parse %( --verbose ) - # opts.verbose? #=> true - # opts.other? #=> false - # - # Returns true if this option is present. If this method does not end - # with a ? character it will instead call super(). - # - # source://pry//lib/pry/slop.rb#454 - def method_missing(method, *args, &block); end - - # Process a list item, figure out if it's an option, execute any - # callbacks, assign any option arguments, and do some sanity checks. - # - # items - The Array of items to process. - # index - The current Integer index of the item we want to process. - # block - An optional block which when passed will yield non options. - # - # Returns nothing. - # - # source://pry//lib/pry/slop.rb#472 - def process_item(items, index, &block); end - - # Override this method so we can check if an option? method exists. - # - # Returns true if this option key exists in our list of options. - # - # @return [Boolean] - # - # source://pry//lib/pry/slop.rb#340 - def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end - - class << self - # Build a Slop object from a option specification. - # - # This allows you to design your options via a simple String rather - # than programatically. Do note though that with this method, you're - # unable to pass any advanced options to the on() method when creating - # options. - # - # string - The optspec String - # config - A Hash of configuration options to pass to Slop.new - # - # Examples: - # - # opts = Slop.optspec(<<-SPEC) - # ruby foo.rb [options] - # --- - # n,name= Your name - # a,age= Your age - # A,auth Sign in with auth - # p,passcode= Your secret pass code - # SPEC - # - # opts.fetch_option(:name).description #=> "Your name" - # - # Returns a new instance of Slop. - # - # source://pry//lib/pry/slop.rb#97 - def optspec(string, config = T.unsafe(nil)); end - - # items - The Array of items to extract options from (default: ARGV). - # config - The Hash of configuration options to send to Slop.new(). - # block - An optional block used to add options. - # - # Examples: - # - # Slop.parse(ARGV, :help => true) do - # on '-n', '--name', 'Your username', :argument => true - # end - # - # Returns a new instance of Slop. - # - # source://pry//lib/pry/slop.rb#54 - def parse(items = T.unsafe(nil), config = T.unsafe(nil), &block); end - - # items - The Array of items to extract options from (default: ARGV). - # config - The Hash of configuration options to send to Slop.new(). - # block - An optional block used to add options. - # - # Returns a new instance of Slop. - # - # source://pry//lib/pry/slop.rb#63 - def parse!(items = T.unsafe(nil), config = T.unsafe(nil), &block); end - end -end - -# source://pry//lib/pry/slop/commands.rb#5 -class Pry::Slop::Commands - include ::Enumerable - - # Create a new instance of Slop::Commands and optionally build - # Slop instances via a block. Any configuration options used in - # this method will be the default configuration options sent to - # each Slop object created. - # - # config - An optional configuration Hash. - # block - Optional block used to define commands. - # - # Examples: - # - # commands = Slop::Commands.new do - # on :new do - # on '-o', '--outdir=', 'The output directory' - # on '-v', '--verbose', 'Enable verbose mode' - # end - # - # on :generate do - # on '--assets', 'Generate assets', :default => true - # end - # - # global do - # on '-D', '--debug', 'Enable debug mode', :default => false - # end - # end - # - # commands[:new].class #=> Slop - # commands.parse - # - # @return [Commands] a new instance of Commands - # - # source://pry//lib/pry/slop/commands.rb#39 - def initialize(config = T.unsafe(nil), &block); end - - # Fetch the instance of Slop tied to a command. - # - # key - The String or Symbol key used to locate this command. - # - # Returns the Slop instance if this key is found, nil otherwise. - # - # source://pry//lib/pry/slop/commands.rb#100 - def [](key); end - - # Returns the value of attribute arguments. - # - # source://pry//lib/pry/slop/commands.rb#8 - def arguments; end - - # Optionally set the banner for this command help output. - # - # banner - The String text to set the banner. - # - # Returns the String banner if one is set. - # - # source://pry//lib/pry/slop/commands.rb#59 - def banner(banner = T.unsafe(nil)); end - - # Sets the attribute banner - # - # @param value the value to set the attribute banner to. - # - # source://pry//lib/pry/slop/commands.rb#9 - def banner=(_arg0); end - - # Returns the value of attribute commands. - # - # source://pry//lib/pry/slop/commands.rb#8 - def commands; end - - # Returns the value of attribute config. - # - # source://pry//lib/pry/slop/commands.rb#8 - def config; end - - # Add a Slop instance used when no other commands exist. - # - # config - A Hash of configuration options to pass to Slop. - # block - An optional block used to pass options to Slop. - # - # Returns the newly created Slop instance mapped to default. - # - # source://pry//lib/pry/slop/commands.rb#81 - def default(config = T.unsafe(nil), &block); end - - # Enumerable interface. - # - # source://pry//lib/pry/slop/commands.rb#119 - def each(&block); end - - # Fetch the instance of Slop tied to a command. - # - # key - The String or Symbol key used to locate this command. - # - # Returns the Slop instance if this key is found, nil otherwise. - # - # source://pry//lib/pry/slop/commands.rb#100 - def get(key); end - - # Add a global Slop instance. - # - # config - A Hash of configuration options to pass to Slop. - # block - An optional block used to pass options to Slop. - # - # Returns the newly created Slop instance mapped to global. - # - # source://pry//lib/pry/slop/commands.rb#91 - def global(config = T.unsafe(nil), &block); end - - # Returns the help String. - # - # source://pry//lib/pry/slop/commands.rb#158 - def help; end - - # Returns the inspection String. - # - # source://pry//lib/pry/slop/commands.rb#170 - def inspect; end - - # Add a Slop instance for a specific command. - # - # command - A String or Symbol key used to identify this command. - # config - A Hash of configuration options to pass to Slop. - # block - An optional block used to pass options to Slop. - # - # Returns the newly created Slop instance mapped to command. - # - # source://pry//lib/pry/slop/commands.rb#71 - def on(command, config = T.unsafe(nil), &block); end - - # Parse a list of items. - # - # items - The Array of items to parse. - # - # Returns the original Array of items. - # - # source://pry//lib/pry/slop/commands.rb#128 - def parse(items = T.unsafe(nil)); end - - # Parse a list of items, removing any options or option arguments found. - # - # items - The Array of items to parse. - # - # Returns the original Array of items with options removed. - # - # source://pry//lib/pry/slop/commands.rb#138 - def parse!(items = T.unsafe(nil)); end - - # Check for a command presence. - # - # Examples: - # - # cmds.parse %w( foo ) - # cmds.present?(:foo) #=> true - # cmds.present?(:bar) #=> false - # - # Returns true if the given key is present in the parsed arguments. - # - # @return [Boolean] - # - # source://pry//lib/pry/slop/commands.rb#114 - def present?(key); end - - # Returns a nested Hash with Slop options and values. See Slop#to_hash. - # - # source://pry//lib/pry/slop/commands.rb#153 - def to_hash; end - - # Returns the help String. - # - # source://pry//lib/pry/slop/commands.rb#158 - def to_s; end - - private - - # Returns nothing. - # - # source://pry//lib/pry/slop/commands.rb#177 - def execute_arguments!(items); end - - # Returns nothing. - # - # source://pry//lib/pry/slop/commands.rb#183 - def execute_global_opts!(items); end -end - -# Returns a default Hash of configuration options this Slop instance uses. -# -# source://pry//lib/pry/slop.rb#30 -Pry::Slop::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# The main Error class, all Exception classes inherit from this class. -# -# source://pry//lib/pry/slop.rb#12 -class Pry::Slop::Error < ::StandardError; end - -# Raised when an argument does not match its intended match constraint. -# -# source://pry//lib/pry/slop.rb#21 -class Pry::Slop::InvalidArgumentError < ::Pry::Slop::Error; end - -# Raised when an invalid command is found and the strict flag is enabled. -# -# source://pry//lib/pry/slop.rb#27 -class Pry::Slop::InvalidCommandError < ::Pry::Slop::Error; end - -# Raised when an invalid option is found and the strict flag is enabled. -# -# source://pry//lib/pry/slop.rb#24 -class Pry::Slop::InvalidOptionError < ::Pry::Slop::Error; end - -# Raised when an option argument is expected but none are given. -# -# source://pry//lib/pry/slop.rb#15 -class Pry::Slop::MissingArgumentError < ::Pry::Slop::Error; end - -# Raised when an option is expected/required but not present. -# -# source://pry//lib/pry/slop.rb#18 -class Pry::Slop::MissingOptionError < ::Pry::Slop::Error; end - -# source://pry//lib/pry/slop/option.rb#5 -class Pry::Slop::Option - # Incapsulate internal option information, mainly used to store - # option specific configuration data, most of the meat of this - # class is found in the #value method. - # - # slop - The instance of Slop tied to this Option. - # short - The String or Symbol short flag. - # long - The String or Symbol long flag. - # description - The String description text. - # config - A Hash of configuration options. - # block - An optional block used as a callback. - # - # @return [Option] a new instance of Option - # - # source://pry//lib/pry/slop/option.rb#35 - def initialize(slop, short, long, description, config = T.unsafe(nil), &block); end - - # Returns true if this option accepts an optional argument. - # - # @return [Boolean] - # - # source://pry//lib/pry/slop/option.rb#72 - def accepts_optional_argument?; end - - # Returns the value of attribute argument_in_value. - # - # source://pry//lib/pry/slop/option.rb#23 - def argument_in_value; end - - # Sets the attribute argument_in_value - # - # @param value the value to set the attribute argument_in_value to. - # - # source://pry//lib/pry/slop/option.rb#23 - def argument_in_value=(_arg0); end - - # Call this options callback if one exists, and it responds to call(). - # - # Returns nothing. - # - # source://pry//lib/pry/slop/option.rb#84 - def call(*objects); end - - # Returns the value of attribute config. - # - # source://pry//lib/pry/slop/option.rb#22 - def config; end - - # Returns the value of attribute count. - # - # source://pry//lib/pry/slop/option.rb#23 - def count; end - - # Sets the attribute count - # - # @param value the value to set the attribute count to. - # - # source://pry//lib/pry/slop/option.rb#23 - def count=(_arg0); end - - # Returns the value of attribute description. - # - # source://pry//lib/pry/slop/option.rb#22 - def description; end - - # Returns true if this option expects an argument. - # - # @return [Boolean] - # - # source://pry//lib/pry/slop/option.rb#67 - def expects_argument?; end - - # Returns the help String for this option. - # - # source://pry//lib/pry/slop/option.rb#124 - def help; end - - # Returns the String inspection text. - # - # source://pry//lib/pry/slop/option.rb#143 - def inspect; end - - # Returns the String flag of this option. Preferring the long flag. - # - # source://pry//lib/pry/slop/option.rb#77 - def key; end - - # Returns the value of attribute long. - # - # source://pry//lib/pry/slop/option.rb#22 - def long; end - - # Returns the value of attribute short. - # - # source://pry//lib/pry/slop/option.rb#22 - def short; end - - # Returns the help String for this option. - # - # source://pry//lib/pry/slop/option.rb#124 - def to_s; end - - # Returns the value of attribute types. - # - # source://pry//lib/pry/slop/option.rb#22 - def types; end - - # Fetch the argument value for this option. - # - # Returns the Object once any type conversions have taken place. - # - # source://pry//lib/pry/slop/option.rb#108 - def value; end - - # Set the new argument value for this option. - # - # We use this setter method to handle concatenating lists. That is, - # when an array type is specified and used more than once, values from - # both options will be grouped together and flattened into a single array. - # - # source://pry//lib/pry/slop/option.rb#93 - def value=(new_value); end - - private - - # Convert an object to a Float if possible. - # - # value - The Object we want to convert to a float. - # - # Returns the Float value if possible to convert, else a zero. - # - # source://pry//lib/pry/slop/option.rb#173 - def value_to_float(value); end - - # Convert an object to an Integer if possible. - # - # value - The Object we want to convert to an integer. - # - # Returns the Integer value if possible to convert, else a zero. - # - # source://pry//lib/pry/slop/option.rb#156 - def value_to_integer(value); end - - # Convert an object to a Range if possible. - # - # value - The Object we want to convert to a range. - # - # Returns the Range value if one could be found, else the original object. - # - # source://pry//lib/pry/slop/option.rb#190 - def value_to_range(value); end -end - -# The default Hash of configuration options this class uses. -# -# source://pry//lib/pry/slop/option.rb#7 -Pry::Slop::Option::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://pry//lib/pry/slop.rb#9 -Pry::Slop::VERSION = T.let(T.unsafe(nil), String) - -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/syntax_highlighter.rb#8 -class Pry::SyntaxHighlighter - class << self - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/syntax_highlighter.rb#9 - def highlight(code, language = T.unsafe(nil)); end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/syntax_highlighter.rb#17 - def keyword_token_color; end - - # Sets comment token to blue (black by default), so it's more legible. - # - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/syntax_highlighter.rb#22 - def overwrite_coderay_comment_token!; end - - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/syntax_highlighter.rb#13 - def tokenize(code, language = T.unsafe(nil)); end - end -end - -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/system_command_handler.rb#6 -module Pry::SystemCommandHandler - class << self - # @api private - # @since v0.13.0 - # - # source://pry//lib/pry/system_command_handler.rb#8 - def default(output, command, _pry_instance); end - end -end - -# Catches SecurityErrors if $SAFE is set -# -# source://pry//lib/pry/exceptions.rb#28 -module Pry::TooSafeException - class << self - # source://pry//lib/pry/exceptions.rb#29 - def ===(exception); end - end -end - -# An Exception Tag (cf. Exceptional Ruby) that instructs Pry to show the error -# in a more user-friendly manner. This should be used when the exception -# happens within Pry itself as a direct consequence of the user typing -# something wrong. -# -# This allows us to distinguish between the user typing: -# -# pry(main)> def ) -# SyntaxError: unexpected ) -# -# pry(main)> method_that_evals("def )") -# SyntaxError: (eval):1: syntax error, unexpected ')' -# from ./a.rb:2 in `eval' -# -# source://pry//lib/pry/exceptions.rb#51 -module Pry::UserError; end - -# source://pry//lib/pry/version.rb#4 -Pry::VERSION = T.let(T.unsafe(nil), String) - -# @api private -# @since v0.13.0 -# -# source://pry//lib/pry/warning.rb#6 -module Pry::Warning - class << self - # Prints a warning message with exact file and line location, similar to how - # Ruby's -W prints warnings. - # - # @api private - # @param message [String] - # @return [void] - # @since v0.13.0 - # - # source://pry//lib/pry/warning.rb#12 - def warn(message); end - end -end - -# source://pry//lib/pry/wrapped_module.rb#16 -class Pry::WrappedModule - include ::Pry::Helpers::BaseHelpers - include ::Pry::CodeObject::Helpers - - # @param mod [Module] - # @raise [ArgumentError] if the argument is not a `Module` - # @return [WrappedModule] a new instance of WrappedModule - # - # source://pry//lib/pry/wrapped_module.rb#56 - def initialize(mod); end - - # Return a candidate for this module of specified rank. A `rank` - # of 0 is equivalent to the 'primary candidate', which is the - # module definition with the highest number of methods. A `rank` - # of 1 is the module definition with the second highest number of - # methods, and so on. Module candidates are necessary as modules - # can be reopened multiple times and in multiple places in Ruby, - # the candidate API gives you access to the module definition - # representing each of those reopenings. - # - # @param rank [Fixnum] - # @raise [Pry::CommandError] If the `rank` is out of range. That - # is greater than `number_of_candidates - 1`. - # @return [Pry::WrappedModule::Candidate] - # - # source://pry//lib/pry/wrapped_module.rb#239 - def candidate(rank); end - - # @note On JRuby 1.9 and higher, in certain conditions, this method chucks - # away its ability to be quick (when there are lots of monkey patches, - # like in Rails). However, it should be efficient enough on other rubies. - # @return [Enumerator, Array] on JRuby 1.9 and higher returns Array, on - # other rubies returns Enumerator - # @see https://github.com/jruby/jruby/issues/525 - # - # source://pry//lib/pry/wrapped_module.rb#255 - def candidates; end - - # Is this strictly a class? - # - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#126 - def class?; end - - # Returns an array of the names of the constants accessible in the wrapped - # module. This avoids the problem of accidentally calling the singleton - # method `Module.constants`. - # - # @param inherit [Boolean] Include the names of constants from included - # modules? - # - # source://pry//lib/pry/wrapped_module.rb#76 - def constants(inherit = T.unsafe(nil)); end - - # Returns documentation for the module. - # This documentation is for the primary candidate, if - # you would like documentation for other candidates use - # `WrappedModule#candidate` to select the candidate you're - # interested in. - # - # @raise [Pry::CommandError] If documentation cannot be found. - # @return [String] The documentation for the module. - # - # source://pry//lib/pry/wrapped_module.rb#195 - def doc; end - - # @return [String, nil] The associated file for the module (i.e - # the primary candidate: highest ranked monkeypatch). - # - # source://pry//lib/pry/wrapped_module.rb#176 - def file; end - - # @return [Fixnum, nil] The associated line for the module (i.e - # the primary candidate: highest ranked monkeypatch). - # - # source://pry//lib/pry/wrapped_module.rb#183 - def line; end - - # Forward method invocations to the wrapped module - # - # source://pry//lib/pry/wrapped_module.rb#150 - def method_missing(method_name, *args, &block); end - - # The prefix that would appear before methods defined on this class. - # - # i.e. the "String." or "String#" in String.new and String#initialize. - # - # @return String - # - # source://pry//lib/pry/wrapped_module.rb#85 - def method_prefix; end - - # Is this strictly a module? (does not match classes) - # - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#120 - def module?; end - - # The name of the Module if it has one, otherwise #. - # - # @return [String] - # - # source://pry//lib/pry/wrapped_module.rb#100 - def nonblank_name; end - - # @return [Fixnum] The number of candidate definitions for the - # current module. - # - # source://pry//lib/pry/wrapped_module.rb#245 - def number_of_candidates; end - - # Is this a singleton class? - # - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#110 - def singleton_class?; end - - # Get the instance associated with this singleton class. - # - # @raise ArgumentError: tried to get instance of non singleton class - # @return [Object] - # - # source://pry//lib/pry/wrapped_module.rb#135 - def singleton_instance; end - - # Returns the source for the module. - # This source is for the primary candidate, if - # you would like source for other candidates use - # `WrappedModule#candidate` to select the candidate you're - # interested in. - # - # @raise [Pry::CommandError] If source cannot be found. - # @return [String] The source for the module. - # - # source://pry//lib/pry/wrapped_module.rb#206 - def source; end - - # @return [String, nil] The associated file for the module (i.e - # the primary candidate: highest ranked monkeypatch). - # - # source://pry//lib/pry/wrapped_module.rb#176 - def source_file; end - - # @return [Fixnum, nil] The associated line for the module (i.e - # the primary candidate: highest ranked monkeypatch). - # - # source://pry//lib/pry/wrapped_module.rb#183 - def source_line; end - - # Retrieve the source location of a module. Return value is in same - # format as Method#source_location. If the source location - # cannot be found this method returns `nil`. - # - # @return [Array, nil] The source location of the - # module (or class), or `nil` if no source location found. - # - # source://pry//lib/pry/wrapped_module.rb#168 - def source_location; end - - # @param times [Fixnum] How far to travel up the ancestor chain. - # @return [Pry::WrappedModule, nil] The wrapped module that is the - # superclass. - # When `self` is a `Module` then return the - # nth ancestor, otherwise (in the case of classes) return the - # nth ancestor that is a class. - # - # source://pry//lib/pry/wrapped_module.rb#275 - def super(times = T.unsafe(nil)); end - - # Returns the value of attribute wrapped. - # - # source://pry//lib/pry/wrapped_module.rb#20 - def wrapped; end - - # @return [String] Return the YARD docs for this module. - # - # source://pry//lib/pry/wrapped_module.rb#223 - def yard_doc; end - - # @return [Boolean] Whether YARD docs are available for this module. - # - # source://pry//lib/pry/wrapped_module.rb#265 - def yard_docs?; end - - # @return [String] Return the associated file for the - # module from YARD, if one exists. - # - # source://pry//lib/pry/wrapped_module.rb#212 - def yard_file; end - - # @return [Fixnum] Return the associated line for the - # module from YARD, if one exists. - # - # source://pry//lib/pry/wrapped_module.rb#218 - def yard_line; end - - private - - # Return all methods (instance methods and class methods) for a - # given module. - # - # @return [Array] - # - # source://pry//lib/pry/wrapped_module.rb#352 - def all_methods_for(mod); end - - # We only want methods that have a non-nil `source_location`. We also - # skip some spooky internal methods. - # - # @return [Array] - # - # source://pry//lib/pry/wrapped_module.rb#334 - def all_relevant_methods_for(mod); end - - # A helper method. - # - # source://pry//lib/pry/wrapped_module.rb#315 - def all_source_locations_by_popularity; end - - # memoized lines for file - # - # source://pry//lib/pry/wrapped_module.rb#376 - def lines_for_file(file); end - - # @return [Array>] The array of `Pry::Method` objects, - # there are two associated with each candidate. The first is the 'base - # method' for a candidate and it serves as the start point for - # the search in uncovering the module definition. The second is - # the last method defined for that candidate and it is used to - # speed up source code extraction. - # - # source://pry//lib/pry/wrapped_module.rb#307 - def method_candidates; end - - # Detect methods that are defined with `def_delegator` from the Forwardable - # module. We want to reject these methods as they screw up module - # extraction since the `source_location` for such methods points at forwardable.rb - # TODO: make this more robust as valid user-defined files called - # forwardable.rb are also skipped. - # - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#371 - def method_defined_by_forwardable_module?(method); end - - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#356 - def nested_module?(parent, name); end - - # @return [Pry::WrappedModule::Candidate] The candidate with the - # highest rank, that is the 'monkey patch' of this module with the - # highest number of methods, which contains a source code line that - # defines the module. It is considered the 'canonical' definition - # for the module. In the absense of a suitable candidate, the - # candidate of rank 0 will be returned, or a CommandError raised if - # there are no candidates at all. - # - # source://pry//lib/pry/wrapped_module.rb#297 - def primary_candidate; end - - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#158 - def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end - - class << self - # Convert a string to a module. - # - # @example - # Pry::WrappedModule.from_str("Pry::Code") - # @param mod_name [String] - # @param target [Binding] The binding where the lookup takes place. - # @return [Module, nil] The module or `nil` (if conversion failed). - # - # source://pry//lib/pry/wrapped_module.rb#29 - def from_str(mod_name, target = T.unsafe(nil)); end - - private - - # We use this method to decide whether code is safe to eval. Method's are - # generally not, but everything else is. - # TODO: is just checking != "method" enough?? - # TODO: see duplication of this method in Pry::CodeObject - # - # @param str [String] The string to lookup. - # @param target [Binding] Where the lookup takes place. - # @return [Boolean] - # - # source://pry//lib/pry/wrapped_module.rb#45 - def safe_to_evaluate?(str, target); end - end -end - -# This class represents a single candidate for a module/class definition. -# It provides access to the source, documentation, line and file -# for a monkeypatch (reopening) of a class/module. -# -# source://pry//lib/pry/wrapped_module/candidate.rb#8 -class Pry::WrappedModule::Candidate - include ::Pry::Helpers::DocumentationHelpers - include ::Pry::CodeObject::Helpers - extend ::Forwardable - extend ::Pry::Forwardable - - # @param wrapper [Pry::WrappedModule] The associated - # `Pry::WrappedModule` instance that owns the candidates. - # @param rank [Fixnum] The rank of the candidate to - # retrieve. Passing 0 returns 'primary candidate' (the candidate with largest - # number of methods), passing 1 retrieves candidate with - # second largest number of methods, and so on, up to - # `Pry::WrappedModule#number_of_candidates() - 1` - # @raise [Pry::CommandError] If `rank` is out of bounds. - # @return [Candidate] a new instance of Candidate - # - # source://pry//lib/pry/wrapped_module/candidate.rb#38 - def initialize(wrapper, rank); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def class?(*args, **_arg1, &block); end - - # @raise [Pry::CommandError] If documentation cannot be found. - # @return [String] The documentation for the candidate. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#70 - def doc; end - - # @return [String] The file where the module definition is located. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#14 - def file; end - - # @return [Fixnum] The line where the module definition is located. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#18 - def line; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def module?(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def nonblank_name(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def number_of_candidates(*args, **_arg1, &block); end - - # @raise [Pry::CommandError] If source code cannot be found. - # @return [String] The source for the candidate, i.e the - # complete module/class definition. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#59 - def source; end - - # @return [String] The file where the module definition is located. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#14 - def source_file; end - - # @return [Fixnum] The line where the module definition is located. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#18 - def source_line; end - - # @return [Array, nil] A `[String, Fixnum]` pair representing the - # source location (file and line) for the candidate or `nil` - # if no source location found. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#79 - def source_location; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def wrapped(*args, **_arg1, &block); end - - private - - # source://pry//lib/pry/wrapped_module/candidate.rb#104 - def class_regexes; end - - # Locate the first line of the module definition. - # - # @param file [String] The file that contains the module - # definition (somewhere). - # @param line [Fixnum] The module definition should appear - # before this line (if it exists). - # @return [Fixnum] The line where the module is defined. This - # line number is one-indexed. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#99 - def first_line_of_module_definition(file, line); end - - # This method is used by `Candidate#source_location` as a - # starting point for the search for the candidate's definition. - # - # @return [Array] The source location of the base method used to - # calculate the source location of the candidate. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#115 - def first_method_source_location; end - - # @return [Array] The source location of the last method in this - # candidate's module definition. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#121 - def last_method_source_location; end - - # source://pry//lib/pry/forwardable.rb#18 - def lines_for_file(*a, &b); end - - # source://pry//lib/pry/forwardable.rb#18 - def method_candidates(*a, &b); end - - # source://pry//lib/pry/forwardable.rb#18 - def name(*a, &b); end - - # Return the number of lines between the start of the class definition and - # the start of the last method. We use this value so we can quickly grab - # these lines from the file (without having to check each intervening line - # for validity, which is expensive) speeding up source extraction. - # - # @return [Integer] number of lines. - # - # source://pry//lib/pry/wrapped_module/candidate.rb#131 - def number_of_lines_in_first_chunk; end - - # source://pry//lib/pry/forwardable.rb#18 - def yard_docs?(*a, &b); end -end diff --git a/sorbet/rbi/gems/rainbow@3.1.1.rbi b/sorbet/rbi/gems/rainbow@3.1.1.rbi deleted file mode 100644 index 87f4c33e..00000000 --- a/sorbet/rbi/gems/rainbow@3.1.1.rbi +++ /dev/null @@ -1,402 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rainbow` gem. -# Please instead update this file by running `bin/tapioca gem rainbow`. - -class Object < ::BasicObject - include ::Kernel - include ::PP::ObjectMixin - - private - - # source://rainbow//lib/rainbow/global.rb#23 - def Rainbow(string); end -end - -# source://rainbow//lib/rainbow/string_utils.rb#3 -module Rainbow - class << self - # source://rainbow//lib/rainbow/global.rb#10 - def enabled; end - - # source://rainbow//lib/rainbow/global.rb#14 - def enabled=(value); end - - # source://rainbow//lib/rainbow/global.rb#6 - def global; end - - # source://rainbow//lib/rainbow.rb#6 - def new; end - - # source://rainbow//lib/rainbow/global.rb#18 - def uncolor(string); end - end -end - -# source://rainbow//lib/rainbow/color.rb#4 -class Rainbow::Color - # Returns the value of attribute ground. - # - # source://rainbow//lib/rainbow/color.rb#5 - def ground; end - - class << self - # source://rainbow//lib/rainbow/color.rb#7 - def build(ground, values); end - - # source://rainbow//lib/rainbow/color.rb#40 - def parse_hex_color(hex); end - end -end - -# source://rainbow//lib/rainbow/color.rb#54 -class Rainbow::Color::Indexed < ::Rainbow::Color - # @return [Indexed] a new instance of Indexed - # - # source://rainbow//lib/rainbow/color.rb#57 - def initialize(ground, num); end - - # source://rainbow//lib/rainbow/color.rb#62 - def codes; end - - # Returns the value of attribute num. - # - # source://rainbow//lib/rainbow/color.rb#55 - def num; end -end - -# source://rainbow//lib/rainbow/color.rb#69 -class Rainbow::Color::Named < ::Rainbow::Color::Indexed - # @return [Named] a new instance of Named - # - # source://rainbow//lib/rainbow/color.rb#90 - def initialize(ground, name); end - - class << self - # source://rainbow//lib/rainbow/color.rb#82 - def color_names; end - - # source://rainbow//lib/rainbow/color.rb#86 - def valid_names; end - end -end - -# source://rainbow//lib/rainbow/color.rb#70 -Rainbow::Color::Named::NAMES = T.let(T.unsafe(nil), Hash) - -# source://rainbow//lib/rainbow/color.rb#100 -class Rainbow::Color::RGB < ::Rainbow::Color::Indexed - # @return [RGB] a new instance of RGB - # - # source://rainbow//lib/rainbow/color.rb#107 - def initialize(ground, *values); end - - # Returns the value of attribute b. - # - # source://rainbow//lib/rainbow/color.rb#101 - def b; end - - # source://rainbow//lib/rainbow/color.rb#116 - def codes; end - - # Returns the value of attribute g. - # - # source://rainbow//lib/rainbow/color.rb#101 - def g; end - - # Returns the value of attribute r. - # - # source://rainbow//lib/rainbow/color.rb#101 - def r; end - - private - - # source://rainbow//lib/rainbow/color.rb#122 - def code_from_rgb; end - - class << self - # source://rainbow//lib/rainbow/color.rb#103 - def to_ansi_domain(value); end - end -end - -# source://rainbow//lib/rainbow/color.rb#129 -class Rainbow::Color::X11Named < ::Rainbow::Color::RGB - include ::Rainbow::X11ColorNames - - # @return [X11Named] a new instance of X11Named - # - # source://rainbow//lib/rainbow/color.rb#140 - def initialize(ground, name); end - - class << self - # source://rainbow//lib/rainbow/color.rb#132 - def color_names; end - - # source://rainbow//lib/rainbow/color.rb#136 - def valid_names; end - end -end - -# source://rainbow//lib/rainbow/null_presenter.rb#4 -class Rainbow::NullPresenter < ::String - # source://rainbow//lib/rainbow/null_presenter.rb#9 - def background(*_values); end - - # source://rainbow//lib/rainbow/null_presenter.rb#9 - def bg(*_values); end - - # source://rainbow//lib/rainbow/null_presenter.rb#49 - def black; end - - # source://rainbow//lib/rainbow/null_presenter.rb#33 - def blink; end - - # source://rainbow//lib/rainbow/null_presenter.rb#65 - def blue; end - - # source://rainbow//lib/rainbow/null_presenter.rb#17 - def bold; end - - # source://rainbow//lib/rainbow/null_presenter.rb#17 - def bright; end - - # source://rainbow//lib/rainbow/null_presenter.rb#5 - def color(*_values); end - - # source://rainbow//lib/rainbow/null_presenter.rb#45 - def cross_out; end - - # source://rainbow//lib/rainbow/null_presenter.rb#73 - def cyan; end - - # source://rainbow//lib/rainbow/null_presenter.rb#21 - def dark; end - - # source://rainbow//lib/rainbow/null_presenter.rb#21 - def faint; end - - # source://rainbow//lib/rainbow/null_presenter.rb#5 - def fg(*_values); end - - # source://rainbow//lib/rainbow/null_presenter.rb#5 - def foreground(*_values); end - - # source://rainbow//lib/rainbow/null_presenter.rb#57 - def green; end - - # source://rainbow//lib/rainbow/null_presenter.rb#41 - def hide; end - - # source://rainbow//lib/rainbow/null_presenter.rb#37 - def inverse; end - - # source://rainbow//lib/rainbow/null_presenter.rb#25 - def italic; end - - # source://rainbow//lib/rainbow/null_presenter.rb#69 - def magenta; end - - # source://rainbow//lib/rainbow/null_presenter.rb#81 - def method_missing(method_name, *args); end - - # source://rainbow//lib/rainbow/null_presenter.rb#53 - def red; end - - # source://rainbow//lib/rainbow/null_presenter.rb#13 - def reset; end - - # source://rainbow//lib/rainbow/null_presenter.rb#45 - def strike; end - - # source://rainbow//lib/rainbow/null_presenter.rb#29 - def underline; end - - # source://rainbow//lib/rainbow/null_presenter.rb#77 - def white; end - - # source://rainbow//lib/rainbow/null_presenter.rb#61 - def yellow; end - - private - - # @return [Boolean] - # - # source://rainbow//lib/rainbow/null_presenter.rb#89 - def respond_to_missing?(method_name, *args); end -end - -# source://rainbow//lib/rainbow/presenter.rb#8 -class Rainbow::Presenter < ::String - # Sets background color of this text. - # - # source://rainbow//lib/rainbow/presenter.rb#30 - def background(*values); end - - # Sets background color of this text. - # - # source://rainbow//lib/rainbow/presenter.rb#30 - def bg(*values); end - - # source://rainbow//lib/rainbow/presenter.rb#92 - def black; end - - # Turns on blinking attribute for this text (not well supported by terminal - # emulators). - # - # source://rainbow//lib/rainbow/presenter.rb#72 - def blink; end - - # source://rainbow//lib/rainbow/presenter.rb#108 - def blue; end - - # Turns on bright/bold for this text. - # - # source://rainbow//lib/rainbow/presenter.rb#45 - def bold; end - - # Turns on bright/bold for this text. - # - # source://rainbow//lib/rainbow/presenter.rb#45 - def bright; end - - # Sets color of this text. - # - # source://rainbow//lib/rainbow/presenter.rb#22 - def color(*values); end - - # source://rainbow//lib/rainbow/presenter.rb#86 - def cross_out; end - - # source://rainbow//lib/rainbow/presenter.rb#116 - def cyan; end - - # Turns on faint/dark for this text (not well supported by terminal - # emulators). - # - # source://rainbow//lib/rainbow/presenter.rb#53 - def dark; end - - # Turns on faint/dark for this text (not well supported by terminal - # emulators). - # - # source://rainbow//lib/rainbow/presenter.rb#53 - def faint; end - - # Sets color of this text. - # - # source://rainbow//lib/rainbow/presenter.rb#22 - def fg(*values); end - - # Sets color of this text. - # - # source://rainbow//lib/rainbow/presenter.rb#22 - def foreground(*values); end - - # source://rainbow//lib/rainbow/presenter.rb#100 - def green; end - - # Hides this text (set its color to the same as background). - # - # source://rainbow//lib/rainbow/presenter.rb#82 - def hide; end - - # Inverses current foreground/background colors. - # - # source://rainbow//lib/rainbow/presenter.rb#77 - def inverse; end - - # Turns on italic style for this text (not well supported by terminal - # emulators). - # - # source://rainbow//lib/rainbow/presenter.rb#61 - def italic; end - - # source://rainbow//lib/rainbow/presenter.rb#112 - def magenta; end - - # We take care of X11 color method call here. - # Such as #aqua, #ghostwhite. - # - # source://rainbow//lib/rainbow/presenter.rb#126 - def method_missing(method_name, *args); end - - # source://rainbow//lib/rainbow/presenter.rb#96 - def red; end - - # Resets terminal to default colors/backgrounds. - # - # It shouldn't be needed to use this method because all methods - # append terminal reset code to end of string. - # - # source://rainbow//lib/rainbow/presenter.rb#40 - def reset; end - - # source://rainbow//lib/rainbow/presenter.rb#86 - def strike; end - - # Turns on underline decoration for this text. - # - # source://rainbow//lib/rainbow/presenter.rb#66 - def underline; end - - # source://rainbow//lib/rainbow/presenter.rb#120 - def white; end - - # source://rainbow//lib/rainbow/presenter.rb#104 - def yellow; end - - private - - # @return [Boolean] - # - # source://rainbow//lib/rainbow/presenter.rb#134 - def respond_to_missing?(method_name, *args); end - - # source://rainbow//lib/rainbow/presenter.rb#140 - def wrap_with_sgr(codes); end -end - -# source://rainbow//lib/rainbow/presenter.rb#9 -Rainbow::Presenter::TERM_EFFECTS = T.let(T.unsafe(nil), Hash) - -# source://rainbow//lib/rainbow/string_utils.rb#4 -class Rainbow::StringUtils - class << self - # source://rainbow//lib/rainbow/string_utils.rb#17 - def uncolor(string); end - - # source://rainbow//lib/rainbow/string_utils.rb#5 - def wrap_with_sgr(string, codes); end - end -end - -# source://rainbow//lib/rainbow/wrapper.rb#7 -class Rainbow::Wrapper - # @return [Wrapper] a new instance of Wrapper - # - # source://rainbow//lib/rainbow/wrapper.rb#10 - def initialize(enabled = T.unsafe(nil)); end - - # Returns the value of attribute enabled. - # - # source://rainbow//lib/rainbow/wrapper.rb#8 - def enabled; end - - # Sets the attribute enabled - # - # @param value the value to set the attribute enabled to. - # - # source://rainbow//lib/rainbow/wrapper.rb#8 - def enabled=(_arg0); end - - # source://rainbow//lib/rainbow/wrapper.rb#14 - def wrap(string); end -end - -# source://rainbow//lib/rainbow/x11_color_names.rb#4 -module Rainbow::X11ColorNames; end - -# source://rainbow//lib/rainbow/x11_color_names.rb#5 -Rainbow::X11ColorNames::NAMES = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/rake@13.0.6.rbi b/sorbet/rbi/gems/rake@13.1.0.rbi similarity index 96% rename from sorbet/rbi/gems/rake@13.0.6.rbi rename to sorbet/rbi/gems/rake@13.1.0.rbi index 0202f06d..f1286717 100644 --- a/sorbet/rbi/gems/rake@13.0.6.rbi +++ b/sorbet/rbi/gems/rake@13.1.0.rbi @@ -22,13 +22,13 @@ module FileUtils # Example: # ruby %{-pe '$_.upcase!' ['a', 'b', 'c'] # - # source://rake//lib/rake/file_utils.rb#128 + # source://rake//lib/rake/file_utils.rb#126 def split_all(path); end private @@ -75,14 +75,14 @@ module FileUtils # source://rake//lib/rake/file_utils.rb#61 def create_shell_runner(cmd); end - # source://rake//lib/rake/file_utils.rb#86 + # source://rake//lib/rake/file_utils.rb#84 def set_verbose_option(options); end - # source://rake//lib/rake/file_utils.rb#73 + # source://rake//lib/rake/file_utils.rb#71 def sh_show_command(cmd); end end -# source://rake//lib/rake/file_utils.rb#108 +# source://rake//lib/rake/file_utils.rb#106 FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array) # Path to the currently running Ruby program @@ -195,13 +195,13 @@ class Rake::Application # Add a file to the list of files to be imported. # - # source://rake//lib/rake/application.rb#777 + # source://rake//lib/rake/application.rb#801 def add_import(fn); end # Add a loader to handle imported files ending in the extension # +ext+. # - # source://rake//lib/rake/application.rb#139 + # source://rake//lib/rake/application.rb#161 def add_loader(ext, loader); end # Collect the list of tasks on the command line. If no tasks are @@ -213,13 +213,13 @@ class Rake::Application # recognised command-line options, which OptionParser.parse will # have taken care of already. # - # source://rake//lib/rake/application.rb#758 + # source://rake//lib/rake/application.rb#782 def collect_command_line_tasks(args); end # Default task name ("default"). # (May be overridden by subclasses) # - # source://rake//lib/rake/application.rb#772 + # source://rake//lib/rake/application.rb#796 def default_task_name; end # Warn about deprecated usage. @@ -227,75 +227,75 @@ class Rake::Application # Example: # Rake.application.deprecate("import", "Rake.import", caller.first) # - # source://rake//lib/rake/application.rb#258 + # source://rake//lib/rake/application.rb#282 def deprecate(old_usage, new_usage, call_site); end - # source://rake//lib/rake/application.rb#222 + # source://rake//lib/rake/application.rb#244 def display_cause_details(ex); end # Display the error message that caused the exception. # - # source://rake//lib/rake/application.rb#206 + # source://rake//lib/rake/application.rb#228 def display_error_message(ex); end - # source://rake//lib/rake/application.rb#245 + # source://rake//lib/rake/application.rb#269 def display_exception_backtrace(ex); end - # source://rake//lib/rake/application.rb#214 + # source://rake//lib/rake/application.rb#236 def display_exception_details(ex); end - # source://rake//lib/rake/application.rb#229 + # source://rake//lib/rake/application.rb#251 def display_exception_details_seen; end - # source://rake//lib/rake/application.rb#237 + # source://rake//lib/rake/application.rb#259 def display_exception_message_details(ex); end # Display the tasks and prerequisites # - # source://rake//lib/rake/application.rb#381 + # source://rake//lib/rake/application.rb#405 def display_prerequisites; end # Display the tasks and comments. # - # source://rake//lib/rake/application.rb#298 + # source://rake//lib/rake/application.rb#322 def display_tasks_and_comments; end # Calculate the dynamic width of the # - # source://rake//lib/rake/application.rb#349 + # source://rake//lib/rake/application.rb#373 def dynamic_width; end - # source://rake//lib/rake/application.rb#353 + # source://rake//lib/rake/application.rb#377 def dynamic_width_stty; end - # source://rake//lib/rake/application.rb#357 + # source://rake//lib/rake/application.rb#381 def dynamic_width_tput; end # Exit the program because of an unhandled exception. # (may be overridden by subclasses) # - # source://rake//lib/rake/application.rb#201 + # source://rake//lib/rake/application.rb#223 def exit_because_of_exception(ex); end - # source://rake//lib/rake/application.rb#678 + # source://rake//lib/rake/application.rb#702 def find_rakefile_location; end # Read and handle the command line options. Returns the command line # arguments that we didn't understand, which should (in theory) be just # task names and env vars. # - # source://rake//lib/rake/application.rb#644 + # source://rake//lib/rake/application.rb#668 def handle_options(argv); end # @return [Boolean] # - # source://rake//lib/rake/application.rb#233 + # source://rake//lib/rake/application.rb#255 def has_cause?(ex); end # True if one of the files in RAKEFILES is in the current directory. # If a match is found, it is copied into @rakefile. # - # source://rake//lib/rake/application.rb#274 + # source://rake//lib/rake/application.rb#298 def have_rakefile; end # Initialize the command line parameters and app name. @@ -305,17 +305,17 @@ class Rake::Application # Invokes a task with arguments that are extracted from +task_string+ # - # source://rake//lib/rake/application.rb#157 + # source://rake//lib/rake/application.rb#179 def invoke_task(task_string); end # Load the pending list of imported files. # - # source://rake//lib/rake/application.rb#782 + # source://rake//lib/rake/application.rb#806 def load_imports; end # Find the rakefile and then load it and any pending imports. # - # source://rake//lib/rake/application.rb#102 + # source://rake//lib/rake/application.rb#124 def load_rakefile; end # The name of the application (typically 'rake') @@ -325,7 +325,7 @@ class Rake::Application # Application options from the command line # - # source://rake//lib/rake/application.rb#145 + # source://rake//lib/rake/application.rb#167 def options; end # The original directory where rake was invoked. @@ -333,16 +333,16 @@ class Rake::Application # source://rake//lib/rake/application.rb#27 def original_dir; end - # source://rake//lib/rake/application.rb#163 + # source://rake//lib/rake/application.rb#185 def parse_task_string(string); end - # source://rake//lib/rake/application.rb#690 + # source://rake//lib/rake/application.rb#714 def print_rakefile_directory(location); end # Similar to the regular Ruby +require+ command, but will check # for *.rake files in addition to *.rb files. # - # source://rake//lib/rake/application.rb#664 + # source://rake//lib/rake/application.rb#688 def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end # Name of the actual rakefile used. @@ -350,10 +350,10 @@ class Rake::Application # source://rake//lib/rake/application.rb#30 def rakefile; end - # source://rake//lib/rake/application.rb#798 + # source://rake//lib/rake/application.rb#822 def rakefile_location(backtrace = T.unsafe(nil)); end - # source://rake//lib/rake/application.rb#695 + # source://rake//lib/rake/application.rb#719 def raw_load_rakefile; end # Run the Rake application. The run method performs the following @@ -372,26 +372,26 @@ class Rake::Application # Run the given block with the thread startup and shutdown. # - # source://rake//lib/rake/application.rb#122 + # source://rake//lib/rake/application.rb#144 def run_with_threads; end - # source://rake//lib/rake/application.rb#807 + # source://rake//lib/rake/application.rb#831 def set_default_options; end # Provide standard exception handling for the given block. # - # source://rake//lib/rake/application.rb#185 + # source://rake//lib/rake/application.rb#207 def standard_exception_handling; end # A list of all the standard options used in rake, suitable for # passing to OptionParser. # - # source://rake//lib/rake/application.rb#402 + # source://rake//lib/rake/application.rb#426 def standard_rake_options; end # The directory path containing the system wide rakefiles. # - # source://rake//lib/rake/application.rb#727 + # source://rake//lib/rake/application.rb#751 def system_dir; end # Number of columns on the terminal @@ -404,17 +404,17 @@ class Rake::Application # source://rake//lib/rake/application.rb#33 def terminal_columns=(_arg0); end - # source://rake//lib/rake/application.rb#337 + # source://rake//lib/rake/application.rb#361 def terminal_width; end # Return the thread pool used for multithreaded processing. # - # source://rake//lib/rake/application.rb#150 + # source://rake//lib/rake/application.rb#172 def thread_pool; end # Run the top level tasks of a Rake application. # - # source://rake//lib/rake/application.rb#109 + # source://rake//lib/rake/application.rb#131 def top_level; end # List of the top level task names (task names from the command line). @@ -422,10 +422,10 @@ class Rake::Application # source://rake//lib/rake/application.rb#36 def top_level_tasks; end - # source://rake//lib/rake/application.rb#388 + # source://rake//lib/rake/application.rb#412 def trace(*strings); end - # source://rake//lib/rake/application.rb#370 + # source://rake//lib/rake/application.rb#394 def truncate(string, width); end # We will truncate output if we are outputting to a TTY or if we've been @@ -433,7 +433,7 @@ class Rake::Application # # @return [Boolean] # - # source://rake//lib/rake/application.rb#293 + # source://rake//lib/rake/application.rb#317 def truncate_output?; end # Override the detected TTY output state (mostly for testing) @@ -445,41 +445,44 @@ class Rake::Application # # @return [Boolean] # - # source://rake//lib/rake/application.rb#287 + # source://rake//lib/rake/application.rb#311 def tty_output?; end # @return [Boolean] # - # source://rake//lib/rake/application.rb#361 + # source://rake//lib/rake/application.rb#385 def unix?; end # @return [Boolean] # - # source://rake//lib/rake/application.rb#366 + # source://rake//lib/rake/application.rb#390 def windows?; end private - # source://rake//lib/rake/application.rb#721 + # source://rake//lib/rake/application.rb#745 def glob(path, &block); end # Does the exception have a task invocation chain? # # @return [Boolean] # - # source://rake//lib/rake/application.rb#267 + # source://rake//lib/rake/application.rb#291 def has_chain?(exception); end - # source://rake//lib/rake/application.rb#620 + # source://rake//lib/rake/application.rb#102 + def load_debug_at_stop_feature; end + + # source://rake//lib/rake/application.rb#644 def select_tasks_to_show(options, show_tasks, value); end - # source://rake//lib/rake/application.rb#627 + # source://rake//lib/rake/application.rb#651 def select_trace_output(options, trace_option, value); end - # source://rake//lib/rake/application.rb#393 + # source://rake//lib/rake/application.rb#417 def sort_options(options); end - # source://rake//lib/rake/application.rb#744 + # source://rake//lib/rake/application.rb#768 def standard_system_dir; end end @@ -591,7 +594,7 @@ module Rake::DSL # # Example: # desc "Run the Unit Tests" - # task test: [:build] + # task test: [:build] do # # ... run tests # end # @@ -745,7 +748,7 @@ module Rake::DSL # source://rake//lib/rake/file_utils_ext.rb#34 def rmtree(*args, **options, &block); end - # source://rake//lib/rake/file_utils.rb#100 + # source://rake//lib/rake/file_utils.rb#98 def ruby(*args, **options, &block); end # Declare a rule for auto-tasks. @@ -758,7 +761,7 @@ module Rake::DSL # source://rake//lib/rake/dsl_definition.rb#151 def rule(*args, &block); end - # source://rake//lib/rake/file_utils.rb#112 + # source://rake//lib/rake/file_utils.rb#110 def safe_ln(*args, **options); end # source://rake//lib/rake/file_utils_ext.rb#34 @@ -767,7 +770,7 @@ module Rake::DSL # source://rake//lib/rake/file_utils.rb#43 def sh(*cmd, &block); end - # source://rake//lib/rake/file_utils.rb#128 + # source://rake//lib/rake/file_utils.rb#126 def split_all(path); end # source://rake//lib/rake/file_utils_ext.rb#34 @@ -1580,7 +1583,7 @@ class Rake::FileTask < ::Rake::Task # Time stamp for file task. # - # source://rake//lib/rake/file_task.rb#21 + # source://rake//lib/rake/file_task.rb#25 def timestamp; end private @@ -1589,14 +1592,14 @@ class Rake::FileTask < ::Rake::Task # # @return [Boolean] # - # source://rake//lib/rake/file_task.rb#32 + # source://rake//lib/rake/file_task.rb#36 def out_of_date?(stamp); end class << self # Apply the scope to the task name according to the rules for this kind # of task. File based tasks ignore the scope when creating the name. # - # source://rake//lib/rake/file_task.rb#49 + # source://rake//lib/rake/file_task.rb#53 def scope_name(scope, task_name); end end end @@ -2854,14 +2857,14 @@ class Rake::ThreadHistoryDisplay def threads; end end -# source://rake//lib/rake/thread_pool.rb#7 +# source://rake//lib/rake/thread_pool.rb#8 class Rake::ThreadPool # Creates a ThreadPool object. The +thread_count+ parameter is the size # of the pool. # # @return [ThreadPool] a new instance of ThreadPool # - # source://rake//lib/rake/thread_pool.rb#11 + # source://rake//lib/rake/thread_pool.rb#12 def initialize(thread_count); end # Creates a future executed by the +ThreadPool+. diff --git a/sorbet/rbi/gems/rbi@0.0.16.rbi b/sorbet/rbi/gems/rbi@0.0.16.rbi deleted file mode 100644 index d777547f..00000000 --- a/sorbet/rbi/gems/rbi@0.0.16.rbi +++ /dev/null @@ -1,3008 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rbi` gem. -# Please instead update this file by running `bin/tapioca gem rbi`. - -# source://rbi//lib/rbi.rb#7 -module RBI; end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/parser.rb#129 -class RBI::ASTVisitor - abstract! - - # source://sorbet-runtime/0.5.10761/lib/types/private/abstract/declare.rb#37 - def initialize(*args, **_arg1, &blk); end - - # @abstract - # - # source://rbi//lib/rbi/parser.rb#141 - sig { abstract.params(node: T.nilable(::AST::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/parser.rb#136 - sig { params(nodes: T::Array[::AST::Node]).void } - def visit_all(nodes); end - - private - - # source://rbi//lib/rbi/parser.rb#151 - sig { params(node: ::AST::Node).returns(::String) } - def parse_expr(node); end - - # source://rbi//lib/rbi/parser.rb#146 - sig { params(node: ::AST::Node).returns(::String) } - def parse_name(node); end -end - -# source://rbi//lib/rbi/model.rb#960 -class RBI::Arg < ::RBI::Node - # source://rbi//lib/rbi/model.rb#972 - sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(value, loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#978 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#611 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#983 - sig { returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#964 - sig { returns(::String) } - def value; end -end - -# Attributes -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#341 -class RBI::Attr < ::RBI::NodeWithComments - include ::RBI::Indexable - - abstract! - - # source://rbi//lib/rbi/model.rb#366 - sig do - params( - name: ::Symbol, - names: T::Array[::Symbol], - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).void - end - def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#346 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#406 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#374 - sig { abstract.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/index.rb#109 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#413 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#348 - sig { returns(T::Array[::Symbol]) } - def names; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#348 - def names=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#373 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/model.rb#354 - sig { returns(T::Array[::RBI::Sig]) } - def sigs; end - - # source://rbi//lib/rbi/model.rb#351 - sig { returns(::RBI::Visibility) } - def visibility; end - - # @return [Visibility] - # - # source://rbi//lib/rbi/model.rb#351 - def visibility=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#377 -class RBI::AttrAccessor < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#391 - sig do - params( - name: ::Symbol, - names: ::Symbol, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void) - ).void - end - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#444 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#397 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#403 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#409 -class RBI::AttrReader < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#423 - sig do - params( - name: ::Symbol, - names: ::Symbol, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void) - ).void - end - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#426 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#429 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#435 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#441 -class RBI::AttrWriter < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#455 - sig do - params( - name: ::Symbol, - names: ::Symbol, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void) - ).void - end - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#435 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#461 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#467 - sig { override.returns(::String) } - def to_s; end -end - -# An arbitrary blank line that can be added both in trees and comments -# -# source://rbi//lib/rbi/model.rb#70 -class RBI::BlankLine < ::RBI::Comment - # source://rbi//lib/rbi/model.rb#74 - sig { params(loc: T.nilable(::RBI::Loc)).void } - def initialize(loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#215 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end -end - -# source://rbi//lib/rbi/model.rb#733 -class RBI::BlockParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#744 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#755 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#541 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#546 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#750 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#213 -class RBI::Class < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#231 - sig do - params( - name: ::String, - superclass_name: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Class).void) - ).void - end - def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#370 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#239 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#217 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#217 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#282 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end - - # source://rbi//lib/rbi/model.rb#220 - sig { returns(T.nilable(::String)) } - def superclass_name; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#220 - def superclass_name=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#50 -class RBI::Comment < ::RBI::Node - # source://rbi//lib/rbi/model.rb#57 - sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(text, loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#63 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#195 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#54 - sig { returns(::String) } - def text; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#54 - def text=(_arg0); end -end - -# A tree showing incompatibles nodes -# -# Is rendered as a merge conflict between `left` and` right`: -# ~~~rb -# class Foo -# <<<<<<< left -# def m1; end -# def m2(a); end -# ======= -# def m1(a); end -# def m2; end -# >>>>>>> right -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#578 -class RBI::ConflictTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#585 - sig { params(left_name: ::String, right_name: ::String).void } - def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#596 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#582 - sig { returns(::RBI::Tree) } - def left; end - - # @return [Tree] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#582 - def right; end -end - -# Consts -# -# source://rbi//lib/rbi/model.rb#305 -class RBI::Const < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#320 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Const).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/printer.rb#333 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#397 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#328 - sig { returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#99 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#309 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#334 - sig { override.returns(::String) } - def to_s; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#309 - def value; end -end - -# source://rbi//lib/rbi/parser.rb#600 -class RBI::ConstBuilder < ::RBI::ASTVisitor - # source://rbi//lib/rbi/parser.rb#615 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/parser.rb#612 - sig { returns(T::Array[::String]) } - def names; end - - # @return [Array] - # - # source://rbi//lib/rbi/parser.rb#612 - def names=(_arg0); end - - # source://rbi//lib/rbi/parser.rb#621 - sig { override.params(node: T.nilable(::AST::Node)).void } - def visit(node); end - - class << self - # source://rbi//lib/rbi/parser.rb#604 - sig { params(node: T.nilable(::AST::Node)).returns(T.nilable(::String)) } - def visit(node); end - end -end - -# source://rbi//lib/rbi.rb#8 -class RBI::Error < ::StandardError; end - -# source://rbi//lib/rbi/model.rb#808 -class RBI::Extend < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#820 - sig do - params( - name: ::String, - names: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Extend).void) - ).void - end - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#492 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#139 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#826 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#133 -class RBI::File - # source://rbi//lib/rbi/model.rb#152 - sig do - params( - strictness: T.nilable(::String), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(file: ::RBI::File).void) - ).void - end - def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#160 - sig { params(node: ::RBI::Node).void } - def <<(node); end - - # source://rbi//lib/rbi/printer.rb#104 - sig { params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#143 - sig { returns(T::Array[::RBI::Comment]) } - def comments; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#143 - def comments=(_arg0); end - - # source://rbi//lib/rbi/model.rb#165 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi//lib/rbi/printer.rb#128 - sig do - params( - out: T.any(::IO, ::StringIO), - indent: ::Integer, - print_locs: T::Boolean, - max_line_length: T.nilable(::Integer) - ).void - end - def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#137 - sig { returns(::RBI::Tree) } - def root; end - - # @return [Tree] - # - # source://rbi//lib/rbi/model.rb#137 - def root=(_arg0); end - - # source://rbi//lib/rbi/model.rb#140 - sig { returns(T.nilable(::String)) } - def strictness; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#140 - def strictness=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#134 - sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } - def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end -end - -# source://rbi//lib/rbi/formatter.rb#5 -class RBI::Formatter - # source://rbi//lib/rbi/formatter.rb#24 - sig do - params( - add_sig_templates: T::Boolean, - group_nodes: T::Boolean, - max_line_length: T.nilable(::Integer), - nest_singleton_methods: T::Boolean, - nest_non_public_methods: T::Boolean, - sort_nodes: T::Boolean - ).void - end - def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end - - # source://rbi//lib/rbi/formatter.rb#9 - sig { returns(T::Boolean) } - def add_sig_templates; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def add_sig_templates=(_arg0); end - - # source://rbi//lib/rbi/formatter.rb#53 - sig { params(file: ::RBI::File).void } - def format_file(file); end - - # source://rbi//lib/rbi/formatter.rb#58 - sig { params(tree: ::RBI::Tree).void } - def format_tree(tree); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def group_nodes; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def group_nodes=(_arg0); end - - # source://rbi//lib/rbi/formatter.rb#12 - sig { returns(T.nilable(::Integer)) } - def max_line_length; end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/formatter.rb#12 - def max_line_length=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def nest_non_public_methods; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def nest_non_public_methods=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def nest_singleton_methods; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def nest_singleton_methods=(_arg0); end - - # source://rbi//lib/rbi/formatter.rb#41 - sig { params(file: ::RBI::File).returns(::String) } - def print_file(file); end - - # source://rbi//lib/rbi/formatter.rb#47 - sig { params(tree: ::RBI::Tree).returns(::String) } - def print_tree(tree); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def sort_nodes; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/formatter.rb#9 - def sort_nodes=(_arg0); end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#88 -class RBI::Group < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/group_nodes.rb#95 - sig { params(kind: ::RBI::Group::Kind).void } - def initialize(kind); end - - # source://rbi//lib/rbi/printer.rb#836 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#92 - sig { returns(::RBI::Group::Kind) } - def kind; end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#100 -class RBI::Group::Kind < ::T::Enum - enums do - Mixins = new - RequiredAncestors = new - Helpers = new - TypeMembers = new - MixesInClassMethods = new - Sends = new - Attrs = new - TStructFields = new - TEnums = new - Inits = new - Methods = new - SingletonClasses = new - Consts = new - end -end - -# Sorbet's misc. -# -# source://rbi//lib/rbi/model.rb#1285 -class RBI::Helper < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1299 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Helper).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/printer.rb#823 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#510 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#169 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1289 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1306 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#785 -class RBI::Include < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#797 - sig do - params( - name: ::String, - names: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Include).void) - ).void - end - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#483 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#129 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#803 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/index.rb#5 -class RBI::Index < ::RBI::Visitor - # source://rbi//lib/rbi/index.rb#17 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/index.rb#28 - sig { params(id: ::String).returns(T::Array[::RBI::Node]) } - def [](id); end - - # source://rbi//lib/rbi/index.rb#33 - sig { params(nodes: ::RBI::Node).void } - def index(*nodes); end - - # source://rbi//lib/rbi/index.rb#23 - sig { returns(T::Array[::String]) } - def keys; end - - # source://rbi//lib/rbi/index.rb#38 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/index.rb#55 - sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } - def index_node(node); end - - class << self - # source://rbi//lib/rbi/index.rb#10 - sig { params(node: ::RBI::Node).returns(::RBI::Index) } - def index(*node); end - end -end - -# A Node that can be refered to by a unique ID inside an index -# -# @abstract Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/index.rb#70 -module RBI::Indexable - interface! - - # Unique IDs that refer to this node. - # - # Some nodes can have multiple ids, for example an attribute accessor matches the ID of the - # getter and the setter. - # - # @abstract - # - # source://rbi//lib/rbi/index.rb#81 - sig { abstract.returns(T::Array[::String]) } - def index_ids; end -end - -# source://rbi//lib/rbi/model.rb#988 -class RBI::KwArg < ::RBI::Arg - # source://rbi//lib/rbi/model.rb#1001 - sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(keyword, value, loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#1007 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#620 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#992 - sig { returns(::String) } - def keyword; end - - # source://rbi//lib/rbi/model.rb#1012 - sig { returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#674 -class RBI::KwOptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#689 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#701 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#511 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#516 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#696 - sig { override.returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#678 - sig { returns(::String) } - def value; end -end - -# source://rbi//lib/rbi/model.rb#647 -class RBI::KwParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#658 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::KwParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#669 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#496 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#501 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#664 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#706 -class RBI::KwRestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#717 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#728 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#526 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#531 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#723 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/loc.rb#5 -class RBI::Loc - # source://rbi//lib/rbi/loc.rb#23 - sig do - params( - file: T.nilable(::String), - begin_line: T.nilable(::Integer), - end_line: T.nilable(::Integer), - begin_column: T.nilable(::Integer), - end_column: T.nilable(::Integer) - ).void - end - def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/loc.rb#12 - def begin_column; end - - # source://rbi//lib/rbi/loc.rb#12 - sig { returns(T.nilable(::Integer)) } - def begin_line; end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/loc.rb#12 - def end_column; end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/loc.rb#12 - def end_line; end - - # source://rbi//lib/rbi/loc.rb#9 - sig { returns(T.nilable(::String)) } - def file; end - - # source://rbi//lib/rbi/loc.rb#37 - sig { returns(T.nilable(::String)) } - def source; end - - # source://rbi//lib/rbi/loc.rb#32 - sig { returns(::String) } - def to_s; end - - class << self - # source://rbi//lib/rbi/parser.rb#707 - sig { params(file: ::String, ast_loc: T.any(::Parser::Source::Map, ::Parser::Source::Range)).returns(::RBI::Loc) } - def from_ast_loc(file, ast_loc); end - end -end - -# A tree that _might_ contain conflicts -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#324 -class RBI::MergeTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#338 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - conflicts: T::Array[::RBI::Rewriters::Merge::Conflict], - block: T.nilable(T.proc.params(node: ::RBI::Tree).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#328 - sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } - def conflicts; end -end - -# Methods and args -# -# source://rbi//lib/rbi/model.rb#475 -class RBI::Method < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#505 - sig do - params( - name: ::String, - params: T::Array[::RBI::Param], - is_singleton: T::Boolean, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Method).void) - ).void - end - def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#525 - sig { params(param: ::RBI::Param).void } - def <<(param); end - - # source://rbi//lib/rbi/printer.rb#382 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#453 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#530 - sig { returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#119 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/printer.rb#435 - sig { returns(T::Boolean) } - def inline_params?; end - - # source://rbi//lib/rbi/model.rb#485 - sig { returns(T::Boolean) } - def is_singleton; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#485 - def is_singleton=(_arg0); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#461 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#479 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#479 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#430 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/model.rb#482 - sig { returns(T::Array[::RBI::Param]) } - def params; end - - # source://rbi//lib/rbi/model.rb#491 - sig { returns(T::Array[::RBI::Sig]) } - def sigs; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#491 - def sigs=(_arg0); end - - # source://rbi//lib/rbi/model.rb#539 - sig { override.returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#488 - sig { returns(::RBI::Visibility) } - def visibility; end - - # @return [Visibility] - # - # source://rbi//lib/rbi/model.rb#488 - def visibility=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#1345 -class RBI::MixesInClassMethods < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1357 - sig do - params( - name: ::String, - names: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void) - ).void - end - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#501 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#149 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1363 - sig { override.returns(::String) } - def to_s; end -end - -# Mixins -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#762 -class RBI::Mixin < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#779 - sig do - params( - name: ::String, - names: T::Array[::String], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).void - end - def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#556 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#474 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#769 - sig { returns(T::Array[::String]) } - def names; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#769 - def names=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#186 -class RBI::Module < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#200 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Module).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#379 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#207 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#190 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#190 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#268 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#5 -class RBI::Node - abstract! - - # source://rbi//lib/rbi/model.rb#18 - sig { params(loc: T.nilable(::RBI::Loc)).void } - def initialize(loc: T.unsafe(nil)); end - - # @abstract - # - # source://rbi//lib/rbi/printer.rb#145 - sig { abstract.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # Can `self` and `_other` be merged into a single definition? - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#283 - sig { params(_other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(_other); end - - # source://rbi//lib/rbi/model.rb#24 - sig { void } - def detach; end - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#48 - sig { returns(::RBI::Group::Kind) } - def group_kind; end - - # source://rbi//lib/rbi/model.rb#15 - sig { returns(T.nilable(::RBI::Loc)) } - def loc; end - - # @return [Loc, nil] - # - # source://rbi//lib/rbi/model.rb#15 - def loc=(_arg0); end - - # Merge `self` and `other` into a single definition - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#289 - sig { params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/printer.rb#177 - sig { returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#292 - sig { returns(T.nilable(::RBI::ConflictTree)) } - def parent_conflict_tree; end - - # source://rbi//lib/rbi/model.rb#43 - sig { returns(T.nilable(::RBI::Scope)) } - def parent_scope; end - - # source://rbi//lib/rbi/model.rb#12 - sig { returns(T.nilable(::RBI::Tree)) } - def parent_tree; end - - # @return [Tree, nil] - # - # source://rbi//lib/rbi/model.rb#12 - def parent_tree=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#155 - sig do - params( - out: T.any(::IO, ::StringIO), - indent: ::Integer, - print_locs: T::Boolean, - max_line_length: T.nilable(::Integer) - ).void - end - def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#168 - sig { params(v: ::RBI::Printer).void } - def print_blank_line_before(v); end - - # source://rbi//lib/rbi/model.rb#32 - sig { params(node: ::RBI::Node).void } - def replace(node); end - - # source://rbi//lib/rbi/printer.rb#161 - sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } - def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#79 -class RBI::NodeWithComments < ::RBI::Node - abstract! - - # source://rbi//lib/rbi/model.rb#89 - sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#95 - sig { returns(T::Array[::String]) } - def annotations; end - - # source://rbi//lib/rbi/model.rb#86 - sig { returns(T::Array[::RBI::Comment]) } - def comments; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#86 - def comments=(_arg0); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#306 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/printer.rb#186 - sig { override.returns(T::Boolean) } - def oneline?; end -end - -# source://rbi//lib/rbi/model.rb#593 -class RBI::OptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#608 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::OptParam).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#615 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#466 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#471 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#597 - sig { returns(::String) } - def value; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#544 -class RBI::Param < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#560 - sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#444 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#457 - sig { returns(T::Array[::String]) } - def comments_lines; end - - # source://rbi//lib/rbi/model.rb#551 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/printer.rb#449 - sig { params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#566 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/parser.rb#7 -class RBI::ParseError < ::StandardError - # source://rbi//lib/rbi/parser.rb#14 - sig { params(message: ::String, location: ::RBI::Loc).void } - def initialize(message, location); end - - # source://rbi//lib/rbi/parser.rb#11 - sig { returns(::RBI::Loc) } - def location; end -end - -# source://rbi//lib/rbi/parser.rb#53 -class RBI::Parser - # source://rbi//lib/rbi/parser.rb#64 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/parser.rb#97 - sig { params(path: ::String).returns(::RBI::Tree) } - def parse_file(path); end - - # source://rbi//lib/rbi/parser.rb#86 - sig { params(string: ::String).returns(::RBI::Tree) } - def parse_string(string); end - - private - - # source://rbi//lib/rbi/parser.rb#104 - sig { params(content: ::String, file: ::String).returns(::RBI::Tree) } - def parse(content, file:); end - - class << self - # source://rbi//lib/rbi/parser.rb#75 - sig { params(path: ::String).returns(::RBI::Tree) } - def parse_file(path); end - - # source://rbi//lib/rbi/parser.rb#80 - sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } - def parse_files(paths); end - - # source://rbi//lib/rbi/parser.rb#70 - sig { params(string: ::String).returns(::RBI::Tree) } - def parse_string(string); end - - # source://rbi//lib/rbi/parser.rb#91 - sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } - def parse_strings(strings); end - end -end - -# source://rbi//lib/rbi/printer.rb#5 -class RBI::Printer < ::RBI::Visitor - # source://rbi//lib/rbi/printer.rb#28 - sig do - params( - out: T.any(::IO, ::StringIO), - indent: ::Integer, - print_locs: T::Boolean, - max_line_length: T.nilable(::Integer) - ).void - end - def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#15 - sig { returns(::Integer) } - def current_indent; end - - # source://rbi//lib/rbi/printer.rb#46 - sig { void } - def dedent; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#9 - def in_visibility_group; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#9 - def in_visibility_group=(_arg0); end - - # Printing - # - # source://rbi//lib/rbi/printer.rb#41 - sig { void } - def indent; end - - # source://rbi//lib/rbi/printer.rb#18 - sig { returns(T.nilable(::Integer)) } - def max_line_length; end - - # source://rbi//lib/rbi/printer.rb#12 - sig { returns(T.nilable(::RBI::Node)) } - def previous_node; end - - # Print a string without indentation nor `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#52 - sig { params(string: ::String).void } - def print(string); end - - # source://rbi//lib/rbi/printer.rb#9 - sig { returns(T::Boolean) } - def print_locs; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#9 - def print_locs=(_arg0); end - - # Print a string with indentation and `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#72 - sig { params(string: ::String).void } - def printl(string); end - - # Print a string without indentation but with a `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#58 - sig { params(string: T.nilable(::String)).void } - def printn(string = T.unsafe(nil)); end - - # Print a string with indentation but without a `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#65 - sig { params(string: T.nilable(::String)).void } - def printt(string = T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#83 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/printer.rb#89 - sig { override.params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - # source://rbi//lib/rbi/printer.rb#78 - sig { params(file: ::RBI::File).void } - def visit_file(file); end -end - -# source://rbi//lib/rbi/model.rb#901 -class RBI::Private < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#911 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Private).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#885 -class RBI::Protected < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#895 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Protected).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#869 -class RBI::Public < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#879 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Public).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#571 -class RBI::ReqParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#582 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#588 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end -end - -# source://rbi//lib/rbi/model.rb#1368 -class RBI::RequiresAncestor < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1381 - sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#868 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/index.rb#159 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1372 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1387 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#620 -class RBI::RestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#631 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::RestParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#642 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#481 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#486 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#637 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5 -module RBI::Rewriters; end - -# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6 -class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#10 - sig { params(with_todo_comment: T::Boolean).void } - def initialize(with_todo_comment: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#16 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#30 - sig { params(attr: ::RBI::Attr).void } - def add_attr_sig(attr); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#45 - sig { params(method: ::RBI::Method).void } - def add_method_sig(method); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#56 - sig { params(node: ::RBI::NodeWithComments).void } - def add_todo_comment(node); end -end - -# source://rbi//lib/rbi/rewriters/annotate.rb#6 -class RBI::Rewriters::Annotate < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/annotate.rb#10 - sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } - def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/annotate.rb#18 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/annotate.rb#31 - sig { params(node: ::RBI::NodeWithComments).void } - def annotate_node(node); end - - # source://rbi//lib/rbi/rewriters/annotate.rb#37 - sig { params(node: ::RBI::Node).returns(T::Boolean) } - def root?(node); end -end - -# source://rbi//lib/rbi/rewriters/deannotate.rb#6 -class RBI::Rewriters::Deannotate < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/deannotate.rb#10 - sig { params(annotation: ::String).void } - def initialize(annotation); end - - # source://rbi//lib/rbi/rewriters/deannotate.rb#16 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/deannotate.rb#27 - sig { params(node: ::RBI::NodeWithComments).void } - def deannotate_node(node); end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#6 -class RBI::Rewriters::GroupNodes < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/group_nodes.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# Merge two RBI trees together -# -# Be this `Tree`: -# ~~~rb -# class Foo -# attr_accessor :a -# def m; end -# C = 10 -# end -# ~~~ -# -# Merged with this one: -# ~~~rb -# class Foo -# attr_reader :a -# def m(x); end -# C = 10 -# end -# ~~~ -# -# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`: -# ~~~rb -# class Foo -# <<<<<<< left -# attr_accessor :a -# def m; end -# ======= -# attr_reader :a -# def m(x); end -# >>>>>>> right -# C = 10 -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#39 -class RBI::Rewriters::Merge - # source://rbi//lib/rbi/rewriters/merge_trees.rb#66 - sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void } - def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#75 - sig { params(tree: ::RBI::Tree).void } - def merge(tree); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#63 - sig { returns(::RBI::MergeTree) } - def tree; end - - class << self - # source://rbi//lib/rbi/rewriters/merge_trees.rb#51 - sig do - params( - left: ::RBI::Tree, - right: ::RBI::Tree, - left_name: ::String, - right_name: ::String, - keep: ::RBI::Rewriters::Merge::Keep - ).returns(::RBI::MergeTree) - end - def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - end -end - -# Used for logging / error displaying purpose -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#82 -class RBI::Rewriters::Merge::Conflict < ::T::Struct - const :left, ::RBI::Node - const :right, ::RBI::Node - const :left_name, ::String - const :right_name, ::String - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#91 - sig { returns(::String) } - def to_s; end - - class << self - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# Merge adjacent conflict trees -# -# Transform this: -# ~~~rb -# class Foo -# <<<<<<< left -# def m1; end -# ======= -# def m1(a); end -# >>>>>>> right -# <<<<<<< left -# def m2(a); end -# ======= -# def m2; end -# >>>>>>> right -# end -# ~~~ -# -# Into this: -# ~~~rb -# class Foo -# <<<<<<< left -# def m1; end -# def m2(a); end -# ======= -# def m1(a); end -# def m2; end -# >>>>>>> right -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#241 -class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/merge_trees.rb#243 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#248 - sig { override.params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - private - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#269 - sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } - def merge_conflict_trees(left, right); end -end - -# source://rbi//lib/rbi/rewriters/merge_trees.rb#42 -class RBI::Rewriters::Merge::Keep < ::T::Enum - enums do - NONE = new - LEFT = new - RIGHT = new - end -end - -# source://rbi//lib/rbi/rewriters/merge_trees.rb#96 -class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/merge_trees.rb#103 - sig do - params( - output: ::RBI::Tree, - left_name: ::String, - right_name: ::String, - keep: ::RBI::Rewriters::Merge::Keep - ).void - end - def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#100 - sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } - def conflicts; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#115 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#164 - sig { returns(::RBI::Tree) } - def current_scope; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#181 - sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } - def make_conflict_scope(left, right); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#188 - sig { params(left: ::RBI::Node, right: ::RBI::Node).void } - def make_conflict_tree(left, right); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#169 - sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } - def previous_definition(node); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#200 - sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) } - def replace_scope_header(left, right); end -end - -# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#6 -class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6 -class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# Remove all definitions existing in the index from the current tree -# -# Let's create an `Index` from two different `Tree`s: -# ~~~rb -# tree1 = Parse.parse_string(<<~RBI) -# class Foo -# def foo; end -# end -# RBI -# -# tree2 = Parse.parse_string(<<~RBI) -# FOO = 10 -# RBI -# -# index = Index.index(tree1, tree2) -# ~~~ -# -# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean: -# ~~~rb -# tree_to_clean = Parser.parse_string(<<~RBI) -# class Foo -# def foo; end -# def bar; end -# end -# FOO = 10 -# BAR = 42 -# RBI -# -# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index) -# -# assert_equal(<<~RBI, cleaned_tree) -# class Foo -# def bar; end -# end -# BAR = 42 -# RBI -# -# assert_equal(<<~OPERATIONS, operations.join("\n")) -# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16) -# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8) -# OPERATIONS -# ~~~ -# -# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48 -class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#67 - sig { params(index: ::RBI::Index).void } - def initialize(index); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#64 - sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } - def operations; end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#79 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#74 - sig { params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - private - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#107 - sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } - def can_delete_node?(node, previous); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#125 - sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } - def delete_node(node, previous); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#98 - sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } - def previous_definition_for(node); end - - class << self - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#57 - sig do - params( - tree: ::RBI::Tree, - index: ::RBI::Index - ).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]]) - end - def remove(tree, index); end - end -end - -# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#130 -class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct - const :deleted_node, ::RBI::Node - const :duplicate_of, ::RBI::Node - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#137 - sig { returns(::String) } - def to_s; end - - class << self - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://rbi//lib/rbi/rewriters/sort_nodes.rb#6 -class RBI::Rewriters::SortNodes < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#61 - sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } - def group_rank(kind); end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#82 - sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } - def node_name(node); end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#33 - sig { params(node: ::RBI::Node).returns(::Integer) } - def node_rank(node); end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#94 - sig { params(node: ::RBI::Node).void } - def sort_node_names!(node); end -end - -# Scopes -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#172 -class RBI::Scope < ::RBI::Tree - include ::RBI::Indexable - - abstract! - - # source://sorbet-runtime/0.5.10761/lib/types/private/abstract/declare.rb#37 - def initialize(*args, **_arg1, &blk); end - - # source://rbi//lib/rbi/printer.rb#240 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # Duplicate `self` scope without its body - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#350 - sig { returns(T.self_type) } - def dup_empty; end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#178 - sig { abstract.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#89 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/printer.rb#254 - sig { params(v: ::RBI::Printer).void } - def print_body(v); end - - # @abstract - # - # source://rbi//lib/rbi/printer.rb#251 - sig { abstract.params(v: ::RBI::Printer).void } - def print_header(v); end - - # source://rbi//lib/rbi/model.rb#181 - sig { override.returns(::String) } - def to_s; end -end - -# A conflict between two scope headers -# -# Is rendered as a merge conflict between `left` and` right` for scope definitions: -# ~~~rb -# <<<<<<< left -# class Foo -# ======= -# module Foo -# >>>>>>> right -# def m1; end -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#617 -class RBI::ScopeConflict < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#631 - sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } - def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#640 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#621 - sig { returns(::RBI::Scope) } - def left; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#656 - sig { override.returns(T::Boolean) } - def oneline?; end - - # @return [Scope] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#621 - def right; end -end - -# Sends -# -# source://rbi//lib/rbi/model.rb#919 -class RBI::Send < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#937 - sig do - params( - method: ::String, - args: T::Array[::RBI::Arg], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Send).void) - ).void - end - def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#945 - sig { params(arg: ::RBI::Arg).void } - def <<(arg); end - - # source://rbi//lib/rbi/model.rb#950 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#590 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#926 - sig { returns(T::Array[::RBI::Arg]) } - def args; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#519 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#179 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#923 - sig { returns(::String) } - def method; end - - # source://rbi//lib/rbi/model.rb#955 - sig { returns(::String) } - def to_s; end -end - -# Sorbet's sigs -# -# source://rbi//lib/rbi/model.rb#1019 -class RBI::Sig < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1051 - sig do - params( - params: T::Array[::RBI::SigParam], - return_type: T.nilable(::String), - is_abstract: T::Boolean, - is_override: T::Boolean, - is_overridable: T::Boolean, - is_final: T::Boolean, - type_params: T::Array[::String], - checked: T.nilable(::Symbol), - loc: T.nilable(::RBI::Loc), - block: T.nilable(T.proc.params(node: ::RBI::Sig).void) - ).void - end - def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1076 - sig { params(param: ::RBI::SigParam).void } - def <<(param); end - - # source://rbi//lib/rbi/model.rb#1081 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#631 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1035 - sig { returns(T.nilable(::Symbol)) } - def checked; end - - # @return [Symbol, nil] - # - # source://rbi//lib/rbi/model.rb#1035 - def checked=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#654 - sig { returns(T::Boolean) } - def inline_params?; end - - # source://rbi//lib/rbi/model.rb#1029 - sig { returns(T::Boolean) } - def is_abstract; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1029 - def is_abstract=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1029 - def is_final; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1029 - def is_final=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1029 - def is_overridable; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1029 - def is_overridable=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1029 - def is_override; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1029 - def is_override=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#649 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/model.rb#1023 - sig { returns(T::Array[::RBI::SigParam]) } - def params; end - - # source://rbi//lib/rbi/model.rb#1026 - sig { returns(T.nilable(::String)) } - def return_type; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#1026 - def return_type=(_arg0); end - - # source://rbi//lib/rbi/model.rb#1032 - sig { returns(T::Array[::String]) } - def type_params; end - - private - - # source://rbi//lib/rbi/printer.rb#696 - sig { params(v: ::RBI::Printer).void } - def print_as_block(v); end - - # source://rbi//lib/rbi/printer.rb#672 - sig { params(v: ::RBI::Printer).void } - def print_as_line(v); end - - # source://rbi//lib/rbi/printer.rb#661 - sig { returns(T::Array[::String]) } - def sig_modifiers; end -end - -# source://rbi//lib/rbi/parser.rb#635 -class RBI::SigBuilder < ::RBI::ASTVisitor - # source://rbi//lib/rbi/parser.rb#649 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/parser.rb#646 - sig { returns(::RBI::Sig) } - def current; end - - # @return [Sig] - # - # source://rbi//lib/rbi/parser.rb#646 - def current=(_arg0); end - - # source://rbi//lib/rbi/parser.rb#655 - sig { override.params(node: T.nilable(::AST::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/parser.rb#664 - sig { params(node: ::AST::Node).void } - def visit_send(node); end - - class << self - # source://rbi//lib/rbi/parser.rb#639 - sig { params(node: ::AST::Node).returns(::RBI::Sig) } - def build(node); end - end -end - -# source://rbi//lib/rbi/model.rb#1089 -class RBI::SigParam < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1104 - sig do - params( - name: ::String, - type: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::SigParam).void) - ).void - end - def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1112 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#749 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#762 - sig { returns(T::Array[::String]) } - def comments_lines; end - - # source://rbi//lib/rbi/model.rb#1093 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/printer.rb#754 - sig { params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1093 - def type; end -end - -# source://rbi//lib/rbi/model.rb#245 -class RBI::SingletonClass < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#255 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#261 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/printer.rb#319 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end -end - -# source://rbi//lib/rbi/model.rb#266 -class RBI::Struct < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#288 - sig do - params( - name: ::String, - members: T::Array[::Symbol], - keyword_init: T::Boolean, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(struct: ::RBI::Struct).void) - ).void - end - def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#388 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#297 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#276 - sig { returns(T::Boolean) } - def keyword_init; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#276 - def keyword_init=(_arg0); end - - # source://rbi//lib/rbi/model.rb#273 - sig { returns(T::Array[::Symbol]) } - def members; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#273 - def members=(_arg0); end - - # source://rbi//lib/rbi/model.rb#270 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#270 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#298 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end -end - -# Sorbet's T::Enum -# -# source://rbi//lib/rbi/model.rb#1230 -class RBI::TEnum < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1241 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(klass: ::RBI::TEnum).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#1247 -class RBI::TEnumBlock < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1261 - sig do - params( - names: T::Array[::String], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) - ).void - end - def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1273 - sig { params(name: ::String).void } - def <<(name); end - - # source://rbi//lib/rbi/printer.rb#793 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1268 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi//lib/rbi/index.rb#209 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#546 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#1251 - sig { returns(T::Array[::String]) } - def names; end - - # source://rbi//lib/rbi/model.rb#1278 - sig { override.returns(::String) } - def to_s; end -end - -# Sorbet's T::Struct -# -# source://rbi//lib/rbi/model.rb#1119 -class RBI::TStruct < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1130 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(klass: ::RBI::TStruct).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#1168 -class RBI::TStructConst < ::RBI::TStructField - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1181 - sig do - params( - name: ::String, - type: ::String, - default: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void) - ).void - end - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#537 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1187 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/index.rb#189 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1193 - sig { override.returns(::String) } - def to_s; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#1136 -class RBI::TStructField < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#1157 - sig do - params( - name: ::String, - type: ::String, - default: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).void - end - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#771 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#528 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1146 - sig { returns(T.nilable(::String)) } - def default; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#1146 - def default=(_arg0); end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#1165 - sig { abstract.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#1143 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1143 - def name=(_arg0); end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1143 - def type; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1143 - def type=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#1198 -class RBI::TStructProp < ::RBI::TStructField - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1211 - sig do - params( - name: ::String, - type: ::String, - default: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void) - ).void - end - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#559 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1217 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/index.rb#199 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1223 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#102 -class RBI::Tree < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#115 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Tree).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#122 - sig { params(node: ::RBI::Node).void } - def <<(node); end - - # source://rbi//lib/rbi/printer.rb#224 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#66 - sig { params(with_todo_comment: T::Boolean).void } - def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/annotate.rb#48 - sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } - def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - - # source://tapioca/0.11.4/lib/tapioca/rbi_ext/model.rb#38 - sig do - params( - name: ::String, - superclass_name: T.nilable(::String), - block: T.nilable(T.proc.params(scope: ::RBI::Scope).void) - ).returns(::RBI::Scope) - end - def create_class(name, superclass_name: T.unsafe(nil), &block); end - - # source://tapioca/0.11.4/lib/tapioca/rbi_ext/model.rb#45 - sig { params(name: ::String, value: ::String).void } - def create_constant(name, value:); end - - # source://tapioca/0.11.4/lib/tapioca/rbi_ext/model.rb#55 - sig { params(name: ::String).void } - def create_extend(name); end - - # source://tapioca/0.11.4/lib/tapioca/rbi_ext/model.rb#50 - sig { params(name: ::String).void } - def create_include(name); end - - # source://tapioca/0.11.4/lib/tapioca/rbi_ext/model.rb#89 - sig do - params( - name: ::String, - parameters: T::Array[::RBI::TypedParam], - return_type: ::String, - class_method: T::Boolean, - visibility: ::RBI::Visibility, - comments: T::Array[::RBI::Comment] - ).void - end - def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://tapioca/0.11.4/lib/tapioca/rbi_ext/model.rb#60 - sig { params(name: ::String).void } - def create_mixes_in_class_methods(name); end - - # source://tapioca/0.11.4/lib/tapioca/rbi_ext/model.rb#25 - sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } - def create_module(name, &block); end - - # source://tapioca/0.11.4/lib/tapioca/rbi_ext/model.rb#9 - sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } - def create_path(constant, &block); end - - # source://tapioca/0.11.4/lib/tapioca/rbi_ext/model.rb#74 - sig do - params( - name: ::String, - type: ::String, - variance: ::Symbol, - fixed: T.nilable(::String), - upper: T.nilable(::String), - lower: T.nilable(::String) - ).void - end - def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/deannotate.rb#40 - sig { params(annotation: ::String).void } - def deannotate!(annotation); end - - # source://rbi//lib/rbi/model.rb#128 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#38 - sig { void } - def group_nodes!; end - - # source://rbi//lib/rbi/index.rb#64 - sig { returns(::RBI::Index) } - def index; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#318 - sig do - params( - other: ::RBI::Tree, - left_name: ::String, - right_name: ::String, - keep: ::RBI::Rewriters::Merge::Keep - ).returns(::RBI::MergeTree) - end - def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#45 - sig { void } - def nest_non_public_methods!; end - - # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#35 - sig { void } - def nest_singleton_methods!; end - - # source://rbi//lib/rbi/model.rb#106 - sig { returns(T::Array[::RBI::Node]) } - def nodes; end - - # source://rbi//lib/rbi/printer.rb#231 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#107 - sig { void } - def sort_nodes!; end - - private - - # source://tapioca/0.11.4/lib/tapioca/rbi_ext/model.rb#116 - sig { params(node: ::RBI::Node).returns(::RBI::Node) } - def create_node(node); end - - # source://tapioca/0.11.4/lib/tapioca/rbi_ext/model.rb#111 - sig { returns(T::Hash[::String, ::RBI::Node]) } - def nodes_cache; end -end - -# source://rbi//lib/rbi/parser.rb#156 -class RBI::TreeBuilder < ::RBI::ASTVisitor - # source://rbi//lib/rbi/parser.rb#172 - sig do - params( - file: ::String, - comments: T::Array[::Parser::Source::Comment], - nodes_comments_assoc: T::Hash[::Parser::Source::Map, T::Array[::Parser::Source::Comment]] - ).void - end - def initialize(file:, comments: T.unsafe(nil), nodes_comments_assoc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/parser.rb#163 - sig { returns(T.nilable(::AST::Node)) } - def last_node; end - - # source://rbi//lib/rbi/parser.rb#187 - sig { void } - def post_process; end - - # source://rbi//lib/rbi/parser.rb#160 - sig { returns(::RBI::Tree) } - def tree; end - - # source://rbi//lib/rbi/parser.rb#193 - sig { override.params(node: T.nilable(::Object)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/parser.rb#546 - sig { void } - def assoc_dangling_comments; end - - # source://rbi//lib/rbi/parser.rb#527 - sig { returns(::RBI::Tree) } - def current_scope; end - - # source://rbi//lib/rbi/parser.rb#532 - sig { returns(T::Array[::RBI::Sig]) } - def current_sigs; end - - # source://rbi//lib/rbi/parser.rb#539 - sig { returns(T::Array[::RBI::Comment]) } - def current_sigs_comments; end - - # source://rbi//lib/rbi/parser.rb#516 - sig { params(node: ::AST::Node).returns(T::Array[::RBI::Comment]) } - def node_comments(node); end - - # source://rbi//lib/rbi/parser.rb#511 - sig { params(node: ::AST::Node).returns(::RBI::Loc) } - def node_loc(node); end - - # source://rbi//lib/rbi/parser.rb#402 - sig { params(node: ::AST::Node).returns(T.nilable(::RBI::Node)) } - def parse_block(node); end - - # source://rbi//lib/rbi/parser.rb#249 - sig { params(node: ::AST::Node).returns(::RBI::Node) } - def parse_const_assign(node); end - - # source://rbi//lib/rbi/parser.rb#263 - sig { params(node: ::AST::Node).returns(::RBI::Method) } - def parse_def(node); end - - # source://rbi//lib/rbi/parser.rb#486 - sig { params(node: ::AST::Node).returns(::RBI::TEnumBlock) } - def parse_enum(node); end - - # source://rbi//lib/rbi/parser.rb#290 - sig { params(node: ::AST::Node).returns(::RBI::Param) } - def parse_param(node); end - - # source://rbi//lib/rbi/parser.rb#503 - sig { params(node: ::AST::Node).returns(::RBI::RequiresAncestor) } - def parse_requires_ancestor(node); end - - # source://rbi//lib/rbi/parser.rb#229 - sig { params(node: ::AST::Node).returns(::RBI::Scope) } - def parse_scope(node); end - - # source://rbi//lib/rbi/parser.rb#318 - sig { params(node: ::AST::Node).returns(T.nilable(::RBI::Node)) } - def parse_send(node); end - - # source://rbi//lib/rbi/parser.rb#385 - sig { params(node: ::AST::Node).returns(T::Array[::RBI::Arg]) } - def parse_send_args(node); end - - # source://rbi//lib/rbi/parser.rb#479 - sig { params(node: ::AST::Node).returns(::RBI::Sig) } - def parse_sig(node); end - - # source://rbi//lib/rbi/parser.rb#424 - sig { params(node: ::AST::Node).returns(::RBI::Struct) } - def parse_struct(node); end - - # source://rbi//lib/rbi/parser.rb#463 - sig { params(node: ::AST::Node).returns([::String, ::String, T.nilable(::String)]) } - def parse_tstruct_prop(node); end - - # source://rbi//lib/rbi/parser.rb#564 - sig { void } - def separate_header_comments; end - - # source://rbi//lib/rbi/parser.rb#586 - sig { void } - def set_root_tree_loc; end - - # source://rbi//lib/rbi/parser.rb#418 - sig { params(node: ::AST::Node).returns(T::Boolean) } - def struct_definition?(node); end -end - -# source://rbi//lib/rbi/model.rb#1311 -class RBI::TypeMember < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1326 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/printer.rb#810 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1334 - sig { returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#1315 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1340 - sig { override.returns(::String) } - def to_s; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1315 - def value; end -end - -# source://rbi//lib/rbi/parser.rb#20 -class RBI::UnexpectedParserError < ::StandardError - # source://rbi//lib/rbi/parser.rb#27 - sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } - def initialize(parent_exception, last_location); end - - # source://rbi//lib/rbi/parser.rb#24 - sig { returns(::RBI::Loc) } - def last_location; end - - # source://rbi//lib/rbi/parser.rb#34 - sig { params(io: T.any(::IO, ::StringIO)).void } - def print_debug(io: T.unsafe(nil)); end -end - -# source://rbi//lib/rbi/version.rb#5 -RBI::VERSION = T.let(T.unsafe(nil), String) - -# Visibility -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#833 -class RBI::Visibility < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#843 - sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#849 - sig { params(other: ::RBI::Visibility).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#577 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#864 - sig { returns(T::Boolean) } - def private?; end - - # source://rbi//lib/rbi/model.rb#859 - sig { returns(T::Boolean) } - def protected?; end - - # source://rbi//lib/rbi/model.rb#854 - sig { returns(T::Boolean) } - def public?; end - - # source://rbi//lib/rbi/model.rb#840 - sig { returns(::Symbol) } - def visibility; end -end - -# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#51 -class RBI::VisibilityGroup < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#58 - sig { params(visibility: ::RBI::Visibility).void } - def initialize(visibility); end - - # source://rbi//lib/rbi/printer.rb#846 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#859 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#55 - sig { returns(::RBI::Visibility) } - def visibility; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/visitor.rb#5 -class RBI::Visitor - abstract! - - # source://sorbet-runtime/0.5.10761/lib/types/private/abstract/declare.rb#37 - def initialize(*args, **_arg1, &blk); end - - # @abstract - # - # source://rbi//lib/rbi/visitor.rb#12 - sig { abstract.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/visitor.rb#15 - sig { params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end -end diff --git a/sorbet/rbi/gems/redcarpet@3.6.0.rbi b/sorbet/rbi/gems/redcarpet@3.6.0.rbi deleted file mode 100644 index 5a546be1..00000000 --- a/sorbet/rbi/gems/redcarpet@3.6.0.rbi +++ /dev/null @@ -1,169 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `redcarpet` gem. -# Please instead update this file by running `bin/tapioca gem redcarpet`. - -# source://redcarpet//lib/redcarpet/compat.rb#71 -Markdown = RedcarpetCompat - -# source://redcarpet//lib/redcarpet.rb#4 -module Redcarpet; end - -# source://redcarpet//lib/redcarpet.rb#7 -class Redcarpet::Markdown - def render(_arg0); end - - # Returns the value of attribute renderer. - # - # source://redcarpet//lib/redcarpet.rb#8 - def renderer; end - - class << self - def new(*_arg0); end - end -end - -# source://redcarpet//lib/redcarpet.rb#11 -module Redcarpet::Render; end - -class Redcarpet::Render::Base - def initialize; end -end - -class Redcarpet::Render::HTML < ::Redcarpet::Render::Base - def initialize(*_arg0); end -end - -class Redcarpet::Render::HTML_TOC < ::Redcarpet::Render::Base - def initialize(*_arg0); end -end - -# A renderer object you can use to deal with users' input. It -# enables +escape_html+ and +safe_links_only+ by default. -# -# The +block_code+ callback is also overriden not to include -# the lang's class as the user can basically specify anything -# with the vanilla one. -# -# source://redcarpet//lib/redcarpet.rb#31 -class Redcarpet::Render::Safe < ::Redcarpet::Render::HTML - # @return [Safe] a new instance of Safe - # - # source://redcarpet//lib/redcarpet.rb#32 - def initialize(extensions = T.unsafe(nil)); end - - # source://redcarpet//lib/redcarpet.rb#39 - def block_code(code, lang); end - - private - - # TODO: This is far from ideal to have such method as we - # are duplicating existing code from Houdini. This method - # should be defined at the C level. - # - # source://redcarpet//lib/redcarpet.rb#50 - def html_escape(string); end -end - -# HTML + SmartyPants renderer -# -# source://redcarpet//lib/redcarpet.rb#21 -class Redcarpet::Render::SmartyHTML < ::Redcarpet::Render::HTML - include ::Redcarpet::Render::SmartyPants -end - -# SmartyPants Mixin module -# -# Implements SmartyPants.postprocess, which -# performs smartypants replacements on the HTML file, -# once it has been fully rendered. -# -# To add SmartyPants postprocessing to your custom -# renderers, just mixin the module `include SmartyPants` -# -# You can also use this as a standalone SmartyPants -# implementation. -# -# Example: -# -# # Mixin -# class CoolRenderer < HTML -# include SmartyPants -# # more code here -# end -# -# # Standalone -# Redcarpet::Render::SmartyPants.render("you're") -# -# source://redcarpet//lib/redcarpet.rb#85 -module Redcarpet::Render::SmartyPants - extend ::Redcarpet::Render::SmartyPants - - def postprocess(_arg0); end - - class << self - # source://redcarpet//lib/redcarpet.rb#87 - def render(text); end - end -end - -# XHTML Renderer -# -# source://redcarpet//lib/redcarpet.rb#14 -class Redcarpet::Render::XHTML < ::Redcarpet::Render::HTML - # @return [XHTML] a new instance of XHTML - # - # source://redcarpet//lib/redcarpet.rb#15 - def initialize(extensions = T.unsafe(nil)); end -end - -# source://redcarpet//lib/redcarpet.rb#5 -Redcarpet::VERSION = T.let(T.unsafe(nil), String) - -# Creates an instance of Redcarpet with the RedCloth API. -# -# source://redcarpet//lib/redcarpet/compat.rb#2 -class RedcarpetCompat - # @return [RedcarpetCompat] a new instance of RedcarpetCompat - # - # source://redcarpet//lib/redcarpet/compat.rb#5 - def initialize(text, *exts); end - - # Returns the value of attribute text. - # - # source://redcarpet//lib/redcarpet/compat.rb#3 - def text; end - - # Sets the attribute text - # - # @param value the value to set the attribute text to. - # - # source://redcarpet//lib/redcarpet/compat.rb#3 - def text=(_arg0); end - - # source://redcarpet//lib/redcarpet/compat.rb#12 - def to_html(*_dummy); end - - private - - # Turns a list of symbols into a hash of symbol => true. - # - # source://redcarpet//lib/redcarpet/compat.rb#66 - def list_to_truthy_hash(list); end - - # Returns two hashes, the extensions and renderer options - # given the extension list - # - # source://redcarpet//lib/redcarpet/compat.rb#59 - def parse_extensions_and_renderer_options(exts); end - - # source://redcarpet//lib/redcarpet/compat.rb#47 - def rename_extensions(exts); end -end - -# source://redcarpet//lib/redcarpet/compat.rb#18 -RedcarpetCompat::EXTENSION_MAP = T.let(T.unsafe(nil), Hash) - -# source://redcarpet//lib/redcarpet/compat.rb#44 -RedcarpetCompat::RENDERER_OPTIONS = T.let(T.unsafe(nil), Array) diff --git a/sorbet/rbi/gems/regexp_parser@2.7.0.rbi b/sorbet/rbi/gems/regexp_parser@2.9.0.rbi similarity index 86% rename from sorbet/rbi/gems/regexp_parser@2.7.0.rbi rename to sorbet/rbi/gems/regexp_parser@2.9.0.rbi index 9229c675..a53e6e1e 100644 --- a/sorbet/rbi/gems/regexp_parser@2.7.0.rbi +++ b/sorbet/rbi/gems/regexp_parser@2.9.0.rbi @@ -22,7 +22,7 @@ end # source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#6 Regexp::Expression::Alternation::OPERAND = Regexp::Expression::Alternative -# A sequence of expressions, used by Alternation as one of its alternative. +# A sequence of expressions, used by Alternation as one of its alternatives. # # source://regexp_parser//lib/regexp_parser/expression/classes/alternation.rb#3 class Regexp::Expression::Alternative < ::Regexp::Expression::Sequence @@ -94,6 +94,9 @@ end class Regexp::Expression::Anchor::NonWordBoundary < ::Regexp::Expression::Anchor::Base # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#17 def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#13 + def negative?; end end # source://regexp_parser//lib/regexp_parser/expression/classes/anchor.rb#13 @@ -102,77 +105,86 @@ class Regexp::Expression::Anchor::WordBoundary < ::Regexp::Expression::Anchor::B def human_name; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#86 +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#64 module Regexp::Expression::Assertion; end -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#87 +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#65 class Regexp::Expression::Assertion::Base < ::Regexp::Expression::Group::Base # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#148 def match_length; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#89 +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#67 class Regexp::Expression::Assertion::Lookahead < ::Regexp::Expression::Assertion::Base # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#19 def human_name; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#92 +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#70 class Regexp::Expression::Assertion::Lookbehind < ::Regexp::Expression::Assertion::Base # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#20 def human_name; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#90 +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#68 class Regexp::Expression::Assertion::NegativeLookahead < ::Regexp::Expression::Assertion::Base # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#21 def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#14 + def negative?; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#93 +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#71 class Regexp::Expression::Assertion::NegativeLookbehind < ::Regexp::Expression::Assertion::Base # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#22 def human_name; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#15 + def negative?; end end -# TODO: unify name with token :backref, one way or the other, in v3.0.0 +# alias for symmetry between token symbol and Expression class name # -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#3 +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#74 +Regexp::Expression::Backref = Regexp::Expression::Backreference + +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#2 module Regexp::Expression::Backreference; end -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#4 +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#3 class Regexp::Expression::Backreference::Base < ::Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#155 def match_length; end # Returns the value of attribute referenced_expression. # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#5 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#4 def referenced_expression; end # Sets the attribute referenced_expression # # @param value the value to set the attribute referenced_expression to. # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#5 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#4 def referenced_expression=(_arg0); end - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#24 - def referential?; end - private - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#7 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#6 def initialize_copy(orig); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#140 + def referential?; end + end end -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#39 +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#34 class Regexp::Expression::Backreference::Name < ::Regexp::Expression::Backreference::Base # @return [Name] a new instance of Name # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#43 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#38 def initialize(token, options = T.unsafe(nil)); end # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#23 @@ -180,39 +192,39 @@ class Regexp::Expression::Backreference::Name < ::Regexp::Expression::Backrefere # Returns the value of attribute name. # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#40 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#35 def name; end # Returns the value of attribute name. # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#40 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#35 def reference; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#55 +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#50 class Regexp::Expression::Backreference::NameCall < ::Regexp::Expression::Backreference::Name # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#24 def human_name; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#67 +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#62 class Regexp::Expression::Backreference::NameRecursionLevel < ::Regexp::Expression::Backreference::Name # @return [NameRecursionLevel] a new instance of NameRecursionLevel # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#70 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#65 def initialize(token, options = T.unsafe(nil)); end # Returns the value of attribute recursion_level. # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#68 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#63 def recursion_level; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#29 +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#24 class Regexp::Expression::Backreference::Number < ::Regexp::Expression::Backreference::Base # @return [Number] a new instance of Number # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#33 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#28 def initialize(token, options = T.unsafe(nil)); end # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#25 @@ -220,52 +232,52 @@ class Regexp::Expression::Backreference::Number < ::Regexp::Expression::Backrefe # Returns the value of attribute number. # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#30 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#25 def number; end # Returns the value of attribute number. # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#30 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#25 def reference; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#54 +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#49 class Regexp::Expression::Backreference::NumberCall < ::Regexp::Expression::Backreference::Number # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#27 def human_name; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#56 +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#51 class Regexp::Expression::Backreference::NumberCallRelative < ::Regexp::Expression::Backreference::NumberRelative # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#28 def human_name; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#58 +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#53 class Regexp::Expression::Backreference::NumberRecursionLevel < ::Regexp::Expression::Backreference::NumberRelative # @return [NumberRecursionLevel] a new instance of NumberRecursionLevel # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#61 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#56 def initialize(token, options = T.unsafe(nil)); end # Returns the value of attribute recursion_level. # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#59 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#54 def recursion_level; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#49 +# source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#44 class Regexp::Expression::Backreference::NumberRelative < ::Regexp::Expression::Backreference::Number # Returns the value of attribute effective_number. # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#50 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#45 def effective_number; end # Sets the attribute effective_number # # @param value the value to set the attribute effective_number to. # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#50 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#45 def effective_number=(_arg0); end # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#26 @@ -273,7 +285,7 @@ class Regexp::Expression::Backreference::NumberRelative < ::Regexp::Expression:: # Returns the value of attribute effective_number. # - # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#50 + # source://regexp_parser//lib/regexp_parser/expression/classes/backreference.rb#45 def reference; end end @@ -300,7 +312,7 @@ class Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#25 def ascii_classes?; end - # source://regexp_parser//lib/regexp_parser/expression/base.rb#67 + # source://regexp_parser//lib/regexp_parser/expression/base.rb#60 def attributes; end # @return [Boolean] @@ -314,6 +326,12 @@ class Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 def conditional_level=(_arg0); end + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def custom_to_s_handling; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def custom_to_s_handling=(_arg0); end + # @return [Boolean] # # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#20 @@ -336,7 +354,7 @@ class Regexp::Expression::Base # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#54 + # source://regexp_parser//lib/regexp_parser/expression/base.rb#47 def greedy?; end # @return [Boolean] @@ -351,7 +369,7 @@ class Regexp::Expression::Base # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#58 + # source://regexp_parser//lib/regexp_parser/expression/base.rb#51 def lazy?; end # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 @@ -383,7 +401,7 @@ class Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#3 def multiline?; end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#13 + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 def nesting_level; end # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 @@ -392,28 +410,40 @@ class Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 def options=(_arg0); end + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def parent; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def parent=(_arg0); end + # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#63 + # source://regexp_parser//lib/regexp_parser/expression/base.rb#56 def possessive?; end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#13 + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def pre_quantifier_decorations; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def pre_quantifier_decorations=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 def quantifier; end - # source://regexp_parser//lib/regexp_parser/expression/base.rb#24 + # source://regexp_parser//lib/regexp_parser/expression/base.rb#17 def quantify(*args); end # Deprecated. Prefer `#repetitions` which has a more uniform interface. # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#33 + # source://regexp_parser//lib/regexp_parser/expression/base.rb#26 def quantity; end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/expression/base.rb#58 + # source://regexp_parser//lib/regexp_parser/expression/base.rb#51 def reluctant?; end - # source://regexp_parser//lib/regexp_parser/expression/base.rb#38 + # source://regexp_parser//lib/regexp_parser/expression/base.rb#31 def repetitions; end # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 @@ -506,10 +536,10 @@ class Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 def text=(_arg0); end - # source://regexp_parser//lib/regexp_parser/expression/base.rb#67 + # source://regexp_parser//lib/regexp_parser/expression/base.rb#60 def to_h; end - # source://regexp_parser//lib/regexp_parser/expression/base.rb#16 + # source://regexp_parser//lib/regexp_parser/expression/base.rb#9 def to_re(format = T.unsafe(nil)); end # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 @@ -540,28 +570,23 @@ class Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#30 def unicode_classes?; end - # source://regexp_parser//lib/regexp_parser/expression/base.rb#28 + # source://regexp_parser//lib/regexp_parser/expression/base.rb#21 def unquantified_clone; end # @return [Boolean] # # source://regexp_parser//lib/regexp_parser/expression/methods/options.rb#14 def x?; end - - private - - # source://regexp_parser//lib/regexp_parser/expression/base.rb#9 - def initialize_copy(orig); end end # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#2 class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression # @return [CharacterSet] a new instance of CharacterSet # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#9 + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#6 def initialize(token, options = T.unsafe(nil)); end - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#19 + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#16 def close; end # Returns the value of attribute closed. @@ -584,14 +609,9 @@ class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 def match_length; end - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#15 + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#12 def negate; end - # Returns the value of attribute negative. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 - def negated?; end - # Returns the value of attribute negative. # # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 @@ -604,12 +624,10 @@ class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 def negative=(_arg0); end - # Returns the value of attribute negative. - # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#16 def negative?; end - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#23 + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#15 def parts; end end @@ -636,12 +654,12 @@ Regexp::Expression::CharacterSet::Intersection::OPERAND = Regexp::Expression::Ch # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#3 class Regexp::Expression::CharacterSet::Range < ::Regexp::Expression::Subexpression - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#9 + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#8 def <<(exp); end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#15 + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#14 def complete?; end # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#31 @@ -650,12 +668,9 @@ class Regexp::Expression::CharacterSet::Range < ::Regexp::Expression::Subexpress # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 def match_length; end - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#19 + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#16 def parts; end - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#4 - def starts_at; end - # source://regexp_parser//lib/regexp_parser/expression/classes/character_set/range.rb#4 def ts; end end @@ -673,6 +688,9 @@ end class Regexp::Expression::CharacterType::Base < ::Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 def match_length; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#17 + def negative?; end end # source://regexp_parser//lib/regexp_parser/expression/classes/character_type.rb#6 @@ -709,12 +727,17 @@ class Regexp::Expression::CharacterType::Word < ::Regexp::Expression::CharacterT class Regexp::Expression::Comment < ::Regexp::Expression::FreeSpace # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#33 def human_name; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#130 + def comment?; end + end end # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#2 module Regexp::Expression::Conditional; end -# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#29 +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#25 class Regexp::Expression::Conditional::Branch < ::Regexp::Expression::Sequence # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#34 def human_name; end @@ -746,39 +769,39 @@ class Regexp::Expression::Conditional::Condition < ::Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#10 def referenced_expression=(_arg0); end - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#24 - def referential?; end - private # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#19 def initialize_copy(orig); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#141 + def referential?; end + end end -# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#31 +# source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#27 class Regexp::Expression::Conditional::Expression < ::Regexp::Expression::Subexpression - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#34 + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#30 def <<(exp); end # @raise [TooManyBranches] # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#38 - def add_sequence(active_opts = T.unsafe(nil)); end + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#34 + def add_sequence(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end # @raise [TooManyBranches] # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#38 - def branch(active_opts = T.unsafe(nil)); end + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#34 + def branch(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#54 + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#50 def branches; end - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#50 + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#46 def condition; end - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#45 + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#41 def condition=(exp); end # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#36 @@ -787,33 +810,33 @@ class Regexp::Expression::Conditional::Expression < ::Regexp::Expression::Subexp # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#131 def match_length; end - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#66 + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#17 def parts; end - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#58 + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#54 def reference; end # Returns the value of attribute referenced_expression. # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#32 + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#28 def referenced_expression; end # Sets the attribute referenced_expression # # @param value the value to set the attribute referenced_expression to. # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#32 + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#28 def referenced_expression=(_arg0); end - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#62 - def referential?; end - private - # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#70 + # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#58 def initialize_copy(orig); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#142 + def referential?; end + end end # source://regexp_parser//lib/regexp_parser/expression/classes/conditional.rb#3 @@ -824,117 +847,120 @@ class Regexp::Expression::Conditional::TooManyBranches < ::Regexp::Parser::Error def initialize; end end -# TODO: unify naming with Token::Escape, one way or the other, in v3.0.0 +# alias for symmetry between Token::* and Expression::* # -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#3 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#101 +Regexp::Expression::Escape = Regexp::Expression::EscapeSequence + +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#2 module Regexp::Expression::EscapeSequence; end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#64 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#63 class Regexp::Expression::EscapeSequence::AbstractMetaControlSequence < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#65 + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#64 def char; end private - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#71 + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#70 def control_sequence_to_s(control_sequence); end - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#76 + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#75 def meta_char_to_codepoint(meta_char); end end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#28 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#27 class Regexp::Expression::EscapeSequence::AsciiEscape < ::Regexp::Expression::EscapeSequence::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#29 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#28 class Regexp::Expression::EscapeSequence::Backspace < ::Regexp::Expression::EscapeSequence::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#4 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#3 class Regexp::Expression::EscapeSequence::Base < ::Regexp::Expression::Base - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#10 + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#9 def char; end - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#5 + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#4 def codepoint; end # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 def match_length; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#30 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#29 class Regexp::Expression::EscapeSequence::Bell < ::Regexp::Expression::EscapeSequence::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#38 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#37 class Regexp::Expression::EscapeSequence::Codepoint < ::Regexp::Expression::EscapeSequence::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#40 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#39 class Regexp::Expression::EscapeSequence::CodepointList < ::Regexp::Expression::EscapeSequence::Base # @raise [NoMethodError] # - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#41 + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#40 def char; end - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#49 + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#48 def chars; end # @raise [NoMethodError] # - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#45 + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#44 def codepoint; end - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#53 + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#52 def codepoints; end # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#164 def match_length; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#82 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#81 class Regexp::Expression::EscapeSequence::Control < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#83 + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#82 def codepoint; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#31 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#30 class Regexp::Expression::EscapeSequence::FormFeed < ::Regexp::Expression::EscapeSequence::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#37 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#36 class Regexp::Expression::EscapeSequence::Hex < ::Regexp::Expression::EscapeSequence::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#22 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#21 class Regexp::Expression::EscapeSequence::Literal < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#23 + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#22 def char; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#88 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#87 class Regexp::Expression::EscapeSequence::Meta < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#89 + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#88 def codepoint; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#94 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#93 class Regexp::Expression::EscapeSequence::MetaControl < ::Regexp::Expression::EscapeSequence::AbstractMetaControlSequence - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#95 + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#94 def codepoint; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#32 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#31 class Regexp::Expression::EscapeSequence::Newline < ::Regexp::Expression::EscapeSequence::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#58 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#57 class Regexp::Expression::EscapeSequence::Octal < ::Regexp::Expression::EscapeSequence::Base - # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#59 + # source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#58 def char; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#33 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#32 class Regexp::Expression::EscapeSequence::Return < ::Regexp::Expression::EscapeSequence::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#34 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#33 class Regexp::Expression::EscapeSequence::Tab < ::Regexp::Expression::EscapeSequence::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#35 +# source://regexp_parser//lib/regexp_parser/expression/classes/escape_sequence.rb#34 class Regexp::Expression::EscapeSequence::VerticalTab < ::Regexp::Expression::EscapeSequence::Base; end # source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#2 @@ -946,6 +972,11 @@ class Regexp::Expression::FreeSpace < ::Regexp::Expression::Base # # source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#3 def quantify(*_args); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#135 + def decorative?; end + end end # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#2 @@ -954,87 +985,80 @@ module Regexp::Expression::Group; end # Special case. Absence group can match 0.. chars, irrespective of content. # TODO: in theory, they *can* exclude match lengths with `.`: `(?~.{3})` # -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#34 +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#19 class Regexp::Expression::Group::Absence < ::Regexp::Expression::Group::Base # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#172 def match_length; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#35 +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#20 class Regexp::Expression::Group::Atomic < ::Regexp::Expression::Group::Base; end # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#3 class Regexp::Expression::Group::Base < ::Regexp::Expression::Subexpression - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#8 - def capturing?; end - - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#10 - def comment?; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#4 + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#18 def parts; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#55 +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#40 class Regexp::Expression::Group::Capture < ::Regexp::Expression::Group::Base - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#59 - def capturing?; end - # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#37 def human_name; end # Returns the value of attribute number. # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#56 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 def identifier; end # Returns the value of attribute number. # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#56 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 def number; end # Sets the attribute number # # @param value the value to set the attribute number to. # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#56 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 def number=(_arg0); end # Returns the value of attribute number_at_level. # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#56 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 def number_at_level; end # Sets the attribute number_at_level # # @param value the value to set the attribute number_at_level to. # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#56 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 def number_at_level=(_arg0); end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#126 + def capturing?; end + end end -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#77 +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#60 class Regexp::Expression::Group::Comment < ::Regexp::Expression::Group::Base - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#82 - def comment?; end - - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#78 + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#20 def parts; end + + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#131 + def comment?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#136 + def decorative?; end + end end -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#62 +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#45 class Regexp::Expression::Group::Named < ::Regexp::Expression::Group::Capture # @return [Named] a new instance of Named # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#66 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#49 def initialize(token, options = T.unsafe(nil)); end # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#38 @@ -1042,66 +1066,66 @@ class Regexp::Expression::Group::Named < ::Regexp::Expression::Group::Capture # Returns the value of attribute name. # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#63 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#46 def identifier; end # Returns the value of attribute name. # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#63 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#46 def name; end private - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#71 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#54 def initialize_copy(orig); end end # TODO: should split off OptionsSwitch in v3.0.0. Maybe even make it no # longer inherit from Group because it is effectively a terminal expression. # -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#38 +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#23 class Regexp::Expression::Group::Options < ::Regexp::Expression::Group::Base # Returns the value of attribute option_changes. # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#39 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#24 def option_changes; end # Sets the attribute option_changes # # @param value the value to set the attribute option_changes to. # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#39 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#24 def option_changes=(_arg0); end - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#46 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#31 def quantify(*args); end private - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#41 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#26 def initialize_copy(orig); end end -# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#13 +# source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#6 class Regexp::Expression::Group::Passive < ::Regexp::Expression::Group::Base # @return [Passive] a new instance of Passive # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#16 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#9 def initialize(*_arg0); end # Sets the attribute implicit # # @param value the value to set the attribute implicit to. # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#14 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#7 def implicit=(_arg0); end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#29 + # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#14 def implicit?; end - # source://regexp_parser//lib/regexp_parser/expression/classes/group.rb#21 + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#19 def parts; end end @@ -1132,20 +1156,34 @@ end # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#85 Regexp::Expression::MatchLength = Regexp::MatchLength +# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#10 +Regexp::Expression::Nonposixclass = Regexp::Expression::PosixClass + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#118 +Regexp::Expression::Nonproperty = Regexp::Expression::UnicodeProperty + # source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#2 class Regexp::Expression::PosixClass < ::Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 def match_length; end - # source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#7 + # source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#3 def name; end - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#3 + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#18 def negative?; end end +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#9 +Regexp::Expression::Posixclass = Regexp::Expression::PosixClass + +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#117 +Regexp::Expression::Property = Regexp::Expression::UnicodeProperty + # TODO: in v3.0.0, maybe put Shared back into Base, and inherit from Base and # call super in #initialize, but raise in #quantifier= and #quantify, # or introduce an Expression::Quantifiable intermediate class. @@ -1158,7 +1196,7 @@ class Regexp::Expression::Quantifier # @return [Quantifier] a new instance of Quantifier # - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#13 + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#11 def initialize(*args); end # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 @@ -1167,10 +1205,16 @@ class Regexp::Expression::Quantifier # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 def conditional_level=(_arg0); end - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#35 + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def custom_to_s_handling; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def custom_to_s_handling=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 def greedy?; end - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#35 + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 def lazy?; end # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 @@ -1179,22 +1223,16 @@ class Regexp::Expression::Quantifier # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 def level=(_arg0); end - # Returns the value of attribute max. - # - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#11 + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#42 def max; end - # Returns the value of attribute min. - # - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#11 + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#38 def min; end - # Returns the value of attribute mode. - # - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#11 + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#46 def mode; end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#13 + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 def nesting_level; end # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 @@ -1203,13 +1241,25 @@ class Regexp::Expression::Quantifier # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 def options=(_arg0); end - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#35 + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def parent; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def parent=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 def possessive?; end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#13 + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def pre_quantifier_decorations; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 + def pre_quantifier_decorations=(_arg0); end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#14 def quantifier; end - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#35 + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#31 def reluctant?; end # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 @@ -1230,7 +1280,7 @@ class Regexp::Expression::Quantifier # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 def text=(_arg0); end - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#23 + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#19 def to_h; end # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 @@ -1253,11 +1303,11 @@ class Regexp::Expression::Quantifier private - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#44 - def deprecated_old_init(token, text, min, max, mode = T.unsafe(nil)); end + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#52 + def deprecated_old_init(token, text, _min, _max, _mode = T.unsafe(nil)); end - # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#59 - def minmax; end + # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#64 + def derived_data; end end # source://regexp_parser//lib/regexp_parser/expression/quantifier.rb#9 @@ -1284,12 +1334,9 @@ end # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#8 class Regexp::Expression::Sequence < ::Regexp::Expression::Subexpression # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#27 - def quantify(*args); end - - # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#22 - def starts_at; end + def quantify(token, *args); end - # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#22 + # source://regexp_parser//lib/regexp_parser/expression/sequence.rb#23 def ts; end class << self @@ -1302,11 +1349,11 @@ end # # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#3 class Regexp::Expression::SequenceOperation < ::Regexp::Expression::Subexpression - # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#13 + # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#12 def <<(exp); end - # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#17 - def add_sequence(active_opts = T.unsafe(nil)); end + # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#16 + def add_sequence(active_opts = T.unsafe(nil), params = T.unsafe(nil)); end # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 def operands; end @@ -1314,45 +1361,68 @@ class Regexp::Expression::SequenceOperation < ::Regexp::Expression::Subexpressio # source://regexp_parser//lib/regexp_parser/expression/shared.rb#9 def operator; end - # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#21 + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#22 def parts; end # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 def sequences; end - # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#8 - def starts_at; end - # source://regexp_parser//lib/regexp_parser/expression/sequence_operation.rb#8 def ts; end end +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#22 +Regexp::Expression::Set = Regexp::Expression::CharacterSet + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#2 module Regexp::Expression::Shared mixes_in_class_methods ::Regexp::Expression::Shared::ClassMethods # Deep-compare two expressions for equality. # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#98 + # When changing the conditions, please make sure to update + # #pretty_print_instance_variables so that it includes all relevant values. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#101 def ==(other); end # Deep-compare two expressions for equality. # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#98 + # When changing the conditions, please make sure to update + # #pretty_print_instance_variables so that it includes all relevant values. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#101 def ===(other); end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#42 + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#51 def base_length; end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#75 + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#124 + def capturing?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#96 def coded_offset; end + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#128 + def comment?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#133 + def decorative?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#47 + def ends_at(include_quantifier = T.unsafe(nil)); end + # Deep-compare two expressions for equality. # - # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#98 + # When changing the conditions, please make sure to update + # #pretty_print_instance_variables so that it includes all relevant values. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#101 def eql?(other); end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#46 + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#55 def full_length; end # default implementation, e.g. "atomic group", "hex escape", "word type", .. @@ -1360,6 +1430,9 @@ module Regexp::Expression::Shared # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#4 def human_name; end + # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#3 + def inspect; end + # Test if this expression has the given test_token, and optionally a given # test_type. # @@ -1383,10 +1456,22 @@ module Regexp::Expression::Shared # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#36 def is?(test_token, test_type = T.unsafe(nil)); end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#87 + # not an alias so as to respect overrides of #negative? + # + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#8 + def negated?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#3 + def negative?; end + + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#100 def nesting_level=(lvl); end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#71 + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#92 def offset; end # Test if this expression matches an entry in the given scope spec. @@ -1430,43 +1515,80 @@ module Regexp::Expression::Shared # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#67 + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#111 def optional?; end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#55 + # default implementation + # + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#4 def parts; end + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#84 + def pre_quantifier_decoration(expression_format = T.unsafe(nil)); end + + # Make pretty-print work despite #inspect implementation. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#12 + def pretty_print(q); end + + # Called by pretty_print (ruby/pp) and #inspect. + # + # source://regexp_parser//lib/regexp_parser/expression/methods/printing.rb#17 + def pretty_print_instance_variables; end + # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#63 + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#115 def quantified?; end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#93 + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#106 def quantifier=(qtf); end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#59 - def quantifier_affix(expression_format); end + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#88 + def quantifier_affix(expression_format = T.unsafe(nil)); end - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#83 + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#138 def referential?; end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#38 + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#43 def starts_at; end - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#79 + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#120 def terminal?; end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#50 + # #to_s reproduces the original source, as an unparser would. + # + # It takes an optional format argument. + # + # Example: + # + # lit = Regexp::Parser.parse(/a +/x)[0] + # + # lit.to_s # => 'a+' # default; with quantifier + # lit.to_s(:full) # => 'a+' # default; with quantifier + # lit.to_s(:base) # => 'a' # without quantifier + # lit.to_s(:original) # => 'a +' # with quantifier AND intermittent decorations + # + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#72 def to_s(format = T.unsafe(nil)); end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#50 + # #to_s reproduces the original source, as an unparser would. + # + # It takes an optional format argument. + # + # Example: + # + # lit = Regexp::Parser.parse(/a +/x)[0] + # + # lit.to_s # => 'a+' # default; with quantifier + # lit.to_s(:full) # => 'a+' # default; with quantifier + # lit.to_s(:base) # => 'a' # without quantifier + # lit.to_s(:original) # => 'a +' # with quantifier AND intermittent decorations + # + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#72 def to_str(format = T.unsafe(nil)); end - # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#39 + # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#37 def token_class; end # Test if this expression has the given test_type, which can be either @@ -1485,12 +1607,15 @@ module Regexp::Expression::Shared private - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#17 + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#18 def init_from_token_and_options(token, options = T.unsafe(nil)); end - # source://regexp_parser//lib/regexp_parser/expression/shared.rb#31 + # source://regexp_parser//lib/regexp_parser/expression/shared.rb#32 def initialize_copy(orig); end + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#10 + def intersperse(expressions, separator); end + class << self # @private # @@ -1503,6 +1628,12 @@ end # # source://regexp_parser//lib/regexp_parser/expression/shared.rb#3 module Regexp::Expression::Shared::ClassMethods + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#125 + def capturing?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#129 + def comment?; end + # Convenience method to init a valid Expression without a Regexp::Token # # @raise [ArgumentError] @@ -1513,6 +1644,15 @@ module Regexp::Expression::Shared::ClassMethods # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#15 def construct_defaults; end + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#134 + def decorative?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#139 + def referential?; end + + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#121 + def terminal?; end + # source://regexp_parser//lib/regexp_parser/expression/methods/construct.rb#25 def token_class; end end @@ -1526,28 +1666,30 @@ class Regexp::Expression::Subexpression < ::Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#7 def initialize(token, options = T.unsafe(nil)); end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#18 + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#20 def <<(exp); end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 def [](*args, &block); end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 def at(*args, &block); end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#34 + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#33 def dig(*indices); end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 def each(*args, &block); end - # Iterates over the expressions of this expression as an array, passing - # the expression and its index within its parent to the given block. + # Traverses the expression, passing each recursive child to the + # given block. + # If the block takes two arguments, the indices of the children within + # their parents are also passed to it. # - # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#39 + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#8 def each_expression(include_self = T.unsafe(nil), &block); end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 def empty?(*args, &block); end # Returns the value of attribute expressions. @@ -1562,35 +1704,38 @@ class Regexp::Expression::Subexpression < ::Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#5 def expressions=(_arg0); end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#50 + def extract_quantifier_target(quantifier_description); end + + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 def fetch(*args, &block); end # Returns a new array with the results of calling the given block once # for every expression. If a block is not given, returns an array with # each expression and its level index as an array. # - # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#53 - def flat_map(include_self = T.unsafe(nil)); end + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#56 + def flat_map(include_self = T.unsafe(nil), &block); end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 def index(*args, &block); end # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#118 def inner_match_length; end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 def join(*args, &block); end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 def last(*args, &block); end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 def length(*args, &block); end # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#111 def match_length; end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#44 + # source://regexp_parser//lib/regexp_parser/expression/methods/parts.rb#21 def parts; end # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#102 @@ -1599,15 +1744,10 @@ class Regexp::Expression::Subexpression < ::Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/methods/strfregexp.rb#102 def strfregexp_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#40 + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#39 def te; end - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#55 - def terminal?; end - - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#48 + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#43 def to_h; end # Traverses the subexpression (depth-first, pre-order) and calls the given @@ -1623,10 +1763,10 @@ class Regexp::Expression::Subexpression < ::Regexp::Expression::Base # # Returns self. # - # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#16 + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#32 def traverse(include_self = T.unsafe(nil), &block); end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#28 + # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#27 def values_at(*args, &block); end # Traverses the subexpression (depth-first, pre-order) and calls the given @@ -1642,9 +1782,17 @@ class Regexp::Expression::Subexpression < ::Regexp::Expression::Base # # Returns self. # - # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#16 + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#32 def walk(include_self = T.unsafe(nil), &block); end + protected + + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#66 + def each_expression_with_index(&block); end + + # source://regexp_parser//lib/regexp_parser/expression/methods/traverse.rb#73 + def each_expression_without_index(&block); end + private # Override base method to clone the expressions as well. @@ -1652,266 +1800,267 @@ class Regexp::Expression::Subexpression < ::Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#13 def initialize_copy(orig); end - # source://regexp_parser//lib/regexp_parser/expression/subexpression.rb#61 - def intersperse(expressions, separator); end + class << self + # source://regexp_parser//lib/regexp_parser/expression/methods/tests.rb#122 + def terminal?; end + end end -# TODO: unify name with token :property, one way or the other, in v3.0.0 -# -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#3 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#2 module Regexp::Expression::UnicodeProperty; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#113 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#108 class Regexp::Expression::UnicodeProperty::Age < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#18 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#13 class Regexp::Expression::UnicodeProperty::Alnum < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#19 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#14 class Regexp::Expression::UnicodeProperty::Alpha < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#36 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#31 class Regexp::Expression::UnicodeProperty::Any < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#20 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#15 class Regexp::Expression::UnicodeProperty::Ascii < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#37 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#32 class Regexp::Expression::UnicodeProperty::Assigned < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#4 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#3 class Regexp::Expression::UnicodeProperty::Base < ::Regexp::Expression::Base # source://regexp_parser//lib/regexp_parser/expression/methods/match_length.rb#98 def match_length; end - # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#9 + # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#4 def name; end - # @return [Boolean] - # - # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#5 + # source://regexp_parser//lib/regexp_parser/expression/methods/negative.rb#19 def negative?; end - # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#13 + # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#8 def shortcut; end end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#21 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#16 class Regexp::Expression::UnicodeProperty::Blank < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#117 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#109 class Regexp::Expression::UnicodeProperty::Block < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#22 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#17 class Regexp::Expression::UnicodeProperty::Cntrl < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#102 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#97 module Regexp::Expression::UnicodeProperty::Codepoint; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#105 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#100 class Regexp::Expression::UnicodeProperty::Codepoint::Any < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#103 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#98 class Regexp::Expression::UnicodeProperty::Codepoint::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#106 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#101 class Regexp::Expression::UnicodeProperty::Codepoint::Control < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#107 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#102 class Regexp::Expression::UnicodeProperty::Codepoint::Format < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#109 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#104 class Regexp::Expression::UnicodeProperty::Codepoint::PrivateUse < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#108 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#103 class Regexp::Expression::UnicodeProperty::Codepoint::Surrogate < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#110 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#105 class Regexp::Expression::UnicodeProperty::Codepoint::Unassigned < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#114 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#110 class Regexp::Expression::UnicodeProperty::Derived < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#23 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#18 class Regexp::Expression::UnicodeProperty::Digit < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#115 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#111 class Regexp::Expression::UnicodeProperty::Emoji < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#24 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#112 +class Regexp::Expression::UnicodeProperty::Enumerated < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#19 class Regexp::Expression::UnicodeProperty::Graph < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#39 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#34 module Regexp::Expression::UnicodeProperty::Letter; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#42 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#37 class Regexp::Expression::UnicodeProperty::Letter::Any < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#40 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#35 class Regexp::Expression::UnicodeProperty::Letter::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#43 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#38 class Regexp::Expression::UnicodeProperty::Letter::Cased < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#45 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#40 class Regexp::Expression::UnicodeProperty::Letter::Lowercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#47 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#42 class Regexp::Expression::UnicodeProperty::Letter::Modifier < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#48 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#43 class Regexp::Expression::UnicodeProperty::Letter::Other < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#46 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#41 class Regexp::Expression::UnicodeProperty::Letter::Titlecase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#44 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#39 class Regexp::Expression::UnicodeProperty::Letter::Uppercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#25 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#20 class Regexp::Expression::UnicodeProperty::Lower < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#51 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#46 module Regexp::Expression::UnicodeProperty::Mark; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#54 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#49 class Regexp::Expression::UnicodeProperty::Mark::Any < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#52 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#47 class Regexp::Expression::UnicodeProperty::Mark::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#55 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#50 class Regexp::Expression::UnicodeProperty::Mark::Combining < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#58 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#53 class Regexp::Expression::UnicodeProperty::Mark::Enclosing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#56 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#51 class Regexp::Expression::UnicodeProperty::Mark::Nonspacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#57 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#52 class Regexp::Expression::UnicodeProperty::Mark::Spacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#34 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#29 class Regexp::Expression::UnicodeProperty::Newline < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#61 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#56 module Regexp::Expression::UnicodeProperty::Number; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#64 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#59 class Regexp::Expression::UnicodeProperty::Number::Any < ::Regexp::Expression::UnicodeProperty::Number::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#62 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#57 class Regexp::Expression::UnicodeProperty::Number::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#65 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#60 class Regexp::Expression::UnicodeProperty::Number::Decimal < ::Regexp::Expression::UnicodeProperty::Number::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#66 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#61 class Regexp::Expression::UnicodeProperty::Number::Letter < ::Regexp::Expression::UnicodeProperty::Number::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#67 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#62 class Regexp::Expression::UnicodeProperty::Number::Other < ::Regexp::Expression::UnicodeProperty::Number::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#26 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#21 class Regexp::Expression::UnicodeProperty::Print < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#27 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#22 class Regexp::Expression::UnicodeProperty::Punct < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#70 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#65 module Regexp::Expression::UnicodeProperty::Punctuation; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#73 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#68 class Regexp::Expression::UnicodeProperty::Punctuation::Any < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#71 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#66 class Regexp::Expression::UnicodeProperty::Punctuation::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#77 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#72 class Regexp::Expression::UnicodeProperty::Punctuation::Close < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#74 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#69 class Regexp::Expression::UnicodeProperty::Punctuation::Connector < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#75 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#70 class Regexp::Expression::UnicodeProperty::Punctuation::Dash < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#79 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#74 class Regexp::Expression::UnicodeProperty::Punctuation::Final < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#78 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#73 class Regexp::Expression::UnicodeProperty::Punctuation::Initial < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#76 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#71 class Regexp::Expression::UnicodeProperty::Punctuation::Open < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#80 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#75 class Regexp::Expression::UnicodeProperty::Punctuation::Other < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#116 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#113 class Regexp::Expression::UnicodeProperty::Script < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#83 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#78 module Regexp::Expression::UnicodeProperty::Separator; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#86 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#81 class Regexp::Expression::UnicodeProperty::Separator::Any < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#84 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#79 class Regexp::Expression::UnicodeProperty::Separator::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#88 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#83 class Regexp::Expression::UnicodeProperty::Separator::Line < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#89 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#84 class Regexp::Expression::UnicodeProperty::Separator::Paragraph < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#87 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#82 class Regexp::Expression::UnicodeProperty::Separator::Space < ::Regexp::Expression::UnicodeProperty::Separator::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#28 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#23 class Regexp::Expression::UnicodeProperty::Space < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#92 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#87 module Regexp::Expression::UnicodeProperty::Symbol; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#95 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#90 class Regexp::Expression::UnicodeProperty::Symbol::Any < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#93 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#88 class Regexp::Expression::UnicodeProperty::Symbol::Base < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#97 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#92 class Regexp::Expression::UnicodeProperty::Symbol::Currency < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#96 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#91 class Regexp::Expression::UnicodeProperty::Symbol::Math < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#98 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#93 class Regexp::Expression::UnicodeProperty::Symbol::Modifier < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#99 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#94 class Regexp::Expression::UnicodeProperty::Symbol::Other < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#29 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#24 class Regexp::Expression::UnicodeProperty::Upper < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#30 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#25 class Regexp::Expression::UnicodeProperty::Word < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#32 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#27 class Regexp::Expression::UnicodeProperty::XPosixPunct < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#31 +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#26 class Regexp::Expression::UnicodeProperty::Xdigit < ::Regexp::Expression::UnicodeProperty::Base; end -# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#10 +# source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#11 class Regexp::Expression::WhiteSpace < ::Regexp::Expression::FreeSpace # source://regexp_parser//lib/regexp_parser/expression/methods/human_name.rb#42 def human_name; end - # source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#11 + # source://regexp_parser//lib/regexp_parser/expression/classes/free_space.rb#12 def merge(exp); end end @@ -1949,13 +2098,13 @@ class Regexp::Lexer # to the last codepoint, e.g. /\u{61 62 63}{3}/ =~ 'abccc' # c.f. #break_literal. # - # source://regexp_parser//lib/regexp_parser/lexer.rb#135 + # source://regexp_parser//lib/regexp_parser/lexer.rb#143 def break_codepoint_list(token); end # called by scan to break a literal run that is longer than one character # into two separate tokens when it is followed by a quantifier # - # source://regexp_parser//lib/regexp_parser/lexer.rb#115 + # source://regexp_parser//lib/regexp_parser/lexer.rb#123 def break_literal(token); end # Returns the value of attribute collect_tokens. @@ -1982,10 +2131,10 @@ class Regexp::Lexer # source://regexp_parser//lib/regexp_parser/lexer.rb#87 def conditional_nesting=(_arg0); end - # source://regexp_parser//lib/regexp_parser/lexer.rb#102 + # source://regexp_parser//lib/regexp_parser/lexer.rb#106 def descend(type, token); end - # source://regexp_parser//lib/regexp_parser/lexer.rb#154 + # source://regexp_parser//lib/regexp_parser/lexer.rb#162 def merge_condition(current, last); end # Returns the value of attribute nesting. @@ -2204,7 +2353,6 @@ end # source://regexp_parser//lib/regexp_parser/version.rb#2 class Regexp::Parser include ::Regexp::Expression - include ::Regexp::Expression::UnicodeProperty # source://regexp_parser//lib/regexp_parser/parser.rb#25 def parse(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end @@ -2283,25 +2431,25 @@ class Regexp::Parser # source://regexp_parser//lib/regexp_parser/parser.rb#60 def extract_options(input, options); end - # source://regexp_parser//lib/regexp_parser/parser.rb#347 + # source://regexp_parser//lib/regexp_parser/parser.rb#349 def free_space(token); end # source://regexp_parser//lib/regexp_parser/parser.rb#114 def group(token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#511 + # source://regexp_parser//lib/regexp_parser/parser.rb#509 def increase_group_level(exp); end # source://regexp_parser//lib/regexp_parser/parser.rb#549 def intersection(token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#362 + # source://regexp_parser//lib/regexp_parser/parser.rb#360 def keep(token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#366 + # source://regexp_parser//lib/regexp_parser/parser.rb#364 def literal(token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#370 + # source://regexp_parser//lib/regexp_parser/parser.rb#368 def meta(token); end # source://regexp_parser//lib/regexp_parser/parser.rb#534 @@ -2340,7 +2488,7 @@ class Regexp::Parser # source://regexp_parser//lib/regexp_parser/parser.rb#165 def open_group(token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#529 + # source://regexp_parser//lib/regexp_parser/parser.rb#527 def open_set(token); end # source://regexp_parser//lib/regexp_parser/parser.rb#130 @@ -2361,13 +2509,13 @@ class Regexp::Parser # source://regexp_parser//lib/regexp_parser/parser.rb#76 def parse_token(token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#392 + # source://regexp_parser//lib/regexp_parser/parser.rb#390 def posixclass(token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#399 + # source://regexp_parser//lib/regexp_parser/parser.rb#397 def property(token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#480 + # source://regexp_parser//lib/regexp_parser/parser.rb#479 def quantifier(token); end # source://regexp_parser//lib/regexp_parser/parser.rb#542 @@ -2385,10 +2533,10 @@ class Regexp::Parser # source://regexp_parser//lib/regexp_parser/parser.rb#56 def root=(_arg0); end - # source://regexp_parser//lib/regexp_parser/parser.rb#381 + # source://regexp_parser//lib/regexp_parser/parser.rb#379 def sequence_operation(klass, token); end - # source://regexp_parser//lib/regexp_parser/parser.rb#517 + # source://regexp_parser//lib/regexp_parser/parser.rb#515 def set(token); end # Returns the value of attribute switching_options. @@ -2429,7 +2577,10 @@ Regexp::Parser::MOD_FLAGS = T.let(T.unsafe(nil), Array) # source://regexp_parser//lib/regexp_parser/parser.rb#7 class Regexp::Parser::ParserError < ::Regexp::Parser::Error; end -# source://regexp_parser//lib/regexp_parser/parser.rb#397 +# source://regexp_parser//lib/regexp_parser/parser.rb#394 +Regexp::Parser::UP = Regexp::Expression::UnicodeProperty + +# source://regexp_parser//lib/regexp_parser/parser.rb#395 Regexp::Parser::UPTokens = Regexp::Syntax::Token::UnicodeProperty # source://regexp_parser//lib/regexp_parser/parser.rb#15 @@ -2451,26 +2602,26 @@ end # source://regexp_parser//lib/regexp_parser/version.rb#3 Regexp::Parser::VERSION = T.let(T.unsafe(nil), String) -# source://regexp_parser//lib/regexp_parser/scanner.rb#13 +# source://regexp_parser//lib/regexp_parser/scanner/errors/scanner_error.rb#3 class Regexp::Scanner # Emits an array with the details of the scanned pattern # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2591 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2406 def emit(type, token, text); end # only public for #||= to work on ruby <= 2.5 # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2616 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2431 def literal_run; end # only public for #||= to work on ruby <= 2.5 # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2616 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2431 def literal_run=(_arg0); end # @raise [PrematureEndError] # - # source://regexp_parser//lib/regexp_parser/scanner.rb#84 + # source://regexp_parser//lib/regexp_parser/scanner.rb#24 def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end private @@ -2478,174 +2629,168 @@ class Regexp::Scanner # Appends one or more characters to the literal buffer, to be emitted later # by a call to emit_literal. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2653 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2468 def append_literal(data, ts, te); end # Returns the value of attribute block. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def block; end # Sets the attribute block # # @param value the value to set the attribute block to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def block=(_arg0); end # Returns the value of attribute char_pos. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def char_pos; end # Sets the attribute char_pos # # @param value the value to set the attribute char_pos to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def char_pos=(_arg0); end # Returns the value of attribute collect_tokens. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def collect_tokens; end # Sets the attribute collect_tokens # # @param value the value to set the attribute collect_tokens to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def collect_tokens=(_arg0); end # Returns the value of attribute conditional_stack. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def conditional_stack; end # Sets the attribute conditional_stack # # @param value the value to set the attribute conditional_stack to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def conditional_stack=(_arg0); end # Copy from ts to te from data as text # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2647 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2462 def copy(data, ts, te); end # Emits the literal run collected by calls to the append_literal method. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2658 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2473 def emit_literal; end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2693 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2508 def emit_meta_control_sequence(data, ts, te, token); end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2664 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2479 def emit_options(text); end # Returns the value of attribute free_spacing. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def free_spacing; end # Sets the attribute free_spacing # # @param value the value to set the attribute free_spacing to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def free_spacing=(_arg0); end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2626 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2441 def free_spacing?(input_object, options); end # Returns the value of attribute group_depth. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def group_depth; end # Sets the attribute group_depth # # @param value the value to set the attribute group_depth to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def group_depth=(_arg0); end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2638 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2453 def in_group?; end # @return [Boolean] # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2642 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2457 def in_set?; end # Returns the value of attribute prev_token. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def prev_token; end # Sets the attribute prev_token # # @param value the value to set the attribute prev_token to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def prev_token=(_arg0); end # Returns the value of attribute set_depth. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def set_depth; end # Sets the attribute set_depth # # @param value the value to set the attribute set_depth to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def set_depth=(_arg0); end # Returns the value of attribute spacing_stack. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def spacing_stack; end # Sets the attribute spacing_stack # # @param value the value to set the attribute spacing_stack to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def spacing_stack=(_arg0); end # Returns the value of attribute tokens. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def tokens; end # Sets the attribute tokens # # @param value the value to set the attribute tokens to. # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2620 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 def tokens=(_arg0); end - # Centralizes and unifies the handling of validation related - # errors. - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2702 - def validation_error(type, what, reason = T.unsafe(nil)); end - class << self - # source://regexp_parser//lib/regexp_parser/scanner.rb#2577 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2392 def long_prop_map; end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2581 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2396 def parse_prop_map(name); end - # source://regexp_parser//lib/regexp_parser/scanner.rb#2585 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2400 def posix_classes; end # Scans the given regular expression text, or Regexp object and collects the @@ -2655,100 +2800,105 @@ class Regexp::Scanner # This method may raise errors if a syntax error is encountered. # -------------------------------------------------------------------------- # - # source://regexp_parser//lib/regexp_parser/scanner.rb#80 + # source://regexp_parser//lib/regexp_parser/scanner.rb#20 def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end # lazy-load property maps when first needed # - # source://regexp_parser//lib/regexp_parser/scanner.rb#2573 + # source://regexp_parser//lib/regexp_parser/scanner.rb#2388 def short_prop_map; end end end # Invalid back reference. Used for name a number refs/calls. # -# source://regexp_parser//lib/regexp_parser/scanner.rb#54 +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#44 class Regexp::Scanner::InvalidBackrefError < ::Regexp::Scanner::ValidationError # @return [InvalidBackrefError] a new instance of InvalidBackrefError # - # source://regexp_parser//lib/regexp_parser/scanner.rb#55 + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#45 def initialize(what, reason); end end # Invalid group. Used for named groups. # -# source://regexp_parser//lib/regexp_parser/scanner.rb#39 +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#29 class Regexp::Scanner::InvalidGroupError < ::Regexp::Scanner::ValidationError # @return [InvalidGroupError] a new instance of InvalidGroupError # - # source://regexp_parser//lib/regexp_parser/scanner.rb#40 + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#30 def initialize(what, reason); end end # Invalid groupOption. Used for inline options. # TODO: should become InvalidGroupOptionError in v3.0.0 for consistency # -# source://regexp_parser//lib/regexp_parser/scanner.rb#47 +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#37 class Regexp::Scanner::InvalidGroupOption < ::Regexp::Scanner::ValidationError # @return [InvalidGroupOption] a new instance of InvalidGroupOption # - # source://regexp_parser//lib/regexp_parser/scanner.rb#48 + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#38 def initialize(option, text); end end # Invalid sequence format. Used for escape sequences, mainly. # -# source://regexp_parser//lib/regexp_parser/scanner.rb#32 +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#22 class Regexp::Scanner::InvalidSequenceError < ::Regexp::Scanner::ValidationError # @return [InvalidSequenceError] a new instance of InvalidSequenceError # - # source://regexp_parser//lib/regexp_parser/scanner.rb#33 + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#23 def initialize(what = T.unsafe(nil), where = T.unsafe(nil)); end end # Unexpected end of pattern # -# source://regexp_parser//lib/regexp_parser/scanner.rb#25 +# source://regexp_parser//lib/regexp_parser/scanner/errors/premature_end_error.rb#3 class Regexp::Scanner::PrematureEndError < ::Regexp::Scanner::ScannerError # @return [PrematureEndError] a new instance of PrematureEndError # - # source://regexp_parser//lib/regexp_parser/scanner.rb#26 + # source://regexp_parser//lib/regexp_parser/scanner/errors/premature_end_error.rb#4 def initialize(where = T.unsafe(nil)); end end # General scanner error (catch all) # -# source://regexp_parser//lib/regexp_parser/scanner.rb#15 +# source://regexp_parser//lib/regexp_parser/scanner/errors/scanner_error.rb#5 class Regexp::Scanner::ScannerError < ::Regexp::Parser::Error; end # The POSIX class name was not recognized by the scanner. # -# source://regexp_parser//lib/regexp_parser/scanner.rb#68 +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#58 class Regexp::Scanner::UnknownPosixClassError < ::Regexp::Scanner::ValidationError # @return [UnknownPosixClassError] a new instance of UnknownPosixClassError # - # source://regexp_parser//lib/regexp_parser/scanner.rb#69 - def initialize(text); end + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#59 + def initialize(text, _); end end # The property name was not recognized by the scanner. # -# source://regexp_parser//lib/regexp_parser/scanner.rb#61 +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#51 class Regexp::Scanner::UnknownUnicodePropertyError < ::Regexp::Scanner::ValidationError # @return [UnknownUnicodePropertyError] a new instance of UnknownUnicodePropertyError # - # source://regexp_parser//lib/regexp_parser/scanner.rb#62 - def initialize(name); end + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#52 + def initialize(name, _); end end # Base for all scanner validation errors # -# source://regexp_parser//lib/regexp_parser/scanner.rb#18 -class Regexp::Scanner::ValidationError < ::Regexp::Parser::Error - # @return [ValidationError] a new instance of ValidationError - # - # source://regexp_parser//lib/regexp_parser/scanner.rb#19 - def initialize(reason); end +# source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#4 +class Regexp::Scanner::ValidationError < ::Regexp::Scanner::ScannerError + class << self + # Centralizes and unifies the handling of validation related errors. + # + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#5 + def for(type, problem, reason = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/scanner/errors/validation_error.rb#9 + def types; end + end end # After loading all the tokens the map is full. Extract all tokens and types @@ -2919,7 +3069,7 @@ class Regexp::Syntax::Base end # source://regexp_parser//lib/regexp_parser/syntax/versions.rb#8 -Regexp::Syntax::CURRENT = Regexp::Syntax::V3_2_0 +Regexp::Syntax::CURRENT = Regexp::Syntax::V3_1_0 # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#6 class Regexp::Syntax::InvalidVersionNameError < ::Regexp::Syntax::SyntaxError @@ -2946,6 +3096,17 @@ module Regexp::Syntax::Token; end # source://regexp_parser//lib/regexp_parser/syntax/token.rb#42 Regexp::Syntax::Token::All = T.let(T.unsafe(nil), Array) +# alias for symmetry between Token::* and Expression::* +# +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#15 +module Regexp::Syntax::Token::Alternation; end + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#16 +Regexp::Syntax::Token::Alternation::All = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#17 +Regexp::Syntax::Token::Alternation::Type = T.let(T.unsafe(nil), Symbol) + # source://regexp_parser//lib/regexp_parser/syntax/token/anchor.rb#3 module Regexp::Syntax::Token::Anchor; end @@ -2982,6 +3143,11 @@ Regexp::Syntax::Token::Assertion::Lookbehind = T.let(T.unsafe(nil), Array) # source://regexp_parser//lib/regexp_parser/syntax/token/assertion.rb#8 Regexp::Syntax::Token::Assertion::Type = T.let(T.unsafe(nil), Symbol) +# alias for symmetry between token symbol and Expression class name +# +# source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#31 +Regexp::Syntax::Token::Backref = Regexp::Syntax::Token::Backreference + # source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#3 module Regexp::Syntax::Token::Backreference; end @@ -3066,38 +3232,41 @@ Regexp::Syntax::Token::Conditional::Separator = T.let(T.unsafe(nil), Array) # source://regexp_parser//lib/regexp_parser/syntax/token/conditional.rb#11 Regexp::Syntax::Token::Conditional::Type = T.let(T.unsafe(nil), Symbol) -# TODO: unify naming with RE::EscapeSequence, one way or the other, in v3.0.0 -# -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#4 +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#3 module Regexp::Syntax::Token::Escape; end -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#9 +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#8 Regexp::Syntax::Token::Escape::ASCII = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#25 +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#24 Regexp::Syntax::Token::Escape::All = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#5 +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#4 Regexp::Syntax::Token::Escape::Basic = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#7 +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#6 Regexp::Syntax::Token::Escape::Control = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#21 +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#20 Regexp::Syntax::Token::Escape::Hex = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#14 +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#13 Regexp::Syntax::Token::Escape::Meta = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#23 +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#22 Regexp::Syntax::Token::Escape::Octal = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#26 +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#25 Regexp::Syntax::Token::Escape::Type = T.let(T.unsafe(nil), Symbol) -# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#12 +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#11 Regexp::Syntax::Token::Escape::Unicode = T.let(T.unsafe(nil), Array) +# alias for symmetry between Token::* and Expression::* +# +# source://regexp_parser//lib/regexp_parser/syntax/token/escape.rb#31 +Regexp::Syntax::Token::EscapeSequence = Regexp::Syntax::Token::Escape + # source://regexp_parser//lib/regexp_parser/syntax/token.rb#11 module Regexp::Syntax::Token::FreeSpace; end @@ -3167,16 +3336,19 @@ Regexp::Syntax::Token::Map = T.let(T.unsafe(nil), Hash) # source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#3 module Regexp::Syntax::Token::Meta; end -# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#7 +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#8 Regexp::Syntax::Token::Meta::All = T.let(T.unsafe(nil), Array) +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#5 +Regexp::Syntax::Token::Meta::Alternation = T.let(T.unsafe(nil), Array) + # source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#4 Regexp::Syntax::Token::Meta::Basic = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#5 +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#6 Regexp::Syntax::Token::Meta::Extended = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#8 +# source://regexp_parser//lib/regexp_parser/syntax/token/meta.rb#9 Regexp::Syntax::Token::Meta::Type = T.let(T.unsafe(nil), Symbol) # source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#3 @@ -3197,6 +3369,11 @@ Regexp::Syntax::Token::PosixClass::Standard = T.let(T.unsafe(nil), Array) # source://regexp_parser//lib/regexp_parser/syntax/token/posix_class.rb#10 Regexp::Syntax::Token::PosixClass::Type = T.let(T.unsafe(nil), Symbol) +# alias for symmetry between token symbol and Token module name +# +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#749 +Regexp::Syntax::Token::Property = Regexp::Syntax::Token::UnicodeProperty + # source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#3 module Regexp::Syntax::Token::Quantifier; end @@ -3230,6 +3407,11 @@ Regexp::Syntax::Token::Quantifier::Type = T.let(T.unsafe(nil), Symbol) # source://regexp_parser//lib/regexp_parser/syntax/token/quantifier.rb#28 Regexp::Syntax::Token::Quantifier::V1_8_6 = T.let(T.unsafe(nil), Array) +# alias for symmetry between token symbol and Token module name +# +# source://regexp_parser//lib/regexp_parser/syntax/token/character_set.rb#14 +Regexp::Syntax::Token::Set = Regexp::Syntax::Token::CharacterSet + # Type is the same as Backreference so keeping it here, for now. # # source://regexp_parser//lib/regexp_parser/syntax/token/backreference.rb#20 @@ -3286,7 +3468,7 @@ Regexp::Syntax::Token::UnicodeProperty::Age_V3_1_0 = T.let(T.unsafe(nil), Array) # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#62 Regexp::Syntax::Token::UnicodeProperty::Age_V3_2_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#708 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#739 Regexp::Syntax::Token::UnicodeProperty::All = T.let(T.unsafe(nil), Array) # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#13 @@ -3337,19 +3519,28 @@ Regexp::Syntax::Token::UnicodeProperty::Derived_V2_4_0 = T.let(T.unsafe(nil), Ar # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#129 Regexp::Syntax::Token::UnicodeProperty::Derived_V2_5_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#693 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#724 Regexp::Syntax::Token::UnicodeProperty::Emoji = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#685 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#694 Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_5_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#711 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#702 +Regexp::Syntax::Token::UnicodeProperty::Emoji_V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#722 +Regexp::Syntax::Token::UnicodeProperty::Enumerated = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#706 +Regexp::Syntax::Token::UnicodeProperty::Enumerated_V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#742 Regexp::Syntax::Token::UnicodeProperty::NonType = T.let(T.unsafe(nil), Symbol) # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#11 Regexp::Syntax::Token::UnicodeProperty::POSIX = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#330 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#332 Regexp::Syntax::Token::UnicodeProperty::Script = T.let(T.unsafe(nil), Array) # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#135 @@ -3385,76 +3576,76 @@ Regexp::Syntax::Token::UnicodeProperty::Script_V3_1_0 = T.let(T.unsafe(nil), Arr # source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#322 Regexp::Syntax::Token::UnicodeProperty::Script_V3_2_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#710 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#741 Regexp::Syntax::Token::UnicodeProperty::Type = T.let(T.unsafe(nil), Symbol) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#683 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#692 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#332 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#334 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V1_9_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#431 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#433 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_0_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#559 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#561 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_2_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#594 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#596 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_3_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#607 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#609 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_4_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#621 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#623 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_5_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#631 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#633 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#645 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#647 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V2_6_2 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#657 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#659 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_1_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#668 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#670 Regexp::Syntax::Token::UnicodeProperty::UnicodeBlock_V3_2_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#695 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#726 Regexp::Syntax::Token::UnicodeProperty::V1_9_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#696 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#727 Regexp::Syntax::Token::UnicodeProperty::V1_9_3 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#697 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#728 Regexp::Syntax::Token::UnicodeProperty::V2_0_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#698 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#729 Regexp::Syntax::Token::UnicodeProperty::V2_2_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#699 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#730 Regexp::Syntax::Token::UnicodeProperty::V2_3_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#700 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#731 Regexp::Syntax::Token::UnicodeProperty::V2_4_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#701 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#732 Regexp::Syntax::Token::UnicodeProperty::V2_5_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#702 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#733 Regexp::Syntax::Token::UnicodeProperty::V2_6_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#703 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#734 Regexp::Syntax::Token::UnicodeProperty::V2_6_2 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#704 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#735 Regexp::Syntax::Token::UnicodeProperty::V2_6_3 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#705 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#736 Regexp::Syntax::Token::UnicodeProperty::V3_1_0 = T.let(T.unsafe(nil), Array) -# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#706 +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#737 Regexp::Syntax::Token::UnicodeProperty::V3_2_0 = T.let(T.unsafe(nil), Array) # source://regexp_parser//lib/regexp_parser/syntax/version_lookup.rb#12 diff --git a/sorbet/rbi/gems/rexml@3.2.5.rbi b/sorbet/rbi/gems/rexml@3.2.5.rbi deleted file mode 100644 index a94e5671..00000000 --- a/sorbet/rbi/gems/rexml@3.2.5.rbi +++ /dev/null @@ -1,4717 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rexml` gem. -# Please instead update this file by running `bin/tapioca gem rexml`. - -# This class needs: -# * Documentation -# * Work! Not all types of attlists are intelligently parsed, so we just -# spew back out what we get in. This works, but it would be better if -# we formatted the output ourselves. -# -# AttlistDecls provide *just* enough support to allow namespace -# declarations. If you need some sort of generalized support, or have an -# interesting idea about how to map the hideous, terrible design of DTD -# AttlistDecls onto an intuitive Ruby interface, let me know. I'm desperate -# for anything to make DTDs more palateable. -# -# source://rexml//lib/rexml/attlistdecl.rb#18 -class REXML::AttlistDecl < ::REXML::Child - include ::Enumerable - - # Create an AttlistDecl, pulling the information from a Source. Notice - # that this isn't very convenient; to create an AttlistDecl, you basically - # have to format it yourself, and then have the initializer parse it. - # Sorry, but for the foreseeable future, DTD support in REXML is pretty - # weak on convenience. Have I mentioned how much I hate DTDs? - # - # @return [AttlistDecl] a new instance of AttlistDecl - # - # source://rexml//lib/rexml/attlistdecl.rb#29 - def initialize(source); end - - # Access the attlist attribute/value pairs. - # value = attlist_decl[ attribute_name ] - # - # source://rexml//lib/rexml/attlistdecl.rb#38 - def [](key); end - - # Iterate over the key/value pairs: - # attlist_decl.each { |attribute_name, attribute_value| ... } - # - # source://rexml//lib/rexml/attlistdecl.rb#50 - def each(&block); end - - # What is this? Got me. - # - # source://rexml//lib/rexml/attlistdecl.rb#22 - def element_name; end - - # Whether an attlist declaration includes the given attribute definition - # if attlist_decl.include? "xmlns:foobar" - # - # @return [Boolean] - # - # source://rexml//lib/rexml/attlistdecl.rb#44 - def include?(key); end - - # source://rexml//lib/rexml/attlistdecl.rb#59 - def node_type; end - - # Write out exactly what we got in. - # - # source://rexml//lib/rexml/attlistdecl.rb#55 - def write(out, indent = T.unsafe(nil)); end -end - -# Defines an Element Attribute; IE, a attribute=value pair, as in: -# . Attributes can be in their own -# namespaces. General users of REXML will not interact with the -# Attribute class much. -# -# source://rexml//lib/rexml/attribute.rb#10 -class REXML::Attribute - include ::REXML::Node - include ::REXML::XMLTokens - include ::REXML::Namespace - - # Constructor. - # FIXME: The parser doesn't catch illegal characters in attributes - # - # first:: - # Either: an Attribute, which this new attribute will become a - # clone of; or a String, which is the name of this attribute - # second:: - # If +first+ is an Attribute, then this may be an Element, or nil. - # If nil, then the Element parent of this attribute is the parent - # of the +first+ Attribute. If the first argument is a String, - # then this must also be a String, and is the content of the attribute. - # If this is the content, it must be fully normalized (contain no - # illegal characters). - # parent:: - # Ignored unless +first+ is a String; otherwise, may be the Element - # parent of this attribute, or nil. - # - # - # Attribute.new( attribute_to_clone ) - # Attribute.new( attribute_to_clone, parent_element ) - # Attribute.new( "attr", "attr_value" ) - # Attribute.new( "attr", "attr_value", parent_element ) - # - # @return [Attribute] a new instance of Attribute - # - # source://rexml//lib/rexml/attribute.rb#45 - def initialize(first, second = T.unsafe(nil), parent = T.unsafe(nil)); end - - # Returns true if other is an Attribute and has the same name and value, - # false otherwise. - # - # source://rexml//lib/rexml/attribute.rb#109 - def ==(other); end - - # Returns a copy of this attribute - # - # source://rexml//lib/rexml/attribute.rb#158 - def clone; end - - # source://rexml//lib/rexml/attribute.rb#132 - def doctype; end - - # The element to which this attribute belongs - # - # source://rexml//lib/rexml/attribute.rb#15 - def element; end - - # Sets the element of which this object is an attribute. Normally, this - # is not directly called. - # - # Returns this attribute - # - # source://rexml//lib/rexml/attribute.rb#166 - def element=(element); end - - # Creates (and returns) a hash from both the name and value - # - # source://rexml//lib/rexml/attribute.rb#114 - def hash; end - - # source://rexml//lib/rexml/attribute.rb#192 - def inspect; end - - # Returns the namespace URL, if defined, or nil otherwise - # - # e = Element.new("el") - # e.add_namespace("ns", "http://url") - # e.add_attribute("ns:a", "b") - # e.add_attribute("nsx:a", "c") - # e.attribute("ns:a").namespace # => "http://url" - # e.attribute("nsx:a").namespace # => nil - # - # This method always returns "" for no namespace attribute. Because - # the default namespace doesn't apply to attribute names. - # - # From https://www.w3.org/TR/xml-names/#uniqAttrs - # - # > the default namespace does not apply to attribute names - # - # e = REXML::Element.new("el") - # e.add_namespace("", "http://example.com/") - # e.namespace # => "http://example.com/" - # e.add_attribute("a", "b") - # e.attribute("a").namespace # => "" - # - # source://rexml//lib/rexml/attribute.rb#98 - def namespace(arg = T.unsafe(nil)); end - - # source://rexml//lib/rexml/attribute.rb#188 - def node_type; end - - # The normalized value of this attribute. That is, the attribute with - # entities intact. - # - # source://rexml//lib/rexml/attribute.rb#18 - def normalized=(_arg0); end - - # Returns the namespace of the attribute. - # - # e = Element.new( "elns:myelement" ) - # e.add_attribute( "nsa:a", "aval" ) - # e.add_attribute( "b", "bval" ) - # e.attributes.get_attribute( "a" ).prefix # -> "nsa" - # e.attributes.get_attribute( "b" ).prefix # -> "" - # a = Attribute.new( "x", "y" ) - # a.prefix # -> "" - # - # source://rexml//lib/rexml/attribute.rb#73 - def prefix; end - - # Removes this Attribute from the tree, and returns true if successful - # - # This method is usually not called directly. - # - # source://rexml//lib/rexml/attribute.rb#179 - def remove; end - - # Returns the attribute value, with entities replaced - # - # source://rexml//lib/rexml/attribute.rb#140 - def to_s; end - - # Returns this attribute out as XML source, expanding the name - # - # a = Attribute.new( "x", "y" ) - # a.to_string # -> "x='y'" - # b = Attribute.new( "ns:x", "y" ) - # b.to_string # -> "ns:x='y'" - # - # source://rexml//lib/rexml/attribute.rb#124 - def to_string; end - - # Returns the UNNORMALIZED value of this attribute. That is, entities - # have been expanded to their values - # - # source://rexml//lib/rexml/attribute.rb#150 - def value; end - - # Writes this attribute (EG, puts 'key="value"' to the output) - # - # source://rexml//lib/rexml/attribute.rb#184 - def write(output, indent = T.unsafe(nil)); end - - # source://rexml//lib/rexml/attribute.rb#198 - def xpath; end -end - -# A class that defines the set of Attributes of an Element and provides -# operations for accessing elements in that set. -# -# source://rexml//lib/rexml/element.rb#2141 -class REXML::Attributes < ::Hash - # :call-seq: - # new(element) - # - # Creates and returns a new \REXML::Attributes object. - # The element given by argument +element+ is stored, - # but its own attributes are not modified: - # - # ele = REXML::Element.new('foo') - # attrs = REXML::Attributes.new(ele) - # attrs.object_id == ele.attributes.object_id # => false - # - # Other instance methods in class \REXML::Attributes may refer to: - # - # - +element.document+. - # - +element.prefix+. - # - +element.expanded_name+. - # - # @return [Attributes] a new instance of Attributes - # - # source://rexml//lib/rexml/element.rb#2160 - def initialize(element); end - - # :call-seq: - # add(attribute) -> attribute - # - # Adds attribute +attribute+, replacing the previous - # attribute of the same name if it exists; - # returns +attribute+: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs # => {"att"=>{"foo"=>foo:att='1', "bar"=>bar:att='2', ""=>att='<'}} - # attrs.add(REXML::Attribute.new('foo:att', '2')) # => foo:att='2' - # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' - # attrs.include?('baz') # => true - # - # source://rexml//lib/rexml/element.rb#2537 - def <<(attribute); end - - # :call-seq: - # [name] -> attribute_value or nil - # - # Returns the value for the attribute given by +name+, - # if it exists; otherwise +nil+. - # The value returned is the unnormalized attribute value, - # with entities expanded: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.elements['//ele'] # => - # ele.attributes['att'] # => "<" - # ele.attributes['bar:att'] # => "2" - # ele.attributes['nosuch'] # => nil - # - # Related: get_attribute (returns an \Attribute object). - # - # source://rexml//lib/rexml/element.rb#2185 - def [](name); end - - # :call-seq: - # [name] = value -> value - # - # When +value+ is non-+nil+, - # assigns that to the attribute for the given +name+, - # overwriting the previous value if it exists: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs['foo:att'] = '2' # => "2" - # attrs['baz:att'] = '3' # => "3" - # - # When +value+ is +nil+, deletes the attribute if it exists: - # - # attrs['baz:att'] = nil - # attrs.include?('baz:att') # => false - # - # source://rexml//lib/rexml/element.rb#2369 - def []=(name, value); end - - # :call-seq: - # add(attribute) -> attribute - # - # Adds attribute +attribute+, replacing the previous - # attribute of the same name if it exists; - # returns +attribute+: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs # => {"att"=>{"foo"=>foo:att='1', "bar"=>bar:att='2', ""=>att='<'}} - # attrs.add(REXML::Attribute.new('foo:att', '2')) # => foo:att='2' - # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' - # attrs.include?('baz') # => true - # - # source://rexml//lib/rexml/element.rb#2537 - def add(attribute); end - - # :call-seq: - # delete(name) -> element - # delete(attribute) -> element - # - # Removes a specified attribute if it exists; - # returns the attributes' element. - # - # When string argument +name+ is given, - # removes the attribute of that name if it exists: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs.delete('foo:att') # => - # attrs.delete('foo:att') # => - # - # When attribute argument +attribute+ is given, - # removes that attribute if it exists: - # - # attr = REXML::Attribute.new('bar:att', '2') - # attrs.delete(attr) # => # => - # attrs.delete(attr) # => # => - # - # source://rexml//lib/rexml/element.rb#2490 - def delete(attribute); end - - # :call-seq: - # delete_all(name) -> array_of_removed_attributes - # - # Removes all attributes matching the given +name+; - # returns an array of the removed attributes: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs.delete_all('att') # => [att='<'] - # - # source://rexml//lib/rexml/element.rb#2559 - def delete_all(name); end - - # :call-seq: - # each {|expanded_name, value| ... } - # - # Calls the given block with each expanded-name/value pair: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # ele.attributes.each do |expanded_name, value| - # p [expanded_name, value] - # end - # - # Output: - # - # ["foo:att", "1"] - # ["bar:att", "2"] - # ["att", "<"] - # - # source://rexml//lib/rexml/element.rb#2287 - def each; end - - # :call-seq: - # each_attribute {|attr| ... } - # - # Calls the given block with each \REXML::Attribute object: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # ele.attributes.each_attribute do |attr| - # p [attr.class, attr] - # end - # - # Output: - # - # [REXML::Attribute, foo:att='1'] - # [REXML::Attribute, bar:att='2'] - # [REXML::Attribute, att='<'] - # - # source://rexml//lib/rexml/element.rb#2254 - def each_attribute; end - - # :call-seq: - # get_attribute(name) -> attribute_object or nil - # - # Returns the \REXML::Attribute object for the given +name+: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs.get_attribute('foo:att') # => foo:att='1' - # attrs.get_attribute('foo:att').class # => REXML::Attribute - # attrs.get_attribute('bar:att') # => bar:att='2' - # attrs.get_attribute('att') # => att='<' - # attrs.get_attribute('nosuch') # => nil - # - # source://rexml//lib/rexml/element.rb#2313 - def get_attribute(name); end - - # :call-seq: - # get_attribute_ns(namespace, name) - # - # Returns the \REXML::Attribute object among the attributes - # that matches the given +namespace+ and +name+: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs.get_attribute_ns('http://foo', 'att') # => foo:att='1' - # attrs.get_attribute_ns('http://foo', 'nosuch') # => nil - # - # source://rexml//lib/rexml/element.rb#2585 - def get_attribute_ns(namespace, name); end - - # :call-seq: - # length - # - # Returns the count of attributes: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # ele.attributes.length # => 3 - # - # source://rexml//lib/rexml/element.rb#2225 - def length; end - - # :call-seq: - # namespaces - # - # Returns a hash of name/value pairs for the namespaces: - # - # xml_string = '' - # d = REXML::Document.new(xml_string) - # d.root.attributes.namespaces # => {"xmlns"=>"foo", "x"=>"bar", "y"=>"twee"} - # - # source://rexml//lib/rexml/element.rb#2446 - def namespaces; end - - # :call-seq: - # prefixes -> array_of_prefix_strings - # - # Returns an array of prefix strings in the attributes. - # The array does not include the default - # namespace declaration, if one exists. - # - # xml_string = '' - # d = REXML::Document.new(xml_string) - # d.root.attributes.prefixes # => ["x", "y"] - # - # source://rexml//lib/rexml/element.rb#2421 - def prefixes; end - - # :call-seq: - # length - # - # Returns the count of attributes: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # ele.attributes.length # => 3 - # - # source://rexml//lib/rexml/element.rb#2225 - def size; end - - # :call-seq: - # to_a -> array_of_attribute_objects - # - # Returns an array of \REXML::Attribute objects representing - # the attributes: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes.to_a # => [foo:att='1', bar:att='2', att='<'] - # attrs.first.class # => REXML::Attribute - # - # source://rexml//lib/rexml/element.rb#2207 - def to_a; end -end - -# source://rexml//lib/rexml/cdata.rb#5 -class REXML::CData < ::REXML::Text - # Constructor. CData is data between - # - # _Examples_ - # CData.new( source ) - # CData.new( "Here is some CDATA" ) - # CData.new( "Some unprocessed data", respect_whitespace_TF, parent_element ) - # - # @return [CData] a new instance of CData - # - # source://rexml//lib/rexml/cdata.rb#16 - def initialize(first, whitespace = T.unsafe(nil), parent = T.unsafe(nil)); end - - # Make a copy of this object - # - # _Examples_ - # c = CData.new( "Some text" ) - # d = c.clone - # d.to_s # -> "Some text" - # - # source://rexml//lib/rexml/cdata.rb#26 - def clone; end - - # Returns the content of this CData object - # - # _Examples_ - # c = CData.new( "Some text" ) - # c.to_s # -> "Some text" - # - # source://rexml//lib/rexml/cdata.rb#35 - def to_s; end - - # source://rexml//lib/rexml/cdata.rb#39 - def value; end - - # == DEPRECATED - # See the rexml/formatters package - # - # Generates XML output of this object - # - # output:: - # Where to write the string. Defaults to $stdout - # indent:: - # The amount to indent this node by - # transitive:: - # Ignored - # ie_hack:: - # Ignored - # - # _Examples_ - # c = CData.new( " Some text " ) - # c.write( $stdout ) #-> - # - # source://rexml//lib/rexml/cdata.rb#60 - def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -# A Child object is something contained by a parent, and this class -# contains methods to support that. Most user code will not use this -# class directly. -# -# source://rexml//lib/rexml/child.rb#9 -class REXML::Child - include ::REXML::Node - - # Constructor. Any inheritors of this class should call super to make - # sure this method is called. - # parent:: - # if supplied, the parent of this child will be set to the - # supplied value, and self will be added to the parent - # - # @return [Child] a new instance of Child - # - # source://rexml//lib/rexml/child.rb#18 - def initialize(parent = T.unsafe(nil)); end - - # This doesn't yet handle encodings - # - # source://rexml//lib/rexml/child.rb#91 - def bytes; end - - # Returns:: the document this child belongs to, or nil if this child - # belongs to no document - # - # source://rexml//lib/rexml/child.rb#85 - def document; end - - # source://rexml//lib/rexml/node.rb#11 - def next_sibling; end - - # Sets the next sibling of this child. This can be used to insert a child - # after some other child. - # a = Element.new("a") - # b = a.add_element("b") - # c = Element.new("c") - # b.next_sibling = c - # # => - # - # source://rexml//lib/rexml/child.rb#68 - def next_sibling=(other); end - - # The Parent of this object - # - # source://rexml//lib/rexml/child.rb#11 - def parent; end - - # Sets the parent of this child to the supplied argument. - # - # other:: - # Must be a Parent object. If this object is the same object as the - # existing parent of this child, no action is taken. Otherwise, this - # child is removed from the current parent (if one exists), and is added - # to the new parent. - # Returns:: The parent added - # - # source://rexml//lib/rexml/child.rb#52 - def parent=(other); end - - # source://rexml//lib/rexml/node.rb#17 - def previous_sibling; end - - # Sets the previous sibling of this child. This can be used to insert a - # child before some other child. - # a = Element.new("a") - # b = a.add_element("b") - # c = Element.new("c") - # b.previous_sibling = c - # # => - # - # source://rexml//lib/rexml/child.rb#79 - def previous_sibling=(other); end - - # Removes this child from the parent. - # - # Returns:: self - # - # source://rexml//lib/rexml/child.rb#37 - def remove; end - - # Replaces this object with another object. Basically, calls - # Parent.replace_child - # - # Returns:: self - # - # source://rexml//lib/rexml/child.rb#29 - def replace_with(child); end -end - -# Represents an XML comment; that is, text between \ -# -# source://rexml//lib/rexml/comment.rb#7 -class REXML::Comment < ::REXML::Child - include ::Comparable - - # Constructor. The first argument can be one of three types: - # argument. If Comment, the argument is duplicated. If - # Source, the argument is scanned for a comment. - # should be nil, not supplied, or a Parent to be set as the parent - # of this object - # - # @param first If String, the contents of this comment are set to the - # @param second If the first argument is a Source, this argument - # @return [Comment] a new instance of Comment - # - # source://rexml//lib/rexml/comment.rb#24 - def initialize(first, second = T.unsafe(nil)); end - - # Compares this Comment to another; the contents of the comment are used - # in the comparison. - # - # source://rexml//lib/rexml/comment.rb#63 - def <=>(other); end - - # Compares this Comment to another; the contents of the comment are used - # in the comparison. - # - # source://rexml//lib/rexml/comment.rb#70 - def ==(other); end - - # source://rexml//lib/rexml/comment.rb#33 - def clone; end - - # source://rexml//lib/rexml/comment.rb#75 - def node_type; end - - # The content text - # - # source://rexml//lib/rexml/comment.rb#14 - def string; end - - # The content text - # - # source://rexml//lib/rexml/comment.rb#14 - def string=(_arg0); end - - # The content text - # - # source://rexml//lib/rexml/comment.rb#14 - def to_s; end - - # == DEPRECATED - # See REXML::Formatters - # - # output:: - # Where to write the string - # indent:: - # An integer. If -1, no indenting will be used; otherwise, the - # indentation will be this number of spaces, and children will be - # indented an additional amount. - # transitive:: - # Ignored by this class. The contents of comments are never modified. - # ie_hack:: - # Needed for conformity to the child API, but not used by this class. - # - # source://rexml//lib/rexml/comment.rb#50 - def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -# source://rexml//lib/rexml/xpath_parser.rb#11 -module REXML::DClonable; end - -# This is an abstract class. You never use this directly; it serves as a -# parent class for the specific declarations. -# -# source://rexml//lib/rexml/doctype.rb#242 -class REXML::Declaration < ::REXML::Child - # @return [Declaration] a new instance of Declaration - # - # source://rexml//lib/rexml/doctype.rb#243 - def initialize(src); end - - # source://rexml//lib/rexml/doctype.rb#248 - def to_s; end - - # == DEPRECATED - # See REXML::Formatters - # - # source://rexml//lib/rexml/doctype.rb#255 - def write(output, indent); end -end - -# Represents an XML DOCTYPE declaration; that is, the contents of . DOCTYPES can be used to declare the DTD of a document, as well as -# being used to declare entities used in the document. -# -# source://rexml//lib/rexml/doctype.rb#51 -class REXML::DocType < ::REXML::Parent - include ::REXML::XMLTokens - - # Constructor - # - # dt = DocType.new( 'foo', '-//I/Hate/External/IDs' ) - # # - # dt = DocType.new( doctype_to_clone ) - # # Incomplete. Shallow clone of doctype - # - # +Note+ that the constructor: - # - # Doctype.new( Source.new( "" ) ) - # - # is _deprecated_. Do not use it. It will probably disappear. - # - # @return [DocType] a new instance of DocType - # - # source://rexml//lib/rexml/doctype.rb#80 - def initialize(first, parent = T.unsafe(nil)); end - - # source://rexml//lib/rexml/doctype.rb#185 - def add(child); end - - # source://rexml//lib/rexml/doctype.rb#125 - def attribute_of(element, attribute); end - - # source://rexml//lib/rexml/doctype.rb#115 - def attributes_of(element); end - - # source://rexml//lib/rexml/doctype.rb#135 - def clone; end - - # source://rexml//lib/rexml/doctype.rb#173 - def context; end - - # name is the name of the doctype - # external_id is the referenced DTD, if given - # - # source://rexml//lib/rexml/doctype.rb#66 - def entities; end - - # source://rexml//lib/rexml/doctype.rb#181 - def entity(name); end - - # name is the name of the doctype - # external_id is the referenced DTD, if given - # - # source://rexml//lib/rexml/doctype.rb#66 - def external_id; end - - # name is the name of the doctype - # external_id is the referenced DTD, if given - # - # source://rexml//lib/rexml/doctype.rb#66 - def name; end - - # name is the name of the doctype - # external_id is the referenced DTD, if given - # - # source://rexml//lib/rexml/doctype.rb#66 - def namespaces; end - - # source://rexml//lib/rexml/doctype.rb#111 - def node_type; end - - # Retrieves a named notation. Only notations declared in the internal - # DTD subset can be retrieved. - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#229 - def notation(name); end - - # This method returns a list of notations that have been declared in the - # _internal_ DTD subset. Notations in the external DTD subset are not - # listed. - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#221 - def notations; end - - # This method retrieves the public identifier identifying the document's - # DTD. - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#195 - def public; end - - # This method retrieves the system identifier identifying the document's DTD - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#207 - def system; end - - # output:: - # Where to write the string - # indent:: - # An integer. If -1, no indentation will be used; otherwise, the - # indentation will be this number of spaces, and children will be - # indented an additional amount. - # transitive:: - # Ignored - # ie_hack:: - # Ignored - # - # source://rexml//lib/rexml/doctype.rb#149 - def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -# Represents an XML document. -# -# A document may have: -# -# - A single child that may be accessed via method #root. -# - An XML declaration. -# - A document type. -# - Processing instructions. -# -# == In a Hurry? -# -# If you're somewhat familiar with XML -# and have a particular task in mind, -# you may want to see the -# {tasks pages}[../doc/rexml/tasks/tocs/master_toc_rdoc.html], -# and in particular, the -# {tasks page for documents}[../doc/rexml/tasks/tocs/document_toc_rdoc.html]. -# -# source://rexml//lib/rexml/document.rb#35 -class REXML::Document < ::REXML::Element - # :call-seq: - # new(string = nil, context = {}) -> new_document - # new(io_stream = nil, context = {}) -> new_document - # new(document = nil, context = {}) -> new_document - # - # Returns a new \REXML::Document object. - # - # When no arguments are given, - # returns an empty document: - # - # d = REXML::Document.new - # d.to_s # => "" - # - # When argument +string+ is given, it must be a string - # containing a valid XML document: - # - # xml_string = 'FooBar' - # d = REXML::Document.new(xml_string) - # d.to_s # => "FooBar" - # - # When argument +io_stream+ is given, it must be an \IO object - # that is opened for reading, and when read must return a valid XML document: - # - # File.write('t.xml', xml_string) - # d = File.open('t.xml', 'r') do |io| - # REXML::Document.new(io) - # end - # d.to_s # => "FooBar" - # - # When argument +document+ is given, it must be an existing - # document object, whose context and attributes (but not chidren) - # are cloned into the new document: - # - # d = REXML::Document.new(xml_string) - # d.children # => [ ... ] - # d.context = {raw: :all, compress_whitespace: :all} - # d.add_attributes({'bar' => 0, 'baz' => 1}) - # d1 = REXML::Document.new(d) - # d1.children # => [] - # d1.context # => {:raw=>:all, :compress_whitespace=>:all} - # d1.attributes # => {"bar"=>bar='0', "baz"=>baz='1'} - # - # When argument +context+ is given, it must be a hash - # containing context entries for the document; - # see {Element Context}[../doc/rexml/context_rdoc.html]: - # - # context = {raw: :all, compress_whitespace: :all} - # d = REXML::Document.new(xml_string, context) - # d.context # => {:raw=>:all, :compress_whitespace=>:all} - # - # @return [Document] a new instance of Document - # - # source://rexml//lib/rexml/document.rb#92 - def initialize(source = T.unsafe(nil), context = T.unsafe(nil)); end - - # :call-seq: - # add(xml_decl) -> self - # add(doc_type) -> self - # add(object) -> self - # - # Adds an object to the document; returns +self+. - # - # When argument +xml_decl+ is given, - # it must be an REXML::XMLDecl object, - # which becomes the XML declaration for the document, - # replacing the previous XML declaration if any: - # - # d = REXML::Document.new - # d.xml_decl.to_s # => "" - # d.add(REXML::XMLDecl.new('2.0')) - # d.xml_decl.to_s # => "" - # - # When argument +doc_type+ is given, - # it must be an REXML::DocType object, - # which becomes the document type for the document, - # replacing the previous document type, if any: - # - # d = REXML::Document.new - # d.doctype.to_s # => "" - # d.add(REXML::DocType.new('foo')) - # d.doctype.to_s # => "" - # - # When argument +object+ (not an REXML::XMLDecl or REXML::DocType object) - # is given it is added as the last child: - # - # d = REXML::Document.new - # d.add(REXML::Element.new('foo')) - # d.to_s # => "" - # - # source://rexml//lib/rexml/document.rb#170 - def <<(child); end - - # :call-seq: - # add(xml_decl) -> self - # add(doc_type) -> self - # add(object) -> self - # - # Adds an object to the document; returns +self+. - # - # When argument +xml_decl+ is given, - # it must be an REXML::XMLDecl object, - # which becomes the XML declaration for the document, - # replacing the previous XML declaration if any: - # - # d = REXML::Document.new - # d.xml_decl.to_s # => "" - # d.add(REXML::XMLDecl.new('2.0')) - # d.xml_decl.to_s # => "" - # - # When argument +doc_type+ is given, - # it must be an REXML::DocType object, - # which becomes the document type for the document, - # replacing the previous document type, if any: - # - # d = REXML::Document.new - # d.doctype.to_s # => "" - # d.add(REXML::DocType.new('foo')) - # d.doctype.to_s # => "" - # - # When argument +object+ (not an REXML::XMLDecl or REXML::DocType object) - # is given it is added as the last child: - # - # d = REXML::Document.new - # d.add(REXML::Element.new('foo')) - # d.to_s # => "" - # - # source://rexml//lib/rexml/document.rb#170 - def add(child); end - - # :call-seq: - # add_element(name_or_element = nil, attributes = nil) -> new_element - # - # Adds an element to the document by calling REXML::Element.add_element: - # - # REXML::Element.add_element(name_or_element, attributes) - # - # source://rexml//lib/rexml/document.rb#209 - def add_element(arg = T.unsafe(nil), arg2 = T.unsafe(nil)); end - - # :call-seq: - # clone -> new_document - # - # Returns the new document resulting from executing - # Document.new(self). See Document.new. - # - # source://rexml//lib/rexml/document.rb#120 - def clone; end - - # :call-seq: - # doctype -> doc_type or nil - # - # Returns the DocType object for the document, if it exists, otherwise +nil+: - # - # d = REXML::Document.new('') - # d.doctype.class # => REXML::DocType - # d = REXML::Document.new('') - # d.doctype.class # => nil - # - # source://rexml//lib/rexml/document.rb#241 - def doctype; end - - # source://rexml//lib/rexml/document.rb#442 - def document; end - - # :call-seq: - # encoding -> encoding_string - # - # Returns the XMLDecl encoding of the document, - # - # d = REXML::Document.new('') - # d.encoding # => "UTF-16" - # d = REXML::Document.new('') - # d.encoding # => "UTF-8" - # - # source://rexml//lib/rexml/document.rb#290 - def encoding; end - - # Returns the value of attribute entity_expansion_count. - # - # source://rexml//lib/rexml/document.rb#433 - def entity_expansion_count; end - - # :call-seq: - # expanded_name -> empty_string - # - # Returns an empty string. - # - # source://rexml//lib/rexml/document.rb#129 - def expanded_name; end - - # :call-seq: - # expanded_name -> empty_string - # - # Returns an empty string. - # d = doc_type - # d ? d.name : "UNDEFINED" - # - # source://rexml//lib/rexml/document.rb#129 - def name; end - - # :call-seq: - # node_type -> :document - # - # Returns the symbol +:document+. - # - # source://rexml//lib/rexml/document.rb#110 - def node_type; end - - # source://rexml//lib/rexml/document.rb#435 - def record_entity_expansion; end - - # :call-seq: - # root -> root_element or nil - # - # Returns the root element of the document, if it exists, otherwise +nil+: - # - # d = REXML::Document.new('') - # d.root # => - # d = REXML::Document.new('') - # d.root # => nil - # - # source://rexml//lib/rexml/document.rb#225 - def root; end - - # :call-seq: - # stand_alone? - # - # Returns the XMLDecl standalone value of the document as a string, - # if it has been set, otherwise the default standalone value: - # - # d = REXML::Document.new('') - # d.stand_alone? # => "yes" - # d = REXML::Document.new('') - # d.stand_alone? # => nil - # - # @return [Boolean] - # - # source://rexml//lib/rexml/document.rb#305 - def stand_alone?; end - - # :call-seq: - # version -> version_string - # - # Returns the XMLDecl version of this document as a string, - # if it has been set, otherwise the default version: - # - # d = REXML::Document.new('') - # d.version # => "2.0" - # d = REXML::Document.new('') - # d.version # => "1.0" - # - # source://rexml//lib/rexml/document.rb#275 - def version; end - - # :call-seq: - # doc.write(output=$stdout, indent=-1, transtive=false, ie_hack=false, encoding=nil) - # doc.write(options={:output => $stdout, :indent => -1, :transtive => false, :ie_hack => false, :encoding => nil}) - # - # Write the XML tree out, optionally with indent. This writes out the - # entire XML document, including XML declarations, doctype declarations, - # and processing instructions (if any are given). - # - # A controversial point is whether Document should always write the XML - # declaration () whether or not one is given by the - # user (or source document). REXML does not write one if one was not - # specified, because it adds unnecessary bandwidth to applications such - # as XML-RPC. - # - # Accept Nth argument style and options Hash style as argument. - # The recommended style is options Hash style for one or more - # arguments case. - # - # _Examples_ - # Document.new("").write - # - # output = "" - # Document.new("").write(output) - # - # output = "" - # Document.new("").write(:output => output, :indent => 2) - # - # See also the classes in the rexml/formatters package for the proper way - # to change the default formatting of XML output. - # - # _Examples_ - # - # output = "" - # tr = Transitive.new - # tr.write(Document.new(""), output) - # - # output:: - # output an object which supports '<< string'; this is where the - # document will be written. - # indent:: - # An integer. If -1, no indenting will be used; otherwise, the - # indentation will be twice this number of spaces, and children will be - # indented an additional amount. For a value of 3, every item will be - # indented 3 more levels, or 6 more spaces (2 * 3). Defaults to -1 - # transitive:: - # If transitive is true and indent is >= 0, then the output will be - # pretty-printed in such a way that the added whitespace does not affect - # the absolute *value* of the document -- that is, it leaves the value - # and number of Text nodes in the document unchanged. - # ie_hack:: - # This hack inserts a space before the /> on empty tags to address - # a limitation of Internet Explorer. Defaults to false - # Encoding name as String. Change output encoding to specified encoding - # instead of encoding in XML declaration. - # Defaults to nil. It means encoding in XML declaration is used. - # - # source://rexml//lib/rexml/document.rb#365 - def write(*arguments); end - - # :call-seq: - # xml_decl -> xml_decl - # - # Returns the XMLDecl object for the document, if it exists, - # otherwise the default XMLDecl object: - # - # d = REXML::Document.new('') - # d.xml_decl.class # => REXML::XMLDecl - # d.xml_decl.to_s # => "" - # d = REXML::Document.new('') - # d.xml_decl.class # => REXML::XMLDecl - # d.xml_decl.to_s # => "" - # - # source://rexml//lib/rexml/document.rb#258 - def xml_decl; end - - private - - # source://rexml//lib/rexml/document.rb#447 - def build(source); end - - class << self - # Get the entity expansion limit. By default the limit is set to 10000. - # - # Deprecated. Use REXML::Security.entity_expansion_limit= instead. - # - # source://rexml//lib/rexml/document.rb#415 - def entity_expansion_limit; end - - # Set the entity expansion limit. By default the limit is set to 10000. - # - # Deprecated. Use REXML::Security.entity_expansion_limit= instead. - # - # source://rexml//lib/rexml/document.rb#408 - def entity_expansion_limit=(val); end - - # Get the entity expansion limit. By default the limit is set to 10240. - # - # Deprecated. Use REXML::Security.entity_expansion_text_limit instead. - # - # source://rexml//lib/rexml/document.rb#429 - def entity_expansion_text_limit; end - - # Set the entity expansion limit. By default the limit is set to 10240. - # - # Deprecated. Use REXML::Security.entity_expansion_text_limit= instead. - # - # source://rexml//lib/rexml/document.rb#422 - def entity_expansion_text_limit=(val); end - - # source://rexml//lib/rexml/document.rb#401 - def parse_stream(source, listener); end - end -end - -# An \REXML::Element object represents an XML element. -# -# An element: -# -# - Has a name (string). -# - May have a parent (another element). -# - Has zero or more children -# (other elements, text, CDATA, processing instructions, and comments). -# - Has zero or more siblings -# (other elements, text, CDATA, processing instructions, and comments). -# - Has zero or more named attributes. -# -# == In a Hurry? -# -# If you're somewhat familiar with XML -# and have a particular task in mind, -# you may want to see the -# {tasks pages}[../doc/rexml/tasks/tocs/master_toc_rdoc.html], -# and in particular, the -# {tasks page for elements}[../doc/rexml/tasks/tocs/element_toc_rdoc.html]. -# -# === Name -# -# An element has a name, which is initially set when the element is created: -# -# e = REXML::Element.new('foo') -# e.name # => "foo" -# -# The name may be changed: -# -# e.name = 'bar' -# e.name # => "bar" -# -# -# === \Parent -# -# An element may have a parent. -# -# Its parent may be assigned explicitly when the element is created: -# -# e0 = REXML::Element.new('foo') -# e1 = REXML::Element.new('bar', e0) -# e1.parent # => ... -# -# Note: the representation of an element always shows the element's name. -# If the element has children, the representation indicates that -# by including an ellipsis (...). -# -# The parent may be assigned explicitly at any time: -# -# e2 = REXML::Element.new('baz') -# e1.parent = e2 -# e1.parent # => -# -# When an element is added as a child, its parent is set automatically: -# -# e1.add_element(e0) -# e0.parent # => ... -# -# For an element that has no parent, method +parent+ returns +nil+. -# -# === Children -# -# An element has zero or more children. -# The children are an ordered collection -# of all objects whose parent is the element itself. -# -# The children may include any combination of elements, text, comments, -# processing instructions, and CDATA. -# (This example keeps things clean by controlling whitespace -# via a +context+ setting.) -# -# xml_string = <<-EOT -# -# -# text 0 -# -# -# -# -# text 1 -# -# -# -# -# EOT -# context = {ignore_whitespace_nodes: :all, compress_whitespace: :all} -# d = REXML::Document.new(xml_string, context) -# root = d.root -# root.children.size # => 10 -# root.each {|child| p "#{child.class}: #{child}" } -# -# Output: -# -# "REXML::Element: " -# "REXML::Text: \n text 0\n " -# "REXML::Comment: comment 0" -# "REXML::Instruction: " -# "REXML::CData: cdata 0" -# "REXML::Element: " -# "REXML::Text: \n text 1\n " -# "REXML::Comment: comment 1" -# "REXML::Instruction: " -# "REXML::CData: cdata 1" -# -# A child may be added using inherited methods -# Parent#insert_before or Parent#insert_after: -# -# xml_string = '' -# d = REXML::Document.new(xml_string) -# root = d.root -# c = d.root[1] # => -# root.insert_before(c, REXML::Element.new('b')) -# root.to_a # => [, , , ] -# -# A child may be replaced using Parent#replace_child: -# -# root.replace_child(c, REXML::Element.new('x')) -# root.to_a # => [, , , ] -# -# A child may be removed using Parent#delete: -# -# x = root[2] # => -# root.delete(x) -# root.to_a # => [, , ] -# -# === Siblings -# -# An element has zero or more siblings, -# which are the other children of the element's parent. -# -# In the example above, element +ele_1+ is between a CDATA sibling -# and a text sibling: -# -# ele_1 = root[5] # => -# ele_1.previous_sibling # => "cdata 0" -# ele_1.next_sibling # => "\n text 1\n " -# -# === \Attributes -# -# An element has zero or more named attributes. -# -# A new element has no attributes: -# -# e = REXML::Element.new('foo') -# e.attributes # => {} -# -# Attributes may be added: -# -# e.add_attribute('bar', 'baz') -# e.add_attribute('bat', 'bam') -# e.attributes.size # => 2 -# e['bar'] # => "baz" -# e['bat'] # => "bam" -# -# An existing attribute may be modified: -# -# e.add_attribute('bar', 'bad') -# e.attributes.size # => 2 -# e['bar'] # => "bad" -# -# An existing attribute may be deleted: -# -# e.delete_attribute('bar') -# e.attributes.size # => 1 -# e['bar'] # => nil -# -# == What's Here -# -# To begin with, what's elsewhere? -# -# \Class \REXML::Element inherits from its ancestor classes: -# -# - REXML::Child -# - REXML::Parent -# -# \REXML::Element itself and its ancestors also include modules: -# -# - {Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html] -# - REXML::Namespace -# - REXML::Node -# - REXML::XMLTokens -# -# === Methods for Creating an \Element -# -# ::new:: Returns a new empty element. -# #clone:: Returns a clone of another element. -# -# === Methods for Attributes -# -# {[attribute_name]}[#method-i-5B-5D]:: Returns an attribute value. -# #add_attribute:: Adds a new attribute. -# #add_attributes:: Adds multiple new attributes. -# #attribute:: Returns the attribute value for a given name and optional namespace. -# #delete_attribute:: Removes an attribute. -# -# === Methods for Children -# -# {[index]}[#method-i-5B-5D]:: Returns the child at the given offset. -# #add_element:: Adds an element as the last child. -# #delete_element:: Deletes a child element. -# #each_element:: Calls the given block with each child element. -# #each_element_with_attribute:: Calls the given block with each child element -# that meets given criteria, -# which can include the attribute name. -# #each_element_with_text:: Calls the given block with each child element -# that meets given criteria, -# which can include text. -# #get_elements:: Returns an array of element children that match a given xpath. -# -# === Methods for \Text Children -# -# #add_text:: Adds a text node to the element. -# #get_text:: Returns a text node that meets specified criteria. -# #text:: Returns the text string from the first node that meets specified criteria. -# #texts:: Returns an array of the text children of the element. -# #text=:: Adds, removes, or replaces the first text child of the element -# -# === Methods for Other Children -# -# #cdatas:: Returns an array of the cdata children of the element. -# #comments:: Returns an array of the comment children of the element. -# #instructions:: Returns an array of the instruction children of the element. -# -# === Methods for Namespaces -# -# #add_namespace:: Adds a namespace to the element. -# #delete_namespace:: Removes a namespace from the element. -# #namespace:: Returns the string namespace URI for the element. -# #namespaces:: Returns a hash of all defined namespaces in the element. -# #prefixes:: Returns an array of the string prefixes (names) -# of all defined namespaces in the element -# -# === Methods for Querying -# -# #document:: Returns the document, if any, that the element belongs to. -# #root:: Returns the most distant element (not document) ancestor of the element. -# #root_node:: Returns the most distant ancestor of the element. -# #xpath:: Returns the string xpath to the element -# relative to the most distant parent -# #has_attributes?:: Returns whether the element has attributes. -# #has_elements?:: Returns whether the element has elements. -# #has_text?:: Returns whether the element has text. -# #next_element:: Returns the next sibling that is an element. -# #previous_element:: Returns the previous sibling that is an element. -# #raw:: Returns whether raw mode is set for the element. -# #whitespace:: Returns whether whitespace is respected for the element. -# #ignore_whitespace_nodes:: Returns whether whitespace nodes -# are to be ignored for the element. -# #node_type:: Returns symbol :element. -# -# === One More Method -# -# #inspect:: Returns a string representation of the element. -# -# === Accessors -# -# #elements:: Returns the REXML::Elements object for the element. -# #attributes:: Returns the REXML::Attributes object for the element. -# #context:: Returns or sets the context hash for the element. -# -# source://rexml//lib/rexml/element.rb#279 -class REXML::Element < ::REXML::Parent - include ::REXML::XMLTokens - include ::REXML::Namespace - - # :call-seq: - # Element.new(name = 'UNDEFINED', parent = nil, context = nil) -> new_element - # Element.new(element, parent = nil, context = nil) -> new_element - # - # Returns a new \REXML::Element object. - # - # When no arguments are given, - # returns an element with name 'UNDEFINED': - # - # e = REXML::Element.new # => - # e.class # => REXML::Element - # e.name # => "UNDEFINED" - # - # When only argument +name+ is given, - # returns an element of the given name: - # - # REXML::Element.new('foo') # => - # - # When only argument +element+ is given, it must be an \REXML::Element object; - # returns a shallow copy of the given element: - # - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new(e0) # => - # - # When argument +parent+ is also given, it must be an REXML::Parent object: - # - # e = REXML::Element.new('foo', REXML::Parent.new) - # e.parent # => #]> - # - # When argument +context+ is also given, it must be a hash - # representing the context for the element; - # see {Element Context}[../doc/rexml/context_rdoc.html]: - # - # e = REXML::Element.new('foo', nil, {raw: :all}) - # e.context # => {:raw=>:all} - # - # @return [Element] a new instance of Element - # - # source://rexml//lib/rexml/element.rb#327 - def initialize(arg = T.unsafe(nil), parent = T.unsafe(nil), context = T.unsafe(nil)); end - - # :call-seq: - # [index] -> object - # [attr_name] -> attr_value - # [attr_sym] -> attr_value - # - # With integer argument +index+ given, - # returns the child at offset +index+, or +nil+ if none: - # - # d = REXML::Document.new '>textmore' - # root = d.root - # (0..root.size).each do |index| - # node = root[index] - # p "#{index}: #{node} (#{node.class})" - # end - # - # Output: - # - # "0: (REXML::Element)" - # "1: text (REXML::Text)" - # "2: (REXML::Element)" - # "3: more (REXML::Text)" - # "4: (REXML::Element)" - # "5: (NilClass)" - # - # With string argument +attr_name+ given, - # returns the string value for the given attribute name if it exists, - # otherwise +nil+: - # - # d = REXML::Document.new('') - # root = d.root - # root['attr'] # => "value" - # root['nosuch'] # => nil - # - # With symbol argument +attr_sym+ given, - # returns [attr_sym.to_s]: - # - # root[:attr] # => "value" - # root[:nosuch] # => nil - # - # source://rexml//lib/rexml/element.rb#1245 - def [](name_or_index); end - - # :call-seq: - # add_attribute(name, value) -> value - # add_attribute(attribute) -> attribute - # - # Adds an attribute to this element, overwriting any existing attribute - # by the same name. - # - # With string argument +name+ and object +value+ are given, - # adds the attribute created with that name and value: - # - # e = REXML::Element.new - # e.add_attribute('attr', 'value') # => "value" - # e['attr'] # => "value" - # e.add_attribute('attr', 'VALUE') # => "VALUE" - # e['attr'] # => "VALUE" - # - # With only attribute object +attribute+ given, - # adds the given attribute: - # - # a = REXML::Attribute.new('attr', 'value') - # e.add_attribute(a) # => attr='value' - # e['attr'] # => "value" - # a = REXML::Attribute.new('attr', 'VALUE') - # e.add_attribute(a) # => attr='VALUE' - # e['attr'] # => "VALUE" - # - # source://rexml//lib/rexml/element.rb#1349 - def add_attribute(key, value = T.unsafe(nil)); end - - # :call-seq: - # add_attributes(hash) -> hash - # add_attributes(array) - # - # Adds zero or more attributes to the element; - # returns the argument. - # - # If hash argument +hash+ is given, - # each key must be a string; - # adds each attribute created with the key/value pair: - # - # e = REXML::Element.new - # h = {'foo' => 'bar', 'baz' => 'bat'} - # e.add_attributes(h) - # - # If argument +array+ is given, - # each array member must be a 2-element array [name, value]; - # each name must be a string: - # - # e = REXML::Element.new - # a = [['foo' => 'bar'], ['baz' => 'bat']] - # e.add_attributes(a) - # - # source://rexml//lib/rexml/element.rb#1380 - def add_attributes(hash); end - - # :call-seq: - # add_element(name, attributes = nil) -> new_element - # add_element(element, attributes = nil) -> element - # - # Adds a child element, optionally setting attributes - # on the added element; returns the added element. - # - # With string argument +name+, creates a new element with that name - # and adds the new element as a child: - # - # e0 = REXML::Element.new('foo') - # e0.add_element('bar') - # e0[0] # => - # - # - # With argument +name+ and hash argument +attributes+, - # sets attributes on the new element: - # - # e0.add_element('baz', {'bat' => '0', 'bam' => '1'}) - # e0[1] # => - # - # With element argument +element+, adds that element as a child: - # - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new('bar') - # e0.add_element(e1) - # e0[0] # => - # - # With argument +element+ and hash argument +attributes+, - # sets attributes on the added element: - # - # e0.add_element(e1, {'bat' => '0', 'bam' => '1'}) - # e0[1] # => - # - # source://rexml//lib/rexml/element.rb#731 - def add_element(element, attrs = T.unsafe(nil)); end - - # :call-seq: - # add_namespace(prefix, uri = nil) -> self - # - # Adds a namespace to the element; returns +self+. - # - # With the single argument +prefix+, - # adds a namespace using the given +prefix+ and the namespace URI: - # - # e = REXML::Element.new('foo') - # e.add_namespace('bar') - # e.namespaces # => {"xmlns"=>"bar"} - # - # With both arguments +prefix+ and +uri+ given, - # adds a namespace using both arguments: - # - # e.add_namespace('baz', 'bat') - # e.namespaces # => {"xmlns"=>"bar", "baz"=>"bat"} - # - # source://rexml//lib/rexml/element.rb#654 - def add_namespace(prefix, uri = T.unsafe(nil)); end - - # :call-seq: - # add_text(string) -> nil - # add_text(text_node) -> self - # - # Adds text to the element. - # - # When string argument +string+ is given, returns +nil+. - # - # If the element has no child text node, - # creates a \REXML::Text object using the string, - # honoring the current settings for whitespace and raw, - # then adds that node to the element: - # - # d = REXML::Document.new('') - # a = d.root - # a.add_text('foo') - # a.to_a # => [, "foo"] - # - # If the element has child text nodes, - # appends the string to the _last_ text node: - # - # d = REXML::Document.new('foobar') - # a = d.root - # a.add_text('baz') - # a.to_a # => ["foo", , "barbaz"] - # a.add_text('baz') - # a.to_a # => ["foo", , "barbazbaz"] - # - # When text node argument +text_node+ is given, - # appends the node as the last text node in the element; - # returns +self+: - # - # d = REXML::Document.new('foobar') - # a = d.root - # a.add_text(REXML::Text.new('baz')) - # a.to_a # => ["foo", , "bar", "baz"] - # a.add_text(REXML::Text.new('baz')) - # a.to_a # => ["foo", , "bar", "baz", "baz"] - # - # source://rexml//lib/rexml/element.rb#1146 - def add_text(text); end - - # :call-seq: - # attribute(name, namespace = nil) - # - # Returns the string value for the given attribute name. - # - # With only argument +name+ given, - # returns the value of the named attribute if it exists, otherwise +nil+: - # - # xml_string = <<-EOT - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # root = d.root - # a = root[1] # => - # a.attribute('attr') # => attr='value' - # a.attribute('nope') # => nil - # - # With arguments +name+ and +namespace+ given, - # returns the value of the named attribute if it exists, otherwise +nil+: - # - # xml_string = "" - # document = REXML::Document.new(xml_string) - # document.root.attribute("x") # => x='x' - # document.root.attribute("x", "a") # => a:x='a:x' - # - # source://rexml//lib/rexml/element.rb#1286 - def attribute(name, namespace = T.unsafe(nil)); end - - # Mechanisms for accessing attributes and child elements of this - # element. - # - # source://rexml//lib/rexml/element.rb#286 - def attributes; end - - # :call-seq: - # cdatas -> array_of_cdata_children - # - # Returns a frozen array of the REXML::CData children of the element: - # - # xml_string = <<-EOT - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # cds = d.root.cdatas # => ["foo", "bar"] - # cds.frozen? # => true - # cds.map {|cd| cd.class } # => [REXML::CData, REXML::CData] - # - # source://rexml//lib/rexml/element.rb#1424 - def cdatas; end - - # :call-seq: - # clone -> new_element - # - # Returns a shallow copy of the element, containing the name and attributes, - # but not the parent or children: - # - # e = REXML::Element.new('foo') - # e.add_attributes({'bar' => 0, 'baz' => 1}) - # e.clone # => - # - # source://rexml//lib/rexml/element.rb#391 - def clone; end - - # :call-seq: - # comments -> array_of_comment_children - # - # Returns a frozen array of the REXML::Comment children of the element: - # - # xml_string = <<-EOT - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # cs = d.root.comments - # cs.frozen? # => true - # cs.map {|c| c.class } # => [REXML::Comment, REXML::Comment] - # cs.map {|c| c.to_s } # => ["foo", "bar"] - # - # source://rexml//lib/rexml/element.rb#1445 - def comments; end - - # The context holds information about the processing environment, such as - # whitespace handling. - # - # source://rexml//lib/rexml/element.rb#289 - def context; end - - # The context holds information about the processing environment, such as - # whitespace handling. - # - # source://rexml//lib/rexml/element.rb#289 - def context=(_arg0); end - - # :call-seq: - # delete_attribute(name) -> removed_attribute or nil - # - # Removes a named attribute if it exists; - # returns the removed attribute if found, otherwise +nil+: - # - # e = REXML::Element.new('foo') - # e.add_attribute('bar', 'baz') - # e.delete_attribute('bar') # => - # e.delete_attribute('bar') # => nil - # - # source://rexml//lib/rexml/element.rb#1399 - def delete_attribute(key); end - - # :call-seq: - # delete_element(index) -> removed_element or nil - # delete_element(element) -> removed_element or nil - # delete_element(xpath) -> removed_element or nil - # - # Deletes a child element. - # - # When 1-based integer argument +index+ is given, - # removes and returns the child element at that offset if it exists; - # indexing does not include text nodes; - # returns +nil+ if the element does not exist: - # - # d = REXML::Document.new 'text' - # a = d.root # => ... - # a.delete_element(1) # => - # a.delete_element(1) # => - # a.delete_element(1) # => nil - # - # When element argument +element+ is given, - # removes and returns that child element if it exists, - # otherwise returns +nil+: - # - # d = REXML::Document.new 'text' - # a = d.root # => ... - # c = a[2] # => - # a.delete_element(c) # => - # a.delete_element(c) # => nil - # - # When xpath argument +xpath+ is given, - # removes and returns the element at xpath if it exists, - # otherwise returns +nil+: - # - # d = REXML::Document.new 'text' - # a = d.root # => ... - # a.delete_element('//c') # => - # a.delete_element('//c') # => nil - # - # source://rexml//lib/rexml/element.rb#777 - def delete_element(element); end - - # :call-seq: - # delete_namespace(namespace = 'xmlns') -> self - # - # Removes a namespace from the element. - # - # With no argument, removes the default namespace: - # - # d = REXML::Document.new "" - # d.to_s # => "" - # d.root.delete_namespace # => - # d.to_s # => "" - # - # With argument +namespace+, removes the specified namespace: - # - # d.root.delete_namespace('foo') - # d.to_s # => "" - # - # Does nothing if no such namespace is found: - # - # d.root.delete_namespace('nosuch') - # d.to_s # => "" - # - # source://rexml//lib/rexml/element.rb#686 - def delete_namespace(namespace = T.unsafe(nil)); end - - # :call-seq: - # document -> document or nil - # - # If the element is part of a document, returns that document: - # - # d = REXML::Document.new('') - # top_element = d.first - # child = top_element.first - # top_element.document == d # => true - # child.document == d # => true - # - # If the element is not part of a document, returns +nil+: - # - # REXML::Element.new.document # => nil - # - # For a document, returns +self+: - # - # d.document == d # => true - # - # Related: #root, #root_node. - # - # source://rexml//lib/rexml/element.rb#478 - def document; end - - # :call-seq: - # each_element {|e| ... } - # - # Calls the given block with each child element: - # - # d = REXML::Document.new 'bbd' - # a = d.root - # a.each_element {|e| p e } - # - # Output: - # - # ... - # ... - # ... - # - # - # source://rexml//lib/rexml/element.rb#929 - def each_element(xpath = T.unsafe(nil), &block); end - - # :call-seq: - # each_element_with_attribute(attr_name, value = nil, max = 0, xpath = nil) {|e| ... } - # - # Calls the given block with each child element that meets given criteria. - # - # When only string argument +attr_name+ is given, - # calls the block with each child element that has that attribute: - # - # d = REXML::Document.new '' - # a = d.root - # a.each_element_with_attribute('id') {|e| p e } - # - # Output: - # - # - # - # - # - # With argument +attr_name+ and string argument +value+ given, - # calls the block with each child element that has that attribute - # with that value: - # - # a.each_element_with_attribute('id', '1') {|e| p e } - # - # Output: - # - # - # - # - # With arguments +attr_name+, +value+, and integer argument +max+ given, - # calls the block with at most +max+ child elements: - # - # a.each_element_with_attribute('id', '1', 1) {|e| p e } - # - # Output: - # - # - # - # With all arguments given, including +xpath+, - # calls the block with only those child elements - # that meet the first three criteria, - # and also match the given +xpath+: - # - # a.each_element_with_attribute('id', '1', 2, '//d') {|e| p e } - # - # Output: - # - # - # - # source://rexml//lib/rexml/element.rb#846 - def each_element_with_attribute(key, value = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end - - # :call-seq: - # each_element_with_text(text = nil, max = 0, xpath = nil) {|e| ... } - # - # Calls the given block with each child element that meets given criteria. - # - # With no arguments, calls the block with each child element that has text: - # - # d = REXML::Document.new 'bbd' - # a = d.root - # a.each_element_with_text {|e| p e } - # - # Output: - # - # ... - # ... - # ... - # - # With the single string argument +text+, - # calls the block with each element that has exactly that text: - # - # a.each_element_with_text('b') {|e| p e } - # - # Output: - # - # ... - # ... - # - # With argument +text+ and integer argument +max+, - # calls the block with at most +max+ elements: - # - # a.each_element_with_text('b', 1) {|e| p e } - # - # Output: - # - # ... - # - # With all arguments given, including +xpath+, - # calls the block with only those child elements - # that meet the first two criteria, - # and also match the given +xpath+: - # - # a.each_element_with_text('b', 2, '//c') {|e| p e } - # - # Output: - # - # ... - # - # source://rexml//lib/rexml/element.rb#903 - def each_element_with_text(text = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end - - # Mechanisms for accessing attributes and child elements of this - # element. - # - # source://rexml//lib/rexml/element.rb#286 - def elements; end - - # :call-seq: - # get_elements(xpath) - # - # Returns an array of the elements that match the given +xpath+: - # - # xml_string = <<-EOT - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # d.root.get_elements('//a') # => [ ... , ] - # - # source://rexml//lib/rexml/element.rb#948 - def get_elements(xpath); end - - # :call-seq: - # get_text(xpath = nil) -> text_node or nil - # - # Returns the first text node child in a specified element, if it exists, - # +nil+ otherwise. - # - # With no argument, returns the first text node from +self+: - # - # d = REXML::Document.new "

some text this is bold! more text

" - # d.root.get_text.class # => REXML::Text - # d.root.get_text # => "some text " - # - # With argument +xpath+, returns the first text node from the element - # that matches +xpath+: - # - # d.root.get_text(1) # => "this is bold!" - # - # source://rexml//lib/rexml/element.rb#1052 - def get_text(path = T.unsafe(nil)); end - - # :call-seq: - # has_attributes? -> true or false - # - # Returns +true+ if the element has attributes, +false+ otherwise: - # - # d = REXML::Document.new('
') - # a, b = *d.root - # a.has_attributes? # => true - # b.has_attributes? # => false - # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#1319 - def has_attributes?; end - - # :call-seq: - # has_elements? - # - # Returns +true+ if the element has one or more element children, - # +false+ otherwise: - # - # d = REXML::Document.new 'text' - # a = d.root # => ... - # a.has_elements? # => true - # b = a[0] # => - # b.has_elements? # => false - # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#793 - def has_elements?; end - - # :call-seq: - # has_text? -> true or false - # - # Returns +true if the element has one or more text noded, - # +false+ otherwise: - # - # d = REXML::Document.new 'text' - # a = d.root - # a.has_text? # => true - # b = a[0] - # b.has_text? # => false - # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#1001 - def has_text?; end - - # :call-seq: - # ignore_whitespace_nodes - # - # Returns +true+ if whitespace nodes are ignored for the element. - # - # See {Element Context}[../doc/rexml/context_rdoc.html]. - # - # source://rexml//lib/rexml/element.rb#516 - def ignore_whitespace_nodes; end - - # :call-seq: - # inspect -> string - # - # Returns a string representation of the element. - # - # For an element with no attributes and no children, shows the element name: - # - # REXML::Element.new.inspect # => "" - # - # Shows attributes, if any: - # - # e = REXML::Element.new('foo') - # e.add_attributes({'bar' => 0, 'baz' => 1}) - # e.inspect # => "" - # - # Shows an ellipsis (...), if there are child elements: - # - # e.add_element(REXML::Element.new('bar')) - # e.add_element(REXML::Element.new('baz')) - # e.inspect # => " ... " - # - # source://rexml//lib/rexml/element.rb#366 - def inspect; end - - # :call-seq: - # instructions -> array_of_instruction_children - # - # Returns a frozen array of the REXML::Instruction children of the element: - # - # xml_string = <<-EOT - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # is = d.root.instructions - # is.frozen? # => true - # is.map {|i| i.class } # => [REXML::Instruction, REXML::Instruction] - # is.map {|i| i.to_s } # => ["", ""] - # - # source://rexml//lib/rexml/element.rb#1466 - def instructions; end - - # :call-seq: - # namespace(prefix = nil) -> string_uri or nil - # - # Returns the string namespace URI for the element, - # possibly deriving from one of its ancestors. - # - # xml_string = <<-EOT - # - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # b = d.elements['//b'] - # b.namespace # => "1" - # b.namespace('y') # => "2" - # b.namespace('nosuch') # => nil - # - # source://rexml//lib/rexml/element.rb#621 - def namespace(prefix = T.unsafe(nil)); end - - # :call-seq: - # namespaces -> array_of_namespace_names - # - # Returns a hash of all defined namespaces - # in the element and its ancestors: - # - # xml_string = <<-EOT - # - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # d.elements['//a'].namespaces # => {"x"=>"1", "y"=>"2"} - # d.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"} - # d.elements['//c'].namespaces # => {"x"=>"1", "y"=>"2", "z"=>"3"} - # - # source://rexml//lib/rexml/element.rb#594 - def namespaces; end - - # :call-seq: - # next_element - # - # Returns the next sibling that is an element if it exists, - # +niL+ otherwise: - # - # d = REXML::Document.new 'text' - # d.root.elements['b'].next_element #-> - # d.root.elements['c'].next_element #-> nil - # - # source://rexml//lib/rexml/element.rb#962 - def next_element; end - - # :call-seq: - # node_type -> :element - # - # Returns symbol :element: - # - # d = REXML::Document.new('') - # a = d.root # => - # a.node_type # => :element - # - # source://rexml//lib/rexml/element.rb#1167 - def node_type; end - - # :call-seq: - # prefixes -> array_of_namespace_prefixes - # - # Returns an array of the string prefixes (names) of all defined namespaces - # in the element and its ancestors: - # - # xml_string = <<-EOT - # - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string, {compress_whitespace: :all}) - # d.elements['//a'].prefixes # => ["x", "y"] - # d.elements['//b'].prefixes # => ["x", "y"] - # d.elements['//c'].prefixes # => ["x", "y", "z"] - # - # source://rexml//lib/rexml/element.rb#568 - def prefixes; end - - # :call-seq: - # previous_element - # - # Returns the previous sibling that is an element if it exists, - # +niL+ otherwise: - # - # d = REXML::Document.new 'text' - # d.root.elements['c'].previous_element #-> - # d.root.elements['b'].previous_element #-> nil - # - # source://rexml//lib/rexml/element.rb#978 - def previous_element; end - - # :call-seq: - # raw - # - # Returns +true+ if raw mode is set for the element. - # - # See {Element Context}[../doc/rexml/context_rdoc.html]. - # - # The evaluation is tested against +expanded_name+, and so is namespace - # sensitive. - # - # source://rexml//lib/rexml/element.rb#536 - def raw; end - - # :call-seq: - # root -> element - # - # Returns the most distant _element_ (not document) ancestor of the element: - # - # d = REXML::Document.new('') - # top_element = d.first - # child = top_element.first - # top_element.root == top_element # => true - # child.root == top_element # => true - # - # For a document, returns the topmost element: - # - # d.root == top_element # => true - # - # Related: #root_node, #document. - # - # source://rexml//lib/rexml/element.rb#451 - def root; end - - # :call-seq: - # root_node -> document or element - # - # Returns the most distant ancestor of +self+. - # - # When the element is part of a document, - # returns the root node of the document. - # Note that the root node is different from the document element; - # in this example +a+ is document element and the root node is its parent: - # - # d = REXML::Document.new('') - # top_element = d.first # => ... - # child = top_element.first # => ... - # d.root_node == d # => true - # top_element.root_node == d # => true - # child.root_node == d # => true - # - # When the element is not part of a document, but does have ancestor elements, - # returns the most distant ancestor element: - # - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new('bar') - # e1.parent = e0 - # e2 = REXML::Element.new('baz') - # e2.parent = e1 - # e2.root_node == e0 # => true - # - # When the element has no ancestor elements, - # returns +self+: - # - # e = REXML::Element.new('foo') - # e.root_node == e # => true - # - # Related: #root, #document. - # - # source://rexml//lib/rexml/element.rb#430 - def root_node; end - - # :call-seq: - # text(xpath = nil) -> text_string or nil - # - # Returns the text string from the first text node child - # in a specified element, if it exists, # +nil+ otherwise. - # - # With no argument, returns the text from the first text node in +self+: - # - # d = REXML::Document.new "

some text this is bold! more text

" - # d.root.text.class # => String - # d.root.text # => "some text " - # - # With argument +xpath+, returns text from the the first text node - # in the element that matches +xpath+: - # - # d.root.text(1) # => "this is bold!" - # - # Note that an element may have multiple text nodes, - # possibly separated by other non-text children, as above. - # Even so, the returned value is the string text from the first such node. - # - # Note also that the text note is retrieved by method get_text, - # and so is always normalized text. - # - # source://rexml//lib/rexml/element.rb#1029 - def text(path = T.unsafe(nil)); end - - # :call-seq: - # text = string -> string - # text = nil -> nil - # - # Adds, replaces, or removes the first text node child in the element. - # - # With string argument +string+, - # creates a new \REXML::Text node containing that string, - # honoring the current settings for whitespace and row, - # then places the node as the first text child in the element; - # returns +string+. - # - # If the element has no text child, the text node is added: - # - # d = REXML::Document.new '
' - # d.root.text = 'foo' #-> 'foo' - # - # If the element has a text child, it is replaced: - # - # d.root.text = 'bar' #-> 'bar' - # - # With argument +nil+, removes the first text child: - # - # d.root.text = nil #-> '' - # - # source://rexml//lib/rexml/element.rb#1088 - def text=(text); end - - # :call-seq: - # texts -> array_of_text_children - # - # Returns a frozen array of the REXML::Text children of the element: - # - # xml_string = 'textmore' - # d = REXML::Document.new(xml_string) - # ts = d.root.texts - # ts.frozen? # => true - # ts.map {|t| t.class } # => [REXML::Text, REXML::Text] - # ts.map {|t| t.to_s } # => ["text", "more"] - # - # source://rexml//lib/rexml/element.rb#1482 - def texts; end - - # :call-seq: - # whitespace - # - # Returns +true+ if whitespace is respected for this element, - # +false+ otherwise. - # - # See {Element Context}[../doc/rexml/context_rdoc.html]. - # - # The evaluation is tested against the element's +expanded_name+, - # and so is namespace-sensitive. - # - # source://rexml//lib/rexml/element.rb#493 - def whitespace; end - - # == DEPRECATED - # See REXML::Formatters - # - # Writes out this element, and recursively, all children. - # output:: - # output an object which supports '<< string'; this is where the - # document will be written. - # indent:: - # An integer. If -1, no indenting will be used; otherwise, the - # indentation will be this number of spaces, and children will be - # indented an additional amount. Defaults to -1 - # transitive:: - # If transitive is true and indent is >= 0, then the output will be - # pretty-printed in such a way that the added whitespace does not affect - # the parse tree of the document - # ie_hack:: - # This hack inserts a space before the /> on empty tags to address - # a limitation of Internet Explorer. Defaults to false - # - # out = '' - # doc.write( out ) #-> doc is written to the string 'out' - # doc.write( $stdout ) #-> doc written to the console - # - # source://rexml//lib/rexml/element.rb#1508 - def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - - # :call-seq: - # xpath -> string_xpath - # - # Returns the string xpath to the element - # relative to the most distant parent: - # - # d = REXML::Document.new('') - # a = d.root # => ... - # b = a[0] # => ... - # c = b[0] # => - # d.xpath # => "" - # a.xpath # => "/a" - # b.xpath # => "/a/b" - # c.xpath # => "/a/b/c" - # - # If there is no parent, returns the expanded name of the element: - # - # e = REXML::Element.new('foo') - # e.xpath # => "foo" - # - # source://rexml//lib/rexml/element.rb#1191 - def xpath; end - - private - - # source://rexml//lib/rexml/element.rb#1525 - def __to_xpath_helper(node); end - - # A private helper method - # - # source://rexml//lib/rexml/element.rb#1540 - def each_with_something(test, max = T.unsafe(nil), name = T.unsafe(nil)); end -end - -# source://rexml//lib/rexml/doctype.rb#261 -class REXML::ElementDecl < ::REXML::Declaration - # @return [ElementDecl] a new instance of ElementDecl - # - # source://rexml//lib/rexml/doctype.rb#262 - def initialize(src); end -end - -# A class which provides filtering of children for Elements, and -# XPath search support. You are expected to only encounter this class as -# the element.elements object. Therefore, you are -# _not_ expected to instantiate this yourself. -# -# xml_string = <<-EOT -# -# -# -# Everyday Italian -# Giada De Laurentiis -# 2005 -# 30.00 -# -# -# Harry Potter -# J K. Rowling -# 2005 -# 29.99 -# -# -# XQuery Kick Start -# James McGovern -# Per Bothner -# Kurt Cagle -# James Linn -# Vaidyanathan Nagarajan -# 2003 -# 49.99 -# -# -# Learning XML -# Erik T. Ray -# 2003 -# 39.95 -# -# -# EOT -# d = REXML::Document.new(xml_string) -# elements = d.root.elements -# elements # => # ... > -# -# source://rexml//lib/rexml/element.rb#1595 -class REXML::Elements - include ::Enumerable - - # :call-seq: - # new(parent) -> new_elements_object - # - # Returns a new \Elements object with the given +parent+. - # Does _not_ assign parent.elements = self: - # - # d = REXML::Document.new(xml_string) - # eles = REXML::Elements.new(d.root) - # eles # => # ... > - # eles == d.root.elements # => false - # - # @return [Elements] a new instance of Elements - # - # source://rexml//lib/rexml/element.rb#1608 - def initialize(parent); end - - # :call-seq: - # add -> new_element - # add(name) -> new_element - # add(element) -> element - # - # Adds an element; returns the element added. - # - # With no argument, creates and adds a new element. - # The new element has: - # - # - No name. - # - \Parent from the \Elements object. - # - Context from the that parent. - # - # Example: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # parent = elements.parent # => ... - # parent.context = {raw: :all} - # elements.size # => 4 - # new_element = elements.add # => - # elements.size # => 5 - # new_element.name # => nil - # new_element.parent # => ... - # new_element.context # => {:raw=>:all} - # - # With string argument +name+, creates and adds a new element. - # The new element has: - # - # - Name +name+. - # - \Parent from the \Elements object. - # - Context from the that parent. - # - # Example: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # parent = elements.parent # => ... - # parent.context = {raw: :all} - # elements.size # => 4 - # new_element = elements.add('foo') # => - # elements.size # => 5 - # new_element.name # => "foo" - # new_element.parent # => ... - # new_element.context # => {:raw=>:all} - # - # With argument +element+, - # creates and adds a clone of the given +element+. - # The new element has name, parent, and context from the given +element+. - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.size # => 4 - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new('bar', e0, {raw: :all}) - # element = elements.add(e1) # => - # elements.size # => 5 - # element.name # => "bar" - # element.parent # => ... - # element.context # => {:raw=>:all} - # - # source://rexml//lib/rexml/element.rb#1925 - def <<(element = T.unsafe(nil)); end - - # :call-seq: - # elements[index] -> element or nil - # elements[xpath] -> element or nil - # elements[n, name] -> element or nil - # - # Returns the first \Element object selected by the arguments, - # if any found, or +nil+ if none found. - # - # Notes: - # - The +index+ is 1-based, not 0-based, so that: - # - The first element has index 1 - # - The _nth_ element has index +n+. - # - The selection ignores non-\Element nodes. - # - # When the single argument +index+ is given, - # returns the element given by the index, if any; otherwise, +nil+: - # - # d = REXML::Document.new(xml_string) - # eles = d.root.elements - # eles # => # ... > - # eles[1] # => ... - # eles.size # => 4 - # eles[4] # => ... - # eles[5] # => nil - # - # The node at this index is not an \Element, and so is not returned: - # - # eles = d.root.first.first # => ... </> - # eles.to_a # => ["Everyday Italian"] - # eles[1] # => nil - # - # When the single argument +xpath+ is given, - # returns the first element found via that +xpath+, if any; otherwise, +nil+: - # - # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> - # eles['/bookstore'] # => <bookstore> ... </> - # eles['//book'] # => <book category='cooking'> ... </> - # eles['//book [@category="children"]'] # => <book category='children'> ... </> - # eles['/nosuch'] # => nil - # eles['//nosuch'] # => nil - # eles['//book [@category="nosuch"]'] # => nil - # eles['.'] # => <bookstore> ... </> - # eles['..'].class # => REXML::Document - # - # With arguments +n+ and +name+ given, - # returns the _nth_ found element that has the given +name+, - # or +nil+ if there is no such _nth_ element: - # - # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> - # eles[1, 'book'] # => <book category='cooking'> ... </> - # eles[4, 'book'] # => <book category='web' cover='paperback'> ... </> - # eles[5, 'book'] # => nil - # - # source://rexml//lib/rexml/element.rb#1680 - def [](index, name = T.unsafe(nil)); end - - # :call-seq: - # elements[] = index, replacement_element -> replacement_element or nil - # - # Replaces or adds an element. - # - # When <tt>eles[index]</tt> exists, replaces it with +replacement_element+ - # and returns +replacement_element+: - # - # d = REXML::Document.new(xml_string) - # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> - # eles[1] # => <book category='cooking'> ... </> - # eles[1] = REXML::Element.new('foo') - # eles[1] # => <foo/> - # - # Does nothing (or raises an exception) - # if +replacement_element+ is not an \Element: - # eles[2] # => <book category='web' cover='paperback'> ... </> - # eles[2] = REXML::Text.new('bar') - # eles[2] # => <book category='web' cover='paperback'> ... </> - # - # When <tt>eles[index]</tt> does not exist, - # adds +replacement_element+ to the element and returns - # - # d = REXML::Document.new(xml_string) - # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> - # eles.size # => 4 - # eles[50] = REXML::Element.new('foo') # => <foo/> - # eles.size # => 5 - # eles[5] # => <foo/> - # - # Does nothing (or raises an exception) - # if +replacement_element+ is not an \Element: - # - # eles[50] = REXML::Text.new('bar') # => "bar" - # eles.size # => 5 - # - # source://rexml//lib/rexml/element.rb#1735 - def []=(index, element); end - - # :call-seq: - # add -> new_element - # add(name) -> new_element - # add(element) -> element - # - # Adds an element; returns the element added. - # - # With no argument, creates and adds a new element. - # The new element has: - # - # - No name. - # - \Parent from the \Elements object. - # - Context from the that parent. - # - # Example: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # parent = elements.parent # => <bookstore> ... </> - # parent.context = {raw: :all} - # elements.size # => 4 - # new_element = elements.add # => </> - # elements.size # => 5 - # new_element.name # => nil - # new_element.parent # => <bookstore> ... </> - # new_element.context # => {:raw=>:all} - # - # With string argument +name+, creates and adds a new element. - # The new element has: - # - # - Name +name+. - # - \Parent from the \Elements object. - # - Context from the that parent. - # - # Example: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # parent = elements.parent # => <bookstore> ... </> - # parent.context = {raw: :all} - # elements.size # => 4 - # new_element = elements.add('foo') # => <foo/> - # elements.size # => 5 - # new_element.name # => "foo" - # new_element.parent # => <bookstore> ... </> - # new_element.context # => {:raw=>:all} - # - # With argument +element+, - # creates and adds a clone of the given +element+. - # The new element has name, parent, and context from the given +element+. - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.size # => 4 - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new('bar', e0, {raw: :all}) - # element = elements.add(e1) # => <bar/> - # elements.size # => 5 - # element.name # => "bar" - # element.parent # => <bookstore> ... </> - # element.context # => {:raw=>:all} - # - # source://rexml//lib/rexml/element.rb#1925 - def add(element = T.unsafe(nil)); end - - # :call-seq: - # collect(xpath = nil) {|element| ... } -> array - # - # Iterates over the elements; returns the array of block return values. - # - # With no argument, iterates over all elements: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.collect {|element| element.size } # => [9, 9, 17, 9] - # - # With argument +xpath+, iterates over elements that match - # the given +xpath+: - # - # xpath = '//book [@category="web"]' - # elements.collect(xpath) {|element| element.size } # => [17, 9] - # - # source://rexml//lib/rexml/element.rb#1988 - def collect(xpath = T.unsafe(nil)); end - - # :call-seq: - # delete(index) -> removed_element or nil - # delete(element) -> removed_element or nil - # delete(xpath) -> removed_element or nil - # - # Removes an element; returns the removed element, or +nil+ if none removed. - # - # With integer argument +index+ given, - # removes the child element at that offset: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.size # => 4 - # elements[2] # => <book category='children'> ... </> - # elements.delete(2) # => <book category='children'> ... </> - # elements.size # => 3 - # elements[2] # => <book category='web'> ... </> - # elements.delete(50) # => nil - # - # With element argument +element+ given, - # removes that child element: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # ele_1, ele_2, ele_3, ele_4 = *elements - # elements.size # => 4 - # elements[2] # => <book category='children'> ... </> - # elements.delete(ele_2) # => <book category='children'> ... </> - # elements.size # => 3 - # elements[2] # => <book category='web'> ... </> - # elements.delete(ele_2) # => nil - # - # With string argument +xpath+ given, - # removes the first element found via that xpath: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.delete('//book') # => <book category='cooking'> ... </> - # elements.delete('//book [@category="children"]') # => <book category='children'> ... </> - # elements.delete('//nosuch') # => nil - # - # source://rexml//lib/rexml/element.rb#1825 - def delete(element); end - - # :call-seq: - # delete_all(xpath) - # - # Removes all elements found via the given +xpath+; - # returns the array of removed elements, if any, else +nil+. - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.size # => 4 - # deleted_elements = elements.delete_all('//book [@category="web"]') - # deleted_elements.size # => 2 - # elements.size # => 2 - # deleted_elements = elements.delete_all('//book') - # deleted_elements.size # => 2 - # elements.size # => 0 - # elements.delete_all('//book') # => [] - # - # source://rexml//lib/rexml/element.rb#1851 - def delete_all(xpath); end - - # :call-seq: - # each(xpath = nil) {|element| ... } -> self - # - # Iterates over the elements. - # - # With no argument, calls the block with each element: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.each {|element| p element } - # - # Output: - # - # <book category='cooking'> ... </> - # <book category='children'> ... </> - # <book category='web'> ... </> - # <book category='web' cover='paperback'> ... </> - # - # With argument +xpath+, calls the block with each element - # that matches the given +xpath+: - # - # elements.each('//book [@category="web"]') {|element| p element } - # - # Output: - # - # <book category='web'> ... </> - # <book category='web' cover='paperback'> ... </> - # - # source://rexml//lib/rexml/element.rb#1967 - def each(xpath = T.unsafe(nil)); end - - # :call-seq: - # empty? -> true or false - # - # Returns +true+ if there are no children, +false+ otherwise. - # - # d = REXML::Document.new('') - # d.elements.empty? # => true - # d = REXML::Document.new(xml_string) - # d.elements.empty? # => false - # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#1755 - def empty?; end - - # :call-seq: - # index(element) - # - # Returns the 1-based index of the given +element+, if found; - # otherwise, returns -1: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # ele_1, ele_2, ele_3, ele_4 = *elements - # elements.index(ele_4) # => 4 - # elements.delete(ele_3) - # elements.index(ele_4) # => 3 - # elements.index(ele_3) # => -1 - # - # source://rexml//lib/rexml/element.rb#1773 - def index(element); end - - # :call-seq: - # inject(xpath = nil, initial = nil) -> object - # - # Calls the block with elements; returns the last block return value. - # - # With no argument, iterates over the elements, calling the block - # <tt>elements.size - 1</tt> times. - # - # - The first call passes the first and second elements. - # - The second call passes the first block return value and the third element. - # - The third call passes the second block return value and the fourth element. - # - And so on. - # - # In this example, the block returns the passed element, - # which is then the object argument to the next call: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.inject do |object, element| - # p [elements.index(object), elements.index(element)] - # element - # end - # - # Output: - # - # [1, 2] - # [2, 3] - # [3, 4] - # - # With the single argument +xpath+, calls the block only with - # elements matching that xpath: - # - # elements.inject('//book [@category="web"]') do |object, element| - # p [elements.index(object), elements.index(element)] - # element - # end - # - # Output: - # - # [3, 4] - # - # With argument +xpath+ given as +nil+ - # and argument +initial+ also given, - # calls the block once for each element. - # - # - The first call passes the +initial+ and the first element. - # - The second call passes the first block return value and the second element. - # - The third call passes the second block return value and the third element. - # - And so on. - # - # In this example, the first object index is <tt>-1</tt> - # - # elements.inject(nil, 'Initial') do |object, element| - # p [elements.index(object), elements.index(element)] - # element - # end - # - # Output: - # - # [-1, 1] - # [1, 2] - # [2, 3] - # [3, 4] - # - # In this form the passed object can be used as an accumulator: - # - # elements.inject(nil, 0) do |total, element| - # total += element.size - # end # => 44 - # - # With both arguments +xpath+ and +initial+ are given, - # calls the block only with elements matching that xpath: - # - # elements.inject('//book [@category="web"]', 0) do |total, element| - # total += element.size - # end # => 26 - # - # source://rexml//lib/rexml/element.rb#2073 - def inject(xpath = T.unsafe(nil), initial = T.unsafe(nil)); end - - # :call-seq: - # parent - # - # Returns the parent element cited in creating the \Elements object. - # This element is also the default starting point for searching - # in the \Elements object. - # - # d = REXML::Document.new(xml_string) - # elements = REXML::Elements.new(d.root) - # elements.parent == d.root # => true - # - # source://rexml//lib/rexml/element.rb#1623 - def parent; end - - # :call-seq: - # size -> integer - # - # Returns the count of \Element children: - # - # d = REXML::Document.new '<a>sean<b/>elliott<b/>russell<b/></a>' - # d.root.elements.size # => 3 # Three elements. - # d.root.size # => 6 # Three elements plus three text nodes.. - # - # source://rexml//lib/rexml/element.rb#2097 - def size; end - - # :call-seq: - # to_a(xpath = nil) -> array_of_elements - # - # Returns an array of element children (not including non-element children). - # - # With no argument, returns an array of all element children: - # - # d = REXML::Document.new '<a>sean<b/>elliott<c/></a>' - # elements = d.root.elements - # elements.to_a # => [<b/>, <c/>] # Omits non-element children. - # children = d.root.children - # children # => ["sean", <b/>, "elliott", <c/>] # Includes non-element children. - # - # With argument +xpath+, returns an array of element children - # that match the xpath: - # - # elements.to_a('//c') # => [<c/>] - # - # source://rexml//lib/rexml/element.rb#2121 - def to_a(xpath = T.unsafe(nil)); end - - private - - # Private helper class. Removes quotes from quoted strings - # - # source://rexml//lib/rexml/element.rb#2129 - def literalize(name); end -end - -# source://rexml//lib/rexml/encoding.rb#4 -module REXML::Encoding - # source://rexml//lib/rexml/encoding.rb#29 - def decode(string); end - - # source://rexml//lib/rexml/encoding.rb#25 - def encode(string); end - - # ID ---> Encoding name - # - # source://rexml//lib/rexml/encoding.rb#6 - def encoding; end - - # source://rexml//lib/rexml/encoding.rb#7 - def encoding=(encoding); end - - private - - # source://rexml//lib/rexml/encoding.rb#34 - def find_encoding(name); end -end - -# source://rexml//lib/rexml/entity.rb#7 -class REXML::Entity < ::REXML::Child - include ::REXML::XMLTokens - - # Create a new entity. Simple entities can be constructed by passing a - # name, value to the constructor; this creates a generic, plain entity - # reference. For anything more complicated, you have to pass a Source to - # the constructor with the entity definition, or use the accessor methods. - # +WARNING+: There is no validation of entity state except when the entity - # is read from a stream. If you start poking around with the accessors, - # you can easily create a non-conformant Entity. - # - # e = Entity.new( 'amp', '&' ) - # - # @return [Entity] a new instance of Entity - # - # source://rexml//lib/rexml/entity.rb#33 - def initialize(stream, value = T.unsafe(nil), parent = T.unsafe(nil), reference = T.unsafe(nil)); end - - # Returns the value of attribute external. - # - # source://rexml//lib/rexml/entity.rb#22 - def external; end - - # Returns the value of attribute name. - # - # source://rexml//lib/rexml/entity.rb#22 - def name; end - - # Returns the value of attribute ndata. - # - # source://rexml//lib/rexml/entity.rb#22 - def ndata; end - - # Returns the value of this entity unprocessed -- raw. This is the - # normalized value; that is, with all %ent; and &ent; entities intact - # - # source://rexml//lib/rexml/entity.rb#85 - def normalized; end - - # Returns the value of attribute pubid. - # - # source://rexml//lib/rexml/entity.rb#22 - def pubid; end - - # Returns the value of attribute ref. - # - # source://rexml//lib/rexml/entity.rb#22 - def ref; end - - # Returns this entity as a string. See write(). - # - # source://rexml//lib/rexml/entity.rb#119 - def to_s; end - - # Evaluates to the unnormalized value of this entity; that is, replacing - # all entities -- both %ent; and &ent; entities. This differs from - # +value()+ in that +value+ only replaces %ent; entities. - # - # source://rexml//lib/rexml/entity.rb#73 - def unnormalized; end - - # Returns the value of this entity. At the moment, only internal entities - # are processed. If the value contains internal references (IE, - # %blah;), those are replaced with their values. IE, if the doctype - # contains: - # <!ENTITY % foo "bar"> - # <!ENTITY yada "nanoo %foo; nanoo> - # then: - # doctype.entity('yada').value #-> "nanoo bar nanoo" - # - # source://rexml//lib/rexml/entity.rb#134 - def value; end - - # Write out a fully formed, correct entity definition (assuming the Entity - # object itself is valid.) - # - # out:: - # An object implementing <TT><<</TT> to which the entity will be - # output - # indent:: - # *DEPRECATED* and ignored - # - # source://rexml//lib/rexml/entity.rb#97 - def write(out, indent = T.unsafe(nil)); end - - class << self - # Evaluates whether the given string matches an entity definition, - # returning true if so, and false otherwise. - # - # @return [Boolean] - # - # source://rexml//lib/rexml/entity.rb#66 - def matches?(string); end - end -end - -# source://rexml//lib/rexml/doctype.rb#267 -class REXML::ExternalEntity < ::REXML::Child - # @return [ExternalEntity] a new instance of ExternalEntity - # - # source://rexml//lib/rexml/doctype.rb#268 - def initialize(src); end - - # source://rexml//lib/rexml/doctype.rb#272 - def to_s; end - - # source://rexml//lib/rexml/doctype.rb#275 - def write(output, indent); end -end - -# source://rexml//lib/rexml/formatters/default.rb#5 -class REXML::Formatters::Default - # Prints out the XML document with no formatting -- except if ie_hack is - # set. - # - # ie_hack:: - # If set to true, then inserts whitespace before the close of an empty - # tag, so that IE's bad XML parser doesn't choke. - # - # @return [Default] a new instance of Default - # - # source://rexml//lib/rexml/formatters/default.rb#12 - def initialize(ie_hack = T.unsafe(nil)); end - - # Writes the node to some output. - # - # node:: - # The node to write - # output:: - # A class implementing <TT><<</TT>. Pass in an Output object to - # change the output encoding. - # - # source://rexml//lib/rexml/formatters/default.rb#23 - def write(node, output); end - - protected - - # source://rexml//lib/rexml/formatters/default.rb#98 - def write_cdata(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#92 - def write_comment(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#61 - def write_document(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#65 - def write_element(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#104 - def write_instruction(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#88 - def write_text(node, output); end -end - -# Pretty-prints an XML document. This destroys whitespace in text nodes -# and will insert carriage returns and indentations. -# -# TODO: Add an option to print attributes on new lines -# -# source://rexml//lib/rexml/formatters/pretty.rb#10 -class REXML::Formatters::Pretty < ::REXML::Formatters::Default - # Create a new pretty printer. - # - # output:: - # An object implementing '<<(String)', to which the output will be written. - # indentation:: - # An integer greater than 0. The indentation of each level will be - # this number of spaces. If this is < 1, the behavior of this object - # is undefined. Defaults to 2. - # ie_hack:: - # If true, the printer will insert whitespace before closing empty - # tags, thereby allowing Internet Explorer's XML parser to - # function. Defaults to false. - # - # @return [Pretty] a new instance of Pretty - # - # source://rexml//lib/rexml/formatters/pretty.rb#30 - def initialize(indentation = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - - # If compact is set to true, then the formatter will attempt to use as - # little space as possible - # - # source://rexml//lib/rexml/formatters/pretty.rb#14 - def compact; end - - # If compact is set to true, then the formatter will attempt to use as - # little space as possible - # - # source://rexml//lib/rexml/formatters/pretty.rb#14 - def compact=(_arg0); end - - # The width of a page. Used for formatting text - # - # source://rexml//lib/rexml/formatters/pretty.rb#16 - def width; end - - # The width of a page. Used for formatting text - # - # source://rexml//lib/rexml/formatters/pretty.rb#16 - def width=(_arg0); end - - protected - - # source://rexml//lib/rexml/formatters/pretty.rb#102 - def write_cdata(node, output); end - - # source://rexml//lib/rexml/formatters/pretty.rb#97 - def write_comment(node, output); end - - # source://rexml//lib/rexml/formatters/pretty.rb#107 - def write_document(node, output); end - - # source://rexml//lib/rexml/formatters/pretty.rb#39 - def write_element(node, output); end - - # source://rexml//lib/rexml/formatters/pretty.rb#88 - def write_text(node, output); end - - private - - # source://rexml//lib/rexml/formatters/pretty.rb#124 - def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end - - # source://rexml//lib/rexml/formatters/pretty.rb#129 - def wrap(string, width); end -end - -# A Source that wraps an IO. See the Source class for method -# documentation -# -# source://rexml//lib/rexml/source.rb#159 -class REXML::IOSource < ::REXML::Source - # block_size has been deprecated - # - # @return [IOSource] a new instance of IOSource - # - # source://rexml//lib/rexml/source.rb#163 - def initialize(arg, block_size = T.unsafe(nil), encoding = T.unsafe(nil)); end - - # source://rexml//lib/rexml/source.rb#215 - def consume(pattern); end - - # @return the current line in the source - # - # source://rexml//lib/rexml/source.rb#244 - def current_line; end - - # @return [Boolean] - # - # source://rexml//lib/rexml/source.rb#235 - def empty?; end - - # source://rexml//lib/rexml/source.rb#219 - def match(pattern, cons = T.unsafe(nil)); end - - # source://rexml//lib/rexml/source.rb#239 - def position; end - - # source://rexml//lib/rexml/source.rb#207 - def read; end - - # source://rexml//lib/rexml/source.rb#184 - def scan(pattern, cons = T.unsafe(nil)); end - - private - - # source://rexml//lib/rexml/source.rb#286 - def encoding_updated; end - - # source://rexml//lib/rexml/source.rb#266 - def readline; end -end - -# Represents an XML Instruction; IE, <? ... ?> -# TODO: Add parent arg (3rd arg) to constructor -# -# source://rexml//lib/rexml/instruction.rb#9 -class REXML::Instruction < ::REXML::Child - # Constructs a new Instruction - # the target of this instruction is set to this. If an Instruction, - # then the Instruction is shallowly cloned (target and content are - # copied). - # be a Parent if the target argument is a Source. Otherwise, this - # String is set as the content of this instruction. - # - # @param target can be one of a number of things. If String, then - # @param content Must be either a String, or a Parent. Can only - # @return [Instruction] a new instance of Instruction - # - # source://rexml//lib/rexml/instruction.rb#25 - def initialize(target, content = T.unsafe(nil)); end - - # of the other matches the target and content of this object. - # - # @return true if other is an Instruction, and the content and target - # - # source://rexml//lib/rexml/instruction.rb#65 - def ==(other); end - - # source://rexml//lib/rexml/instruction.rb#44 - def clone; end - - # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> - # content is everything else. - # - # source://rexml//lib/rexml/instruction.rb#15 - def content; end - - # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> - # content is everything else. - # - # source://rexml//lib/rexml/instruction.rb#15 - def content=(_arg0); end - - # source://rexml//lib/rexml/instruction.rb#75 - def inspect; end - - # source://rexml//lib/rexml/instruction.rb#71 - def node_type; end - - # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> - # content is everything else. - # - # source://rexml//lib/rexml/instruction.rb#15 - def target; end - - # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> - # content is everything else. - # - # source://rexml//lib/rexml/instruction.rb#15 - def target=(_arg0); end - - # == DEPRECATED - # See the rexml/formatters package - # - # source://rexml//lib/rexml/instruction.rb#51 - def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -# source://rexml//lib/rexml/doctype.rb#280 -class REXML::NotationDecl < ::REXML::Child - # @return [NotationDecl] a new instance of NotationDecl - # - # source://rexml//lib/rexml/doctype.rb#282 - def initialize(name, middle, pub, sys); end - - # This method retrieves the name of the notation. - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#307 - def name; end - - # Returns the value of attribute public. - # - # source://rexml//lib/rexml/doctype.rb#281 - def public; end - - # Sets the attribute public - # - # @param value the value to set the attribute public to. - # - # source://rexml//lib/rexml/doctype.rb#281 - def public=(_arg0); end - - # Returns the value of attribute system. - # - # source://rexml//lib/rexml/doctype.rb#281 - def system; end - - # Sets the attribute system - # - # @param value the value to set the attribute system to. - # - # source://rexml//lib/rexml/doctype.rb#281 - def system=(_arg0); end - - # source://rexml//lib/rexml/doctype.rb#290 - def to_s; end - - # source://rexml//lib/rexml/doctype.rb#300 - def write(output, indent = T.unsafe(nil)); end -end - -# source://rexml//lib/rexml/output.rb#5 -class REXML::Output - include ::REXML::Encoding - - # @return [Output] a new instance of Output - # - # source://rexml//lib/rexml/output.rb#10 - def initialize(real_IO, encd = T.unsafe(nil)); end - - # source://rexml//lib/rexml/output.rb#22 - def <<(content); end - - # Returns the value of attribute encoding. - # - # source://rexml//lib/rexml/output.rb#8 - def encoding; end - - # source://rexml//lib/rexml/output.rb#26 - def to_s; end -end - -# A parent has children, and has methods for accessing them. The Parent -# class is never encountered except as the superclass for some other -# object. -# -# source://rexml//lib/rexml/parent.rb#8 -class REXML::Parent < ::REXML::Child - include ::Enumerable - - # Constructor - # - # @param parent if supplied, will be set as the parent of this object - # @return [Parent] a new instance of Parent - # - # source://rexml//lib/rexml/parent.rb#13 - def initialize(parent = T.unsafe(nil)); end - - # source://rexml//lib/rexml/parent.rb#18 - def <<(object); end - - # Fetches a child at a given index - # - # @param index the Integer index of the child to fetch - # - # source://rexml//lib/rexml/parent.rb#57 - def [](index); end - - # Set an index entry. See Array.[]= - # - # @param index the index of the element to set - # @param opt either the object to set, or an Integer length - # @param child if opt is an Integer, this is the child to set - # @return the parent (self) - # - # source://rexml//lib/rexml/parent.rb#70 - def []=(*args); end - - # source://rexml//lib/rexml/parent.rb#18 - def add(object); end - - # source://rexml//lib/rexml/parent.rb#115 - def children; end - - # Deeply clones this object. This creates a complete duplicate of this - # Parent, including all descendants. - # - # source://rexml//lib/rexml/parent.rb#148 - def deep_clone; end - - # source://rexml//lib/rexml/parent.rb#32 - def delete(object); end - - # source://rexml//lib/rexml/parent.rb#47 - def delete_at(index); end - - # source://rexml//lib/rexml/parent.rb#43 - def delete_if(&block); end - - # source://rexml//lib/rexml/parent.rb#39 - def each(&block); end - - # source://rexml//lib/rexml/parent.rb#39 - def each_child(&block); end - - # source://rexml//lib/rexml/parent.rb#51 - def each_index(&block); end - - # Fetches the index of a given child - # of this parent. - # - # @param child the child to get the index of - # @return the index of the child, or nil if the object is not a child - # - # source://rexml//lib/rexml/parent.rb#123 - def index(child); end - - # Inserts an child after another child - # child2 will be inserted after child1 in the child list of the parent. - # If an xpath, child2 will be inserted after the first child to match - # the xpath. - # - # @param child1 this is either an xpath or an Element. If an Element, - # @param child2 the child to insert - # @return the parent (self) - # - # source://rexml//lib/rexml/parent.rb#102 - def insert_after(child1, child2); end - - # Inserts an child before another child - # child2 will be inserted before child1 in the child list of the parent. - # If an xpath, child2 will be inserted before the first child to match - # the xpath. - # - # @param child1 this is either an xpath or an Element. If an Element, - # @param child2 the child to insert - # @return the parent (self) - # - # source://rexml//lib/rexml/parent.rb#82 - def insert_before(child1, child2); end - - # @return the number of children of this parent - # - # source://rexml//lib/rexml/parent.rb#130 - def length; end - - # @return [Boolean] - # - # source://rexml//lib/rexml/parent.rb#162 - def parent?; end - - # source://rexml//lib/rexml/parent.rb#18 - def push(object); end - - # Replaces one child with another, making sure the nodelist is correct - # Child) - # - # @param to_replace the child to replace (must be a Child) - # @param replacement the child to insert into the nodelist (must be a - # - # source://rexml//lib/rexml/parent.rb#140 - def replace_child(to_replace, replacement); end - - # @return the number of children of this parent - # - # source://rexml//lib/rexml/parent.rb#130 - def size; end - - # source://rexml//lib/rexml/parent.rb#115 - def to_a; end - - # source://rexml//lib/rexml/parent.rb#27 - def unshift(object); end -end - -# source://rexml//lib/rexml/parseexception.rb#3 -class REXML::ParseException < ::RuntimeError - # @return [ParseException] a new instance of ParseException - # - # source://rexml//lib/rexml/parseexception.rb#6 - def initialize(message, source = T.unsafe(nil), parser = T.unsafe(nil), exception = T.unsafe(nil)); end - - # source://rexml//lib/rexml/parseexception.rb#48 - def context; end - - # Returns the value of attribute continued_exception. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def continued_exception; end - - # Sets the attribute continued_exception - # - # @param value the value to set the attribute continued_exception to. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def continued_exception=(_arg0); end - - # source://rexml//lib/rexml/parseexception.rb#43 - def line; end - - # Returns the value of attribute parser. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def parser; end - - # Sets the attribute parser - # - # @param value the value to set the attribute parser to. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def parser=(_arg0); end - - # source://rexml//lib/rexml/parseexception.rb#38 - def position; end - - # Returns the value of attribute source. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def source; end - - # Sets the attribute source - # - # @param value the value to set the attribute source to. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def source=(_arg0); end - - # source://rexml//lib/rexml/parseexception.rb#13 - def to_s; end -end - -# = Using the Pull Parser -# <em>This API is experimental, and subject to change.</em> -# parser = PullParser.new( "<a>text<b att='val'/>txet</a>" ) -# while parser.has_next? -# res = parser.next -# puts res[1]['att'] if res.start_tag? and res[0] == 'b' -# end -# See the PullEvent class for information on the content of the results. -# The data is identical to the arguments passed for the various events to -# the StreamListener API. -# -# Notice that: -# parser = PullParser.new( "<a>BAD DOCUMENT" ) -# while parser.has_next? -# res = parser.next -# raise res[1] if res.error? -# end -# -# Nat Price gave me some good ideas for the API. -# -# source://rexml//lib/rexml/parsers/baseparser.rb#29 -class REXML::Parsers::BaseParser - # @return [BaseParser] a new instance of BaseParser - # - # source://rexml//lib/rexml/parsers/baseparser.rb#115 - def initialize(source); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#120 - def add_listener(listener); end - - # Returns true if there are no more events - # - # @return [Boolean] - # - # source://rexml//lib/rexml/parsers/baseparser.rb#146 - def empty?; end - - # source://rexml//lib/rexml/parsers/baseparser.rb#438 - def entity(reference, entities); end - - # Returns true if there are more events. Synonymous with !empty? - # - # @return [Boolean] - # - # source://rexml//lib/rexml/parsers/baseparser.rb#151 - def has_next?; end - - # Escapes all possible entities - # - # source://rexml//lib/rexml/parsers/baseparser.rb#449 - def normalize(input, entities = T.unsafe(nil), entity_filter = T.unsafe(nil)); end - - # Peek at the +depth+ event in the stack. The first element on the stack - # is at depth 0. If +depth+ is -1, will parse to the end of the input - # stream and return the last event, which is always :end_document. - # Be aware that this causes the stream to be parsed up to the +depth+ - # event, so you can effectively pre-parse the entire document (pull the - # entire thing into memory) using this method. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#167 - def peek(depth = T.unsafe(nil)); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#136 - def position; end - - # Returns the next event. This is a +PullEvent+ object. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#182 - def pull; end - - # Returns the value of attribute source. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#124 - def source; end - - # source://rexml//lib/rexml/parsers/baseparser.rb#126 - def stream=(source); end - - # Unescapes all possible entities - # - # source://rexml//lib/rexml/parsers/baseparser.rb#465 - def unnormalize(string, entities = T.unsafe(nil), filter = T.unsafe(nil)); end - - # Push an event back on the head of the stream. This method - # has (theoretically) infinite depth. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#157 - def unshift(token); end - - private - - # @return [Boolean] - # - # source://rexml//lib/rexml/parsers/baseparser.rb#495 - def need_source_encoding_update?(xml_declaration_encoding); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#589 - def parse_attributes(prefixes, curr_ns); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#514 - def parse_id(base_error_message, accept_external_id:, accept_public_id:); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#542 - def parse_id_invalid_details(accept_external_id:, accept_public_id:); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#501 - def parse_name(base_error_message); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#580 - def process_instruction; end - - # source://rexml//lib/rexml/parsers/baseparser.rb#190 - def pull_event; end -end - -# source://rexml//lib/rexml/parsers/baseparser.rb#102 -REXML::Parsers::BaseParser::EXTERNAL_ID_PUBLIC = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#103 -REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#104 -REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#38 -REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#37 -REXML::Parsers::BaseParser::QNAME_STR = T.let(T.unsafe(nil), String) - -# source://rexml//lib/rexml/parsers/streamparser.rb#6 -class REXML::Parsers::StreamParser - # @return [StreamParser] a new instance of StreamParser - # - # source://rexml//lib/rexml/parsers/streamparser.rb#7 - def initialize(source, listener); end - - # source://rexml//lib/rexml/parsers/streamparser.rb#13 - def add_listener(listener); end - - # source://rexml//lib/rexml/parsers/streamparser.rb#17 - def parse; end -end - -# source://rexml//lib/rexml/parsers/treeparser.rb#7 -class REXML::Parsers::TreeParser - # @return [TreeParser] a new instance of TreeParser - # - # source://rexml//lib/rexml/parsers/treeparser.rb#8 - def initialize(source, build_context = T.unsafe(nil)); end - - # source://rexml//lib/rexml/parsers/treeparser.rb#13 - def add_listener(listener); end - - # source://rexml//lib/rexml/parsers/treeparser.rb#17 - def parse; end -end - -# You don't want to use this class. Really. Use XPath, which is a wrapper -# for this class. Believe me. You don't want to poke around in here. -# There is strange, dark magic at work in this code. Beware. Go back! Go -# back while you still can! -# -# source://rexml//lib/rexml/parsers/xpathparser.rb#11 -class REXML::Parsers::XPathParser - include ::REXML::XMLTokens - - # source://rexml//lib/rexml/parsers/xpathparser.rb#41 - def abbreviate(path); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#99 - def expand(path); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#15 - def namespaces=(namespaces); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#20 - def parse(path); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#35 - def predicate(path); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#138 - def predicate_to_string(path, &block); end - - private - - # | AdditiveExpr ('+' | '-') MultiplicativeExpr - # | MultiplicativeExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#455 - def AdditiveExpr(path, parsed); end - - # | AndExpr S 'and' S EqualityExpr - # | EqualityExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#388 - def AndExpr(path, parsed); end - - # | EqualityExpr ('=' | '!=') RelationalExpr - # | RelationalExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#407 - def EqualityExpr(path, parsed); end - - # | FilterExpr Predicate - # | PrimaryExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#558 - def FilterExpr(path, parsed); end - - # | FUNCTION_NAME '(' ( expr ( ',' expr )* )? ')' - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#613 - def FunctionCall(rest, parsed); end - - # LocationPath - # | RelativeLocationPath - # | '/' RelativeLocationPath? - # | '//' RelativeLocationPath - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#193 - def LocationPath(path, parsed); end - - # | MultiplicativeExpr ('*' | S ('div' | 'mod') S) UnaryExpr - # | UnaryExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#478 - def MultiplicativeExpr(path, parsed); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#293 - def NodeTest(path, parsed); end - - # | OrExpr S 'or' S AndExpr - # | AndExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#369 - def OrExpr(path, parsed); end - - # | LocationPath - # | FilterExpr ('/' | '//') RelativeLocationPath - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#540 - def PathExpr(path, parsed); end - - # Filters the supplied nodeset on the predicate(s) - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#345 - def Predicate(path, parsed); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#576 - def PrimaryExpr(path, parsed); end - - # | RelationalExpr ('<' | '>' | '<=' | '>=') AdditiveExpr - # | AdditiveExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#430 - def RelationalExpr(path, parsed); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#217 - def RelativeLocationPath(path, parsed); end - - # | '-' UnaryExpr - # | UnionExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#503 - def UnaryExpr(path, parsed); end - - # | UnionExpr '|' PathExpr - # | PathExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#521 - def UnionExpr(path, parsed); end - - # get_group( '[foo]bar' ) -> ['bar', '[foo]'] - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#626 - def get_group(string); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#644 - def parse_args(string); end -end - -# source://rexml//lib/rexml/parsers/xpathparser.rb#289 -REXML::Parsers::XPathParser::LOCAL_NAME_WILDCARD = T.let(T.unsafe(nil), Regexp) - -# Returns a 1-1 map of the nodeset -# The contents of the resulting array are either: -# true/false, if a positive match -# String, if a name match -# NodeTest -# | ('*' | NCNAME ':' '*' | QNAME) NameTest -# | '*' ':' NCNAME NameTest since XPath 2.0 -# | NODE_TYPE '(' ')' NodeType -# | PI '(' LITERAL ')' PI -# | '[' expr ']' Predicate -# -# source://rexml//lib/rexml/parsers/xpathparser.rb#288 -REXML::Parsers::XPathParser::PREFIX_WILDCARD = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/doctype.rb#10 -class REXML::ReferenceWriter - # @return [ReferenceWriter] a new instance of ReferenceWriter - # - # source://rexml//lib/rexml/doctype.rb#11 - def initialize(id_type, public_id_literal, system_literal, context = T.unsafe(nil)); end - - # source://rexml//lib/rexml/doctype.rb#25 - def write(output); end -end - -# A Source can be searched for patterns, and wraps buffers and other -# objects and provides consumption of text -# -# source://rexml//lib/rexml/source.rb#31 -class REXML::Source - include ::REXML::Encoding - - # Constructor - # value, overriding all encoding detection - # - # @param arg must be a String, and should be a valid XML document - # @param encoding if non-null, sets the encoding of the source to this - # @return [Source] a new instance of Source - # - # source://rexml//lib/rexml/source.rb#43 - def initialize(arg, encoding = T.unsafe(nil)); end - - # The current buffer (what we're going to read next) - # - # source://rexml//lib/rexml/source.rb#34 - def buffer; end - - # source://rexml//lib/rexml/source.rb#87 - def consume(pattern); end - - # @return the current line in the source - # - # source://rexml//lib/rexml/source.rb#117 - def current_line; end - - # @return [Boolean] true if the Source is exhausted - # - # source://rexml//lib/rexml/source.rb#108 - def empty?; end - - # Returns the value of attribute encoding. - # - # source://rexml//lib/rexml/source.rb#37 - def encoding; end - - # Inherited from Encoding - # Overridden to support optimized en/decoding - # - # source://rexml//lib/rexml/source.rb#56 - def encoding=(enc); end - - # The line number of the last consumed text - # - # source://rexml//lib/rexml/source.rb#36 - def line; end - - # source://rexml//lib/rexml/source.rb#101 - def match(pattern, cons = T.unsafe(nil)); end - - # source://rexml//lib/rexml/source.rb#91 - def match_to(char, pattern); end - - # source://rexml//lib/rexml/source.rb#95 - def match_to_consume(char, pattern); end - - # source://rexml//lib/rexml/source.rb#112 - def position; end - - # source://rexml//lib/rexml/source.rb#84 - def read; end - - # Scans the source for a given pattern. Note, that this is not your - # usual scan() method. For one thing, the pattern argument has some - # requirements; for another, the source can be consumed. You can easily - # confuse this method. Originally, the patterns were easier - # to construct and this method more robust, because this method - # generated search regexps on the fly; however, this was - # computationally expensive and slowed down the entire REXML package - # considerably, since this is by far the most commonly called method. - # /^\s*(#{your pattern, with no groups})(.*)/. The first group - # will be returned; the second group is used if the consume flag is - # set. - # everything after it in the Source. - # pattern is not found. - # - # @param pattern must be a Regexp, and must be in the form of - # @param consume if true, the pattern returned will be consumed, leaving - # @return the pattern, if found, or nil if the Source is empty or the - # - # source://rexml//lib/rexml/source.rb#77 - def scan(pattern, cons = T.unsafe(nil)); end - - private - - # source://rexml//lib/rexml/source.rb#125 - def detect_encoding; end - - # source://rexml//lib/rexml/source.rb#146 - def encoding_updated; end -end - -# Represents text nodes in an XML document -# -# source://rexml//lib/rexml/text.rb#11 -class REXML::Text < ::REXML::Child - include ::Comparable - - # Constructor - # +arg+ if a String, the content is set to the String. If a Text, - # the object is shallowly cloned. - # - # +respect_whitespace+ (boolean, false) if true, whitespace is - # respected - # - # +parent+ (nil) if this is a Parent object, the parent - # will be set to this. - # - # +raw+ (nil) This argument can be given three values. - # If true, then the value of used to construct this object is expected to - # contain no unescaped XML markup, and REXML will not change the text. If - # this value is false, the string may contain any characters, and REXML will - # escape any and all defined entities whose values are contained in the - # text. If this value is nil (the default), then the raw value of the - # parent will be used as the raw value for this node. If there is no raw - # value for the parent, and no value is supplied, the default is false. - # Use this field if you have entities defined for some text, and you don't - # want REXML to escape that text in output. - # Text.new( "<&", false, nil, false ) #-> "<&" - # Text.new( "<&", false, nil, false ) #-> "&lt;&amp;" - # Text.new( "<&", false, nil, true ) #-> Parse exception - # Text.new( "<&", false, nil, true ) #-> "<&" - # # Assume that the entity "s" is defined to be "sean" - # # and that the entity "r" is defined to be "russell" - # Text.new( "sean russell" ) #-> "&s; &r;" - # Text.new( "sean russell", false, nil, true ) #-> "sean russell" - # - # +entity_filter+ (nil) This can be an array of entities to match in the - # supplied text. This argument is only useful if +raw+ is set to false. - # Text.new( "sean russell", false, nil, false, ["s"] ) #-> "&s; russell" - # Text.new( "sean russell", false, nil, true, ["s"] ) #-> "sean russell" - # In the last example, the +entity_filter+ argument is ignored. - # - # +illegal+ INTERNAL USE ONLY - # - # @return [Text] a new instance of Text - # - # source://rexml//lib/rexml/text.rb#94 - def initialize(arg, respect_whitespace = T.unsafe(nil), parent = T.unsafe(nil), raw = T.unsafe(nil), entity_filter = T.unsafe(nil), illegal = T.unsafe(nil)); end - - # Appends text to this text node. The text is appended in the +raw+ mode - # of this text node. - # - # +returns+ the text itself to enable method chain like - # 'text << "XXX" << "YYY"'. - # - # source://rexml//lib/rexml/text.rb#194 - def <<(to_append); end - - # +other+ a String or a Text - # +returns+ the result of (to_s <=> arg.to_s) - # - # source://rexml//lib/rexml/text.rb#203 - def <=>(other); end - - # source://rexml//lib/rexml/text.rb#184 - def clone; end - - # source://rexml//lib/rexml/text.rb#207 - def doctype; end - - # @return [Boolean] - # - # source://rexml//lib/rexml/text.rb#179 - def empty?; end - - # source://rexml//lib/rexml/text.rb#278 - def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end - - # source://rexml//lib/rexml/text.rb#233 - def inspect; end - - # source://rexml//lib/rexml/text.rb#175 - def node_type; end - - # source://rexml//lib/rexml/text.rb#125 - def parent=(parent); end - - # If +raw+ is true, then REXML leaves the value alone - # - # source://rexml//lib/rexml/text.rb#21 - def raw; end - - # If +raw+ is true, then REXML leaves the value alone - # - # source://rexml//lib/rexml/text.rb#21 - def raw=(_arg0); end - - # Returns the string value of this text node. This string is always - # escaped, meaning that it is a valid XML text node string, and all - # entities that can be escaped, have been inserted. This method respects - # the entity filter set in the constructor. - # - # # Assume that the entity "s" is defined to be "sean", and that the - # # entity "r" is defined to be "russell" - # t = Text.new( "< & sean russell", false, nil, false, ['s'] ) - # t.to_s #-> "< & &s; russell" - # t = Text.new( "< & &s; russell", false, nil, false ) - # t.to_s #-> "< & &s; russell" - # u = Text.new( "sean russell", false, nil, true ) - # u.to_s #-> "sean russell" - # - # source://rexml//lib/rexml/text.rb#228 - def to_s; end - - # Returns the string value of this text. This is the text without - # entities, as it might be used programmatically, or printed to the - # console. This ignores the 'raw' attribute setting, and any - # entity_filter. - # - # # Assume that the entity "s" is defined to be "sean", and that the - # # entity "r" is defined to be "russell" - # t = Text.new( "< & sean russell", false, nil, false, ['s'] ) - # t.value #-> "< & sean russell" - # t = Text.new( "< & &s; russell", false, nil, false ) - # t.value #-> "< & sean russell" - # u = Text.new( "sean russell", false, nil, true ) - # u.value #-> "sean russell" - # - # source://rexml//lib/rexml/text.rb#250 - def value; end - - # Sets the contents of this text node. This expects the text to be - # unnormalized. It returns self. - # - # e = Element.new( "a" ) - # e.add_text( "foo" ) # <a>foo</a> - # e[0].value = "bar" # <a>bar</a> - # e[0].value = "<a>" # <a><a></a> - # - # source://rexml//lib/rexml/text.rb#261 - def value=(val); end - - # source://rexml//lib/rexml/text.rb#267 - def wrap(string, width, addnewline = T.unsafe(nil)); end - - # == DEPRECATED - # See REXML::Formatters - # - # source://rexml//lib/rexml/text.rb#293 - def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - - # Writes out text, substituting special characters beforehand. - # +out+ A String, IO, or any other object supporting <<( String ) - # +input+ the text to substitute and the write out - # - # z=utf8.unpack("U*") - # ascOut="" - # z.each{|r| - # if r < 0x100 - # ascOut.concat(r.chr) - # else - # ascOut.concat(sprintf("&#x%x;", r)) - # end - # } - # puts ascOut - # - # source://rexml//lib/rexml/text.rb#325 - def write_with_substitution(out, input); end - - # FIXME - # This probably won't work properly - # - # source://rexml//lib/rexml/text.rb#305 - def xpath; end - - private - - # source://rexml//lib/rexml/text.rb#338 - def clear_cache; end - - class << self - # check for illegal characters - # - # source://rexml//lib/rexml/text.rb#131 - def check(string, pattern, doctype); end - - # source://rexml//lib/rexml/text.rb#405 - def expand(ref, doctype, filter); end - - # Escapes all possible entities - # - # source://rexml//lib/rexml/text.rb#370 - def normalize(input, doctype = T.unsafe(nil), entity_filter = T.unsafe(nil)); end - - # Reads text, substituting entities - # - # source://rexml//lib/rexml/text.rb#344 - def read_with_substitution(input, illegal = T.unsafe(nil)); end - - # Unescapes all possible entities - # - # source://rexml//lib/rexml/text.rb#392 - def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil)); end - end -end - -# source://rexml//lib/rexml/undefinednamespaceexception.rb#4 -class REXML::UndefinedNamespaceException < ::REXML::ParseException - # @return [UndefinedNamespaceException] a new instance of UndefinedNamespaceException - # - # source://rexml//lib/rexml/undefinednamespaceexception.rb#5 - def initialize(prefix, source, parser); end -end - -# source://rexml//lib/rexml/validation/validationexception.rb#4 -class REXML::Validation::ValidationException < ::RuntimeError - # @return [ValidationException] a new instance of ValidationException - # - # source://rexml//lib/rexml/validation/validationexception.rb#5 - def initialize(msg); end -end - -# NEEDS DOCUMENTATION -# -# source://rexml//lib/rexml/xmldecl.rb#8 -class REXML::XMLDecl < ::REXML::Child - include ::REXML::Encoding - - # @return [XMLDecl] a new instance of XMLDecl - # - # source://rexml//lib/rexml/xmldecl.rb#20 - def initialize(version = T.unsafe(nil), encoding = T.unsafe(nil), standalone = T.unsafe(nil)); end - - # source://rexml//lib/rexml/xmldecl.rb#56 - def ==(other); end - - # source://rexml//lib/rexml/xmldecl.rb#39 - def clone; end - - # source://rexml//lib/rexml/xmldecl.rb#102 - def dowrite; end - - # source://rexml//lib/rexml/xmldecl.rb#76 - def encoding=(enc); end - - # source://rexml//lib/rexml/xmldecl.rb#106 - def inspect; end - - # source://rexml//lib/rexml/xmldecl.rb#69 - def node_type; end - - # source://rexml//lib/rexml/xmldecl.rb#98 - def nowrite; end - - # source://rexml//lib/rexml/encoding.rb#7 - def old_enc=(encoding); end - - # Returns the value of attribute standalone. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def stand_alone?; end - - # Returns the value of attribute standalone. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def standalone; end - - # Sets the attribute standalone - # - # @param value the value to set the attribute standalone to. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def standalone=(_arg0); end - - # Returns the value of attribute version. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def version; end - - # Sets the attribute version - # - # @param value the value to set the attribute version to. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def version=(_arg0); end - - # indent:: - # Ignored. There must be no whitespace before an XML declaration - # transitive:: - # Ignored - # ie_hack:: - # Ignored - # - # source://rexml//lib/rexml/xmldecl.rb#49 - def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - - # Returns the value of attribute writeencoding. - # - # source://rexml//lib/rexml/xmldecl.rb#18 - def writeencoding; end - - # Returns the value of attribute writethis. - # - # source://rexml//lib/rexml/xmldecl.rb#18 - def writethis; end - - # source://rexml//lib/rexml/xmldecl.rb#63 - def xmldecl(version, encoding, standalone); end - - private - - # source://rexml//lib/rexml/xmldecl.rb#111 - def content(enc); end - - class << self - # Only use this if you do not want the XML declaration to be written; - # this object is ignored by the XML writer. Otherwise, instantiate your - # own XMLDecl and add it to the document. - # - # Note that XML 1.1 documents *must* include an XML declaration - # - # source://rexml//lib/rexml/xmldecl.rb#92 - def default; end - end -end - -# @private -# -# source://rexml//lib/rexml/xpath_parser.rb#959 -class REXML::XPathNode - # @return [XPathNode] a new instance of XPathNode - # - # source://rexml//lib/rexml/xpath_parser.rb#961 - def initialize(node, context = T.unsafe(nil)); end - - # Returns the value of attribute context. - # - # source://rexml//lib/rexml/xpath_parser.rb#960 - def context; end - - # source://rexml//lib/rexml/xpath_parser.rb#970 - def position; end - - # Returns the value of attribute raw_node. - # - # source://rexml//lib/rexml/xpath_parser.rb#960 - def raw_node; end -end - -# You don't want to use this class. Really. Use XPath, which is a wrapper -# for this class. Believe me. You don't want to poke around in here. -# There is strange, dark magic at work in this code. Beware. Go back! Go -# back while you still can! -# -# source://rexml//lib/rexml/xpath_parser.rb#54 -class REXML::XPathParser - include ::REXML::XMLTokens - - # @return [XPathParser] a new instance of XPathParser - # - # source://rexml//lib/rexml/xpath_parser.rb#60 - def initialize(strict: T.unsafe(nil)); end - - # source://rexml//lib/rexml/xpath_parser.rb#94 - def []=(variable_name, value); end - - # Performs a depth-first (document order) XPath search, and returns the - # first match. This is the fastest, lightest way to return a single result. - # - # FIXME: This method is incomplete! - # - # source://rexml//lib/rexml/xpath_parser.rb#103 - def first(path_stack, node); end - - # source://rexml//lib/rexml/xpath_parser.rb#84 - def get_first(path, nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#139 - def match(path_stack, nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#69 - def namespaces=(namespaces = T.unsafe(nil)); end - - # source://rexml//lib/rexml/xpath_parser.rb#79 - def parse(path, nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#89 - def predicate(path, nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#74 - def variables=(vars = T.unsafe(nil)); end - - private - - # source://rexml//lib/rexml/xpath_parser.rb#775 - def child(nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#916 - def compare(a, operator, b); end - - # source://rexml//lib/rexml/xpath_parser.rb#678 - def descendant(nodeset, include_self); end - - # source://rexml//lib/rexml/xpath_parser.rb#689 - def descendant_recursive(raw_node, new_nodeset, new_nodes, include_self); end - - # source://rexml//lib/rexml/xpath_parser.rb#938 - def each_unnode(nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#637 - def enter(tag, *args); end - - # source://rexml//lib/rexml/xpath_parser.rb#815 - def equality_relational_compare(set1, op, set2); end - - # source://rexml//lib/rexml/xpath_parser.rb#591 - def evaluate_predicate(expression, nodesets); end - - # Expr takes a stack of path elements and a set of nodes (either a Parent - # or an Array and returns an Array of matching nodes - # - # source://rexml//lib/rexml/xpath_parser.rb#175 - def expr(path_stack, nodeset, context = T.unsafe(nil)); end - - # source://rexml//lib/rexml/xpath_parser.rb#582 - def filter_nodeset(nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#745 - def following(node); end - - # source://rexml//lib/rexml/xpath_parser.rb#756 - def following_node_of(node); end - - # Returns a String namespace for a node, given a prefix - # The rules are: - # - # 1. Use the supplied namespace mapping first. - # 2. If no mapping was supplied, use the context node to look up the namespace - # - # source://rexml//lib/rexml/xpath_parser.rb#163 - def get_namespace(node, prefix); end - - # source://rexml//lib/rexml/xpath_parser.rb#642 - def leave(tag, *args); end - - # source://rexml//lib/rexml/xpath_parser.rb#763 - def next_sibling_node(node); end - - # source://rexml//lib/rexml/xpath_parser.rb#477 - def node_test(path_stack, nodesets, any_type: T.unsafe(nil)); end - - # source://rexml//lib/rexml/xpath_parser.rb#802 - def norm(b); end - - # source://rexml//lib/rexml/xpath_parser.rb#890 - def normalize_compare_values(a, operator, b); end - - # Builds a nodeset of all of the preceding nodes of the supplied node, - # in reverse document order - # preceding:: includes every element in the document that precedes this node, - # except for ancestors - # - # source://rexml//lib/rexml/xpath_parser.rb#708 - def preceding(node); end - - # source://rexml//lib/rexml/xpath_parser.rb#730 - def preceding_node_of(node); end - - # Reorders an array of nodes so that they are in document order - # It tries to do this efficiently. - # - # FIXME: I need to get rid of this, but the issue is that most of the XPath - # interpreter functions as a filter, which means that we lose context going - # in and out of function calls. If I knew what the index of the nodes was, - # I wouldn't have to do this. Maybe add a document IDX for each node? - # Problems with mutable documents. Or, rewrite everything. - # - # source://rexml//lib/rexml/xpath_parser.rb#655 - def sort(array_of_nodes, order); end - - # source://rexml//lib/rexml/xpath_parser.rb#441 - def step(path_stack, any_type: T.unsafe(nil), order: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rexml//lib/rexml/xpath_parser.rb#154 - def strict?; end - - # source://rexml//lib/rexml/xpath_parser.rb#630 - def trace(*args); end - - # source://rexml//lib/rexml/xpath_parser.rb#950 - def unnode(nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#877 - def value_type(value); end -end - -# source://rexml//lib/rexml/xpath_parser.rb#58 -REXML::XPathParser::DEBUG = T.let(T.unsafe(nil), FalseClass) diff --git a/sorbet/rbi/gems/rspec-core@3.12.0.rbi b/sorbet/rbi/gems/rspec-core@3.13.0.rbi similarity index 94% rename from sorbet/rbi/gems/rspec-core@3.12.0.rbi rename to sorbet/rbi/gems/rspec-core@3.13.0.rbi index 9a0c1c4e..bbbfd9f4 100644 --- a/sorbet/rbi/gems/rspec-core@3.12.0.rbi +++ b/sorbet/rbi/gems/rspec-core@3.13.0.rbi @@ -4,16 +4,6 @@ # This is an autogenerated file for types exported from the `rspec-core` gem. # Please instead update this file by running `bin/tapioca gem rspec-core`. -module ERB::Escape - private - - def html_escape(_arg0); end - - class << self - def html_escape(_arg0); end - end -end - # Namespace for all core RSpec code. # # source://rspec-core//lib/rspec/core/version.rb#1 @@ -407,7 +397,7 @@ class RSpec::Core::Configuration # # @return [Configuration] a new instance of Configuration # - # source://rspec-core//lib/rspec/core/configuration.rb#509 + # source://rspec-core//lib/rspec/core/configuration.rb#528 def initialize; end # Adds a formatter to the set RSpec will use for this run. @@ -424,7 +414,7 @@ class RSpec::Core::Configuration # the configured `output_stream` (`$stdout`, by default) will be used. # @see RSpec::Core::Formatters::Protocol # - # source://rspec-core//lib/rspec/core/configuration.rb#975 + # source://rspec-core//lib/rspec/core/configuration.rb#996 def add_formatter(formatter, output = T.unsafe(nil)); end # Adds a custom setting to the RSpec.configuration object. @@ -453,7 +443,7 @@ class RSpec::Core::Configuration # @overload add_setting # @param opts [Hash] a customizable set of options # - # source://rspec-core//lib/rspec/core/configuration.rb#638 + # source://rspec-core//lib/rspec/core/configuration.rb#659 def add_setting(name, opts = T.unsafe(nil)); end # Defines a `after` hook. See {Hooks#after} for full docs. @@ -467,7 +457,7 @@ class RSpec::Core::Configuration # @see #before # @see #prepend_before # - # source://rspec-core//lib/rspec/core/configuration.rb#2004 + # source://rspec-core//lib/rspec/core/configuration.rb#2025 def after(scope = T.unsafe(nil), *meta, &block); end # Creates a method that defines an example group with the provided @@ -497,7 +487,7 @@ class RSpec::Core::Configuration # @see #alias_example_to # @see #expose_dsl_globally= # - # source://rspec-core//lib/rspec/core/configuration.rb#1188 + # source://rspec-core//lib/rspec/core/configuration.rb#1209 def alias_example_group_to(new_name, *args); end # Creates a method that delegates to `example` including the submitted @@ -532,7 +522,7 @@ class RSpec::Core::Configuration # @param name [String] example name alias # @param args [Array<Symbol>, Hash] metadata for the generated example # - # source://rspec-core//lib/rspec/core/configuration.rb#1156 + # source://rspec-core//lib/rspec/core/configuration.rb#1177 def alias_example_to(name, *args); end # Define an alias for it_should_behave_like that allows different @@ -561,7 +551,7 @@ class RSpec::Core::Configuration # in RSpec to define `it_should_behave_like` (for backward # compatibility), but we also add docs for that method. # - # source://rspec-core//lib/rspec/core/configuration.rb#1219 + # source://rspec-core//lib/rspec/core/configuration.rb#1240 def alias_it_behaves_like_to(new_name, report_label = T.unsafe(nil)); end # Define an alias for it_should_behave_like that allows different @@ -590,7 +580,7 @@ class RSpec::Core::Configuration # in RSpec to define `it_should_behave_like` (for backward # compatibility), but we also add docs for that method. # - # source://rspec-core//lib/rspec/core/configuration.rb#1219 + # source://rspec-core//lib/rspec/core/configuration.rb#1240 def alias_it_should_behave_like_to(new_name, report_label = T.unsafe(nil)); end # Adds `block` to the end of the list of `after` blocks in the same @@ -608,7 +598,7 @@ class RSpec::Core::Configuration # @see #before # @see #prepend_before # - # source://rspec-core//lib/rspec/core/configuration.rb#2034 + # source://rspec-core//lib/rspec/core/configuration.rb#2055 def append_after(scope = T.unsafe(nil), *meta, &block); end # Defines a `before` hook. See {Hooks#before} for full docs. @@ -622,20 +612,20 @@ class RSpec::Core::Configuration # @see #after # @see #append_after # - # source://rspec-core//lib/rspec/core/configuration.rb#1949 + # source://rspec-core//lib/rspec/core/configuration.rb#1970 def append_before(scope = T.unsafe(nil), *meta, &block); end # @private # @raise [SystemStackError] # - # source://rspec-core//lib/rspec/core/configuration.rb#1914 + # source://rspec-core//lib/rspec/core/configuration.rb#1935 def apply_derived_metadata_to(metadata); end # Registers `block` as an `around` hook. # # See {Hooks#around} for full `around` hook docs. # - # source://rspec-core//lib/rspec/core/configuration.rb#2052 + # source://rspec-core//lib/rspec/core/configuration.rb#2073 def around(scope = T.unsafe(nil), *meta, &block); end # Regexps used to exclude lines from backtraces. @@ -652,19 +642,19 @@ class RSpec::Core::Configuration # # @return [Array<Regexp>] # - # source://rspec-core//lib/rspec/core/configuration.rb#676 + # source://rspec-core//lib/rspec/core/configuration.rb#697 def backtrace_exclusion_patterns; end # Set regular expressions used to exclude lines in backtrace. # - # @param patterns [Array<Regexp>] set backtrace_formatter exlusion_patterns + # @param patterns [Array<Regexp>] set backtrace_formatter exclusion_patterns # - # source://rspec-core//lib/rspec/core/configuration.rb#682 + # source://rspec-core//lib/rspec/core/configuration.rb#703 def backtrace_exclusion_patterns=(patterns); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#503 + # source://rspec-core//lib/rspec/core/configuration.rb#522 def backtrace_formatter; end # Regexps used to include lines in backtraces. @@ -678,14 +668,14 @@ class RSpec::Core::Configuration # # @return [Array<Regexp>] # - # source://rspec-core//lib/rspec/core/configuration.rb#695 + # source://rspec-core//lib/rspec/core/configuration.rb#716 def backtrace_inclusion_patterns; end # Set regular expressions used to include lines in backtrace. # # @attr patterns [Array<Regexp>] set backtrace_formatter inclusion_patterns # - # source://rspec-core//lib/rspec/core/configuration.rb#701 + # source://rspec-core//lib/rspec/core/configuration.rb#722 def backtrace_inclusion_patterns=(patterns); end # Defines a `before` hook. See {Hooks#before} for full docs. @@ -699,7 +689,7 @@ class RSpec::Core::Configuration # @see #after # @see #append_after # - # source://rspec-core//lib/rspec/core/configuration.rb#1949 + # source://rspec-core//lib/rspec/core/configuration.rb#1970 def before(scope = T.unsafe(nil), *meta, &block); end # Determines which bisect runner implementation gets used to run subsets @@ -721,15 +711,15 @@ class RSpec::Core::Configuration # loaded via `--require`. # @return [Symbol] # - # source://rspec-core//lib/rspec/core/configuration.rb#480 + # source://rspec-core//lib/rspec/core/configuration.rb#499 def bisect_runner; end - # source://rspec-core//lib/rspec/core/configuration.rb#481 + # source://rspec-core//lib/rspec/core/configuration.rb#500 def bisect_runner=(value); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#2098 + # source://rspec-core//lib/rspec/core/configuration.rb#2119 def bisect_runner_class; end # Enables color output if the output is a TTY. As of RSpec 3.6, this is @@ -743,7 +733,7 @@ class RSpec::Core::Configuration # @see color_mode # @see color_enabled? # - # source://rspec-core//lib/rspec/core/configuration.rb#901 + # source://rspec-core//lib/rspec/core/configuration.rb#922 def color; end # Toggle output color. @@ -752,7 +742,7 @@ class RSpec::Core::Configuration # rely on the fact that TTYs will display color by default, or set # {:color_mode} to :on to display color on a non-TTY output. # - # source://rspec-core//lib/rspec/core/configuration.rb#939 + # source://rspec-core//lib/rspec/core/configuration.rb#960 def color=(_arg0); end # Check if color is enabled for a particular output. @@ -761,7 +751,7 @@ class RSpec::Core::Configuration # `output_stream` # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#922 + # source://rspec-core//lib/rspec/core/configuration.rb#943 def color_enabled?(output = T.unsafe(nil)); end # The mode for determining whether to display output in color. One of: @@ -774,12 +764,12 @@ class RSpec::Core::Configuration # @return [Boolean] # @see color_enabled? # - # source://rspec-core//lib/rspec/core/configuration.rb#914 + # source://rspec-core//lib/rspec/core/configuration.rb#935 def color_mode; end # Set the color mode. # - # source://rspec-core//lib/rspec/core/configuration.rb#932 + # source://rspec-core//lib/rspec/core/configuration.rb#953 def color_mode=(_arg0); end # Used internally to extend the singleton class of a single example's @@ -787,12 +777,12 @@ class RSpec::Core::Configuration # # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1556 + # source://rspec-core//lib/rspec/core/configuration.rb#1577 def configure_example(example, example_hooks); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1596 + # source://rspec-core//lib/rspec/core/configuration.rb#1617 def configure_expectation_framework; end # Used internally to extend a group with modules using `include`, `prepend` and/or @@ -800,12 +790,12 @@ class RSpec::Core::Configuration # # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1544 + # source://rspec-core//lib/rspec/core/configuration.rb#1565 def configure_group(group); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1590 + # source://rspec-core//lib/rspec/core/configuration.rb#1611 def configure_mock_framework; end # The default output color. Defaults to `:white` but can be set to one of @@ -832,7 +822,7 @@ class RSpec::Core::Configuration # The formatter that will be used if no formatter has been set. # Defaults to 'progress'. # - # source://rspec-core//lib/rspec/core/configuration.rb#982 + # source://rspec-core//lib/rspec/core/configuration.rb#1003 def default_formatter; end # Sets a fallback formatter to use if none other has been set. @@ -843,7 +833,7 @@ class RSpec::Core::Configuration # rspec.default_formatter = 'doc' # end # - # source://rspec-core//lib/rspec/core/configuration.rb#993 + # source://rspec-core//lib/rspec/core/configuration.rb#1014 def default_formatter=(value); end # Path to use if no path is provided to the `rspec` command (default: @@ -888,7 +878,7 @@ class RSpec::Core::Configuration # @yieldparam metadata [Hash] original metadata hash from an example or # group. Mutate this in your block as needed. # - # source://rspec-core//lib/rspec/core/configuration.rb#1873 + # source://rspec-core//lib/rspec/core/configuration.rb#1894 def define_derived_metadata(*filters, &block); end # Determines where deprecation warnings are printed. @@ -929,7 +919,7 @@ class RSpec::Core::Configuration # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1854 + # source://rspec-core//lib/rspec/core/configuration.rb#1875 def disable_monkey_patching; end # Enables zero monkey patching mode for RSpec. It removes monkey @@ -964,15 +954,15 @@ class RSpec::Core::Configuration # if the user is using those (either explicitly or implicitly # by not setting `mock_with` or `expect_with` to anything else). # @note If the user uses this options with `mock_with :mocha` - # (or similiar) they will still have monkey patching active + # (or similar) they will still have monkey patching active # in their test environment from mocha. # - # source://rspec-core//lib/rspec/core/configuration.rb#1846 + # source://rspec-core//lib/rspec/core/configuration.rb#1867 def disable_monkey_patching!; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1854 + # source://rspec-core//lib/rspec/core/configuration.rb#1875 def disable_monkey_patching=(_arg0); end # Run examples over DRb (default: `false`). RSpec doesn't supply the DRb @@ -1084,7 +1074,7 @@ class RSpec::Core::Configuration # Returns the `exclusion_filter`. If none has been set, returns an empty # hash. # - # source://rspec-core//lib/rspec/core/configuration.rb#1348 + # source://rspec-core//lib/rspec/core/configuration.rb#1369 def exclusion_filter; end # Clears and reassigns the `exclusion_filter`. Set to `nil` if you don't @@ -1095,7 +1085,7 @@ class RSpec::Core::Configuration # This overrides any exclusion filters/tags set on the command line or in # configuration files. # - # source://rspec-core//lib/rspec/core/configuration.rb#1341 + # source://rspec-core//lib/rspec/core/configuration.rb#1362 def exclusion_filter=(filter); end # Sets the expectation framework module(s) to be included in each example @@ -1122,17 +1112,17 @@ class RSpec::Core::Configuration # custom_config.custom_setting = true # end # - # source://rspec-core//lib/rspec/core/configuration.rb#837 + # source://rspec-core//lib/rspec/core/configuration.rb#858 def expect_with(*frameworks); end # Delegates to expect_with(framework). # - # source://rspec-core//lib/rspec/core/configuration.rb#810 + # source://rspec-core//lib/rspec/core/configuration.rb#831 def expectation_framework=(framework); end # Returns the configured expectation framework adapter module(s) # - # source://rspec-core//lib/rspec/core/configuration.rb#798 + # source://rspec-core//lib/rspec/core/configuration.rb#819 def expectation_frameworks; end # Exposes the current running example via the named @@ -1157,7 +1147,7 @@ class RSpec::Core::Configuration # end # @param method_name [Symbol] the name of the helper method # - # source://rspec-core//lib/rspec/core/configuration.rb#1784 + # source://rspec-core//lib/rspec/core/configuration.rb#1805 def expose_current_running_example_as(method_name); end # Use this to expose the core RSpec DSL via `Module` and the `main` @@ -1214,7 +1204,7 @@ class RSpec::Core::Configuration # @see #include # @see #prepend # - # source://rspec-core//lib/rspec/core/configuration.rb#1494 + # source://rspec-core//lib/rspec/core/configuration.rb#1515 def extend(mod, *filters); end # If specified, indicates the number of failures required before cleaning @@ -1286,25 +1276,25 @@ class RSpec::Core::Configuration # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1062 + # source://rspec-core//lib/rspec/core/configuration.rb#1083 def files_or_directories_to_run=(*files); end # The spec files RSpec will run. # # @return [Array] specified files about to run # - # source://rspec-core//lib/rspec/core/configuration.rb#1075 + # source://rspec-core//lib/rspec/core/configuration.rb#1096 def files_to_run; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#497 + # source://rspec-core//lib/rspec/core/configuration.rb#516 def files_to_run=(_arg0); end # Returns the `inclusion_filter`. If none has been set, returns an empty # hash. # - # source://rspec-core//lib/rspec/core/configuration.rb#1292 + # source://rspec-core//lib/rspec/core/configuration.rb#1313 def filter; end # Clears and reassigns the `inclusion_filter`. Set to `nil` if you don't @@ -1315,7 +1305,7 @@ class RSpec::Core::Configuration # This overrides any inclusion filters/tags set on the command line or in # configuration files. # - # source://rspec-core//lib/rspec/core/configuration.rb#1283 + # source://rspec-core//lib/rspec/core/configuration.rb#1304 def filter=(filter); end # Adds {#backtrace_exclusion_patterns} that will filter lines from @@ -1333,17 +1323,17 @@ class RSpec::Core::Configuration # :path option, this will not filter it. # @param gem_names [Array<String>] Names of the gems to filter # - # source://rspec-core//lib/rspec/core/configuration.rb#721 + # source://rspec-core//lib/rspec/core/configuration.rb#742 def filter_gems_from_backtrace(*gem_names); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#499 + # source://rspec-core//lib/rspec/core/configuration.rb#518 def filter_manager; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#499 + # source://rspec-core//lib/rspec/core/configuration.rb#518 def filter_manager=(_arg0); end # Adds key/value pairs to the `inclusion_filter`. If `args` @@ -1377,7 +1367,7 @@ class RSpec::Core::Configuration # # filter_run_including :foo # same as filter_run_including :foo => true # - # source://rspec-core//lib/rspec/core/configuration.rb#1254 + # source://rspec-core//lib/rspec/core/configuration.rb#1275 def filter_run(*args); end # Adds key/value pairs to the `exclusion_filter`. If `args` @@ -1411,7 +1401,7 @@ class RSpec::Core::Configuration # # filter_run_excluding :foo # same as filter_run_excluding :foo => true # - # source://rspec-core//lib/rspec/core/configuration.rb#1328 + # source://rspec-core//lib/rspec/core/configuration.rb#1349 def filter_run_excluding(*args); end # Adds key/value pairs to the `inclusion_filter`. If `args` @@ -1445,7 +1435,7 @@ class RSpec::Core::Configuration # # filter_run_including :foo # same as filter_run_including :foo => true # - # source://rspec-core//lib/rspec/core/configuration.rb#1254 + # source://rspec-core//lib/rspec/core/configuration.rb#1275 def filter_run_including(*args); end # Applies the provided filter only if any of examples match, in constrast @@ -1458,7 +1448,7 @@ class RSpec::Core::Configuration # (as in `fdescribe`, `fcontext` and `fit`) since those are aliases for # `describe`/`context`/`it` with `:focus` metadata. # - # source://rspec-core//lib/rspec/core/configuration.rb#1270 + # source://rspec-core//lib/rspec/core/configuration.rb#1291 def filter_run_when_matching(*args); end # Color used when a pending example is fixed. Defaults to `:blue` but can @@ -1486,7 +1476,7 @@ class RSpec::Core::Configuration # # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#571 + # source://rspec-core//lib/rspec/core/configuration.rb#592 def force(hash); end # Formats the docstring output using the block provided. @@ -1498,12 +1488,12 @@ class RSpec::Core::Configuration # config.format_docstrings { |s| s.strip } # end # - # source://rspec-core//lib/rspec/core/configuration.rb#1635 + # source://rspec-core//lib/rspec/core/configuration.rb#1656 def format_docstrings(&block); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1640 + # source://rspec-core//lib/rspec/core/configuration.rb#1661 def format_docstrings_block; end # Adds a formatter to the set RSpec will use for this run. @@ -1520,12 +1510,12 @@ class RSpec::Core::Configuration # the configured `output_stream` (`$stdout`, by default) will be used. # @see RSpec::Core::Formatters::Protocol # - # source://rspec-core//lib/rspec/core/configuration.rb#975 + # source://rspec-core//lib/rspec/core/configuration.rb#996 def formatter=(formatter, output = T.unsafe(nil)); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1008 + # source://rspec-core//lib/rspec/core/configuration.rb#1029 def formatter_loader; end # Returns a duplicate of the formatters currently loaded in @@ -1535,33 +1525,42 @@ class RSpec::Core::Configuration # # @return [Array] the formatters currently loaded # - # source://rspec-core//lib/rspec/core/configuration.rb#1003 + # source://rspec-core//lib/rspec/core/configuration.rb#1024 def formatters; end # Toggle full backtrace. # # @attr true_or_false [Boolean] toggle full backtrace display # - # source://rspec-core//lib/rspec/core/configuration.rb#887 + # source://rspec-core//lib/rspec/core/configuration.rb#908 def full_backtrace=(true_or_false); end # Check if full backtrace is enabled. # # @return [Boolean] is full backtrace enabled # - # source://rspec-core//lib/rspec/core/configuration.rb#881 + # source://rspec-core//lib/rspec/core/configuration.rb#902 def full_backtrace?; end + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def full_cause_backtrace; end + + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def full_cause_backtrace=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def full_cause_backtrace?; end + # @return [Array] full description filter # - # source://rspec-core//lib/rspec/core/configuration.rb#956 + # source://rspec-core//lib/rspec/core/configuration.rb#977 def full_description; end # Run examples matching on `description` in all files to run. # # @param description [String, Regexp] the pattern to filter on # - # source://rspec-core//lib/rspec/core/configuration.rb#951 + # source://rspec-core//lib/rspec/core/configuration.rb#972 def full_description=(description); end # Holds the various registered hooks. Here we use a FilterableItemRepository @@ -1570,12 +1569,12 @@ class RSpec::Core::Configuration # # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#2082 + # source://rspec-core//lib/rspec/core/configuration.rb#2103 def hooks; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1581 + # source://rspec-core//lib/rspec/core/configuration.rb#1602 def in_project_source_dir_regex; end # Tells RSpec to include `mod` in example groups. Methods defined in @@ -1629,7 +1628,7 @@ class RSpec::Core::Configuration # @see #extend # @see #prepend # - # source://rspec-core//lib/rspec/core/configuration.rb#1404 + # source://rspec-core//lib/rspec/core/configuration.rb#1425 def include(mod, *filters); end # Tells RSpec to include the named shared example group in example groups. @@ -1672,13 +1671,13 @@ class RSpec::Core::Configuration # example. # @see #include # - # source://rspec-core//lib/rspec/core/configuration.rb#1451 + # source://rspec-core//lib/rspec/core/configuration.rb#1472 def include_context(shared_group_name, *filters); end # Returns the `inclusion_filter`. If none has been set, returns an empty # hash. # - # source://rspec-core//lib/rspec/core/configuration.rb#1292 + # source://rspec-core//lib/rspec/core/configuration.rb#1313 def inclusion_filter; end # Clears and reassigns the `inclusion_filter`. Set to `nil` if you don't @@ -1689,12 +1688,12 @@ class RSpec::Core::Configuration # This overrides any inclusion filters/tags set on the command line or in # configuration files. # - # source://rspec-core//lib/rspec/core/configuration.rb#1283 + # source://rspec-core//lib/rspec/core/configuration.rb#1304 def inclusion_filter=(filter); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1080 + # source://rspec-core//lib/rspec/core/configuration.rb#1101 def last_run_statuses; end # Returns dirs that have been prepended to the load path by the `-I` @@ -1707,28 +1706,28 @@ class RSpec::Core::Configuration # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#942 + # source://rspec-core//lib/rspec/core/configuration.rb#963 def libs=(libs); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1604 + # source://rspec-core//lib/rspec/core/configuration.rb#1625 def load_spec_files; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#503 + # source://rspec-core//lib/rspec/core/configuration.rb#522 def loaded_spec_files; end - # Maximum count of failed source lines to display in the failure reports. - # (default `10`). + # Maximum count of failed source lines to display in the failure reports + # (defaults to `10`). # return [Integer] # # source://rspec-core//lib/rspec/core/configuration.rb#66 def max_displayed_failure_line_count; end - # Maximum count of failed source lines to display in the failure reports. - # (default `10`). + # Maximum count of failed source lines to display in the failure reports + # (defaults to `10`). # return [Integer] # # source://rspec-core//lib/rspec/core/configuration.rb#89 @@ -1741,12 +1740,12 @@ class RSpec::Core::Configuration # # @return [Symbol] # - # source://rspec-core//lib/rspec/core/configuration.rb#648 + # source://rspec-core//lib/rspec/core/configuration.rb#669 def mock_framework; end # Delegates to mock_framework=(framework). # - # source://rspec-core//lib/rspec/core/configuration.rb#660 + # source://rspec-core//lib/rspec/core/configuration.rb#681 def mock_framework=(framework); end # Sets the mock framework adapter module. @@ -1779,19 +1778,19 @@ class RSpec::Core::Configuration # mod_config.custom_setting = true # end # - # source://rspec-core//lib/rspec/core/configuration.rb#765 + # source://rspec-core//lib/rspec/core/configuration.rb#786 def mock_with(framework); end # Invokes block before defining an example group # - # source://rspec-core//lib/rspec/core/configuration.rb#2087 + # source://rspec-core//lib/rspec/core/configuration.rb#2108 def on_example_group_definition(&block); end # Returns an array of blocks to call before defining an example group # # @api private # - # source://rspec-core//lib/rspec/core/configuration.rb#2093 + # source://rspec-core//lib/rspec/core/configuration.rb#2114 def on_example_group_definition_callbacks; end # Indicates if the `--only-failures` (or `--next-failure`) flag is being used. @@ -1817,15 +1816,15 @@ class RSpec::Core::Configuration # # @see #register_ordering # - # source://rspec-core//lib/rspec/core/configuration.rb#1647 + # source://rspec-core//lib/rspec/core/configuration.rb#1668 def order=(*args, &block); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#503 + # source://rspec-core//lib/rspec/core/configuration.rb#522 def ordering_manager; end - # source://rspec-core//lib/rspec/core/configuration.rb#1647 + # source://rspec-core//lib/rspec/core/configuration.rb#1668 def ordering_registry(*args, &block); end # Determines where RSpec will send its output. @@ -1878,6 +1877,31 @@ class RSpec::Core::Configuration # source://rspec-core//lib/rspec/core/configuration.rb#78 def pending_color?; end + # Format the output for pending examples. Can be set to: + # - :full (default) - pending examples appear similarly to failures + # - :no_backtrace - same as above, but with no backtrace + # - :skip - do not show the section at all + # return [Symbol] + # + # @raise [ArgumentError] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def pending_failure_output; end + + # Format the output for pending examples. Can be set to: + # - :full (default) - pending examples appear similarly to failures + # - :no_backtrace - same as above, but with no backtrace + # - :skip - do not show the section at all + # return [Symbol] + # + # @raise [ArgumentError] + # + # source://rspec-core//lib/rspec/core/configuration.rb#473 + def pending_failure_output=(mode); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def pending_failure_output?; end + # Tells RSpec to prepend example groups with `mod`. Methods defined in # `mod` are exposed to examples (not example groups). Use `filters` to # constrain the groups in which to prepend the module. @@ -1910,7 +1934,7 @@ class RSpec::Core::Configuration # @see #include # @see #extend # - # source://rspec-core//lib/rspec/core/configuration.rb#1533 + # source://rspec-core//lib/rspec/core/configuration.rb#1554 def prepend(mod, *filters); end # Defines a `after` hook. See {Hooks#after} for full docs. @@ -1924,7 +1948,7 @@ class RSpec::Core::Configuration # @see #before # @see #prepend_before # - # source://rspec-core//lib/rspec/core/configuration.rb#2004 + # source://rspec-core//lib/rspec/core/configuration.rb#2025 def prepend_after(scope = T.unsafe(nil), *meta, &block); end # Adds `block` to the start of the list of `before` blocks in the same @@ -1942,7 +1966,7 @@ class RSpec::Core::Configuration # @see #after # @see #append_after # - # source://rspec-core//lib/rspec/core/configuration.rb#1979 + # source://rspec-core//lib/rspec/core/configuration.rb#2000 def prepend_before(scope = T.unsafe(nil), *meta, &block); end # Defaults `profile_examples` to 10 examples when `@profile_examples` is @@ -1950,7 +1974,7 @@ class RSpec::Core::Configuration # # @api private # - # source://rspec-core//lib/rspec/core/configuration.rb#1052 + # source://rspec-core//lib/rspec/core/configuration.rb#1073 def profile_examples; end # Report the times for the slowest examples (default: `false`). @@ -2002,7 +2026,7 @@ class RSpec::Core::Configuration # rspec.raise_errors_for_deprecations! # end # - # source://rspec-core//lib/rspec/core/configuration.rb#1806 + # source://rspec-core//lib/rspec/core/configuration.rb#1827 def raise_errors_for_deprecations!; end # Turns warnings into errors. This can be useful when @@ -2014,7 +2038,7 @@ class RSpec::Core::Configuration # rspec.raise_on_warning = true # end # - # source://rspec-core//lib/rspec/core/configuration.rb#1754 + # source://rspec-core//lib/rspec/core/configuration.rb#1775 def raise_on_warning=(value); end # Registers a named ordering strategy that can later be @@ -2056,12 +2080,12 @@ class RSpec::Core::Configuration # @yieldparam list [Array<RSpec::Core::Example>, Array<RSpec::Core::ExampleGroup>] The examples or groups to order # @yieldreturn [Array<RSpec::Core::Example>, Array<RSpec::Core::ExampleGroup>] The re-ordered examples or groups # - # source://rspec-core//lib/rspec/core/configuration.rb#1647 + # source://rspec-core//lib/rspec/core/configuration.rb#1668 def register_ordering(*args, &block); end # @return [RSpec::Core::Reporter] the currently configured reporter # - # source://rspec-core//lib/rspec/core/configuration.rb#1035 + # source://rspec-core//lib/rspec/core/configuration.rb#1056 def reporter; end # Indicates files configured to be required. @@ -2073,22 +2097,22 @@ class RSpec::Core::Configuration # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1573 + # source://rspec-core//lib/rspec/core/configuration.rb#1594 def requires=(paths); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#580 + # source://rspec-core//lib/rspec/core/configuration.rb#601 def reset; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#593 + # source://rspec-core//lib/rspec/core/configuration.rb#614 def reset_filters; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#586 + # source://rspec-core//lib/rspec/core/configuration.rb#607 def reset_reporter; end # Run all examples if none match the configured filters @@ -2124,15 +2148,15 @@ class RSpec::Core::Configuration # We recommend, actually, that you use the command line approach so you # don't accidentally leave the seed encoded. # - # source://rspec-core//lib/rspec/core/configuration.rb#1647 + # source://rspec-core//lib/rspec/core/configuration.rb#1668 def seed(*args, &block); end # Sets the seed value and sets the default global ordering to random. # - # source://rspec-core//lib/rspec/core/configuration.rb#1647 + # source://rspec-core//lib/rspec/core/configuration.rb#1668 def seed=(*args, &block); end - # source://rspec-core//lib/rspec/core/configuration.rb#1647 + # source://rspec-core//lib/rspec/core/configuration.rb#1668 def seed_used?(*args, &block); end # Configures how RSpec treats metadata passed as part of a shared example @@ -2200,7 +2224,7 @@ class RSpec::Core::Configuration # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1117 + # source://rspec-core//lib/rspec/core/configuration.rb#1138 def spec_files_with_failures; end # source://rspec-core//lib/rspec/core/configuration.rb#66 @@ -2214,12 +2238,12 @@ class RSpec::Core::Configuration # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#501 + # source://rspec-core//lib/rspec/core/configuration.rb#520 def static_config_filter_manager; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#501 + # source://rspec-core//lib/rspec/core/configuration.rb#520 def static_config_filter_manager=(_arg0); end # Color to use to indicate success. Defaults to `:green` but can be set @@ -2278,12 +2302,12 @@ class RSpec::Core::Configuration # Set Ruby warnings on or off. # - # source://rspec-core//lib/rspec/core/configuration.rb#1734 + # source://rspec-core//lib/rspec/core/configuration.rb#1755 def warnings=(value); end # @return [Boolean] Whether or not ruby warnings are enabled. # - # source://rspec-core//lib/rspec/core/configuration.rb#1739 + # source://rspec-core//lib/rspec/core/configuration.rb#1760 def warnings?; end # Defines a callback that runs after the first example with matching @@ -2305,22 +2329,22 @@ class RSpec::Core::Configuration # end # end # - # source://rspec-core//lib/rspec/core/configuration.rb#1896 + # source://rspec-core//lib/rspec/core/configuration.rb#1917 def when_first_matching_example_defined(*filters); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#2064 + # source://rspec-core//lib/rspec/core/configuration.rb#2085 def with_suite_hooks; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#499 + # source://rspec-core//lib/rspec/core/configuration.rb#518 def world; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#499 + # source://rspec-core//lib/rspec/core/configuration.rb#518 def world=(_arg0); end private @@ -2329,111 +2353,111 @@ class RSpec::Core::Configuration # # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#2220 + # source://rspec-core//lib/rspec/core/configuration.rb#2248 def absolute_pattern?(pattern); end - # source://rspec-core//lib/rspec/core/configuration.rb#2321 + # source://rspec-core//lib/rspec/core/configuration.rb#2349 def add_hook_to_existing_matching_groups(meta, scope, &block); end # @raise [MustBeConfiguredBeforeExampleGroupsError] # - # source://rspec-core//lib/rspec/core/configuration.rb#2260 + # source://rspec-core//lib/rspec/core/configuration.rb#2288 def assert_no_example_groups_defined(config_option); end - # source://rspec-core//lib/rspec/core/configuration.rb#2310 + # source://rspec-core//lib/rspec/core/configuration.rb#2338 def clear_values_derived_from_example_status_persistence_file_path; end - # source://rspec-core//lib/rspec/core/configuration.rb#2242 + # source://rspec-core//lib/rspec/core/configuration.rb#2270 def command; end - # source://rspec-core//lib/rspec/core/configuration.rb#2286 + # source://rspec-core//lib/rspec/core/configuration.rb#2314 def conditionally_disable_expectations_monkey_patching; end - # source://rspec-core//lib/rspec/core/configuration.rb#2277 + # source://rspec-core//lib/rspec/core/configuration.rb#2305 def conditionally_disable_mocks_monkey_patching; end - # source://rspec-core//lib/rspec/core/configuration.rb#2315 + # source://rspec-core//lib/rspec/core/configuration.rb#2343 def configure_group_with(group, module_list, application_method); end - # source://rspec-core//lib/rspec/core/configuration.rb#2250 + # source://rspec-core//lib/rspec/core/configuration.rb#2278 def define_built_in_hooks; end - # source://rspec-core//lib/rspec/core/configuration.rb#2373 + # source://rspec-core//lib/rspec/core/configuration.rb#2401 def define_mixed_in_module(mod, filters, mod_list, config_method, &block); end - # source://rspec-core//lib/rspec/core/configuration.rb#2225 + # source://rspec-core//lib/rspec/core/configuration.rb#2253 def extract_location(path); end - # source://rspec-core//lib/rspec/core/configuration.rb#2202 + # source://rspec-core//lib/rspec/core/configuration.rb#2230 def file_glob_from(path, pattern); end - # source://rspec-core//lib/rspec/core/configuration.rb#2191 + # source://rspec-core//lib/rspec/core/configuration.rb#2219 def gather_directories(path); end - # source://rspec-core//lib/rspec/core/configuration.rb#2170 + # source://rspec-core//lib/rspec/core/configuration.rb#2198 def get_files_to_run(paths); end - # source://rspec-core//lib/rspec/core/configuration.rb#2197 + # source://rspec-core//lib/rspec/core/configuration.rb#2225 def get_matching_files(path, pattern); end - # source://rspec-core//lib/rspec/core/configuration.rb#2137 + # source://rspec-core//lib/rspec/core/configuration.rb#2165 def handle_suite_hook(scope, meta); end - # source://rspec-core//lib/rspec/core/configuration.rb#2116 + # source://rspec-core//lib/rspec/core/configuration.rb#2137 def load_file_handling_errors(method, file); end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#2343 + # source://rspec-core//lib/rspec/core/configuration.rb#2371 def metadata_applies_to_group?(meta, group); end - # source://rspec-core//lib/rspec/core/configuration.rb#2335 + # source://rspec-core//lib/rspec/core/configuration.rb#2363 def on_existing_matching_groups(meta); end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#2273 + # source://rspec-core//lib/rspec/core/configuration.rb#2301 def output_to_tty?(output = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/configuration.rb#2269 + # source://rspec-core//lib/rspec/core/configuration.rb#2297 def output_wrapper; end - # source://rspec-core//lib/rspec/core/configuration.rb#2182 + # source://rspec-core//lib/rspec/core/configuration.rb#2210 def paths_to_check(paths); end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#2187 + # source://rspec-core//lib/rspec/core/configuration.rb#2215 def pattern_might_load_specs_from_vendored_dirs?; end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#2296 + # source://rspec-core//lib/rspec/core/configuration.rb#2324 def rspec_expectations_loaded?; end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#2292 + # source://rspec-core//lib/rspec/core/configuration.rb#2320 def rspec_mocks_loaded?; end - # source://rspec-core//lib/rspec/core/configuration.rb#2152 + # source://rspec-core//lib/rspec/core/configuration.rb#2180 def run_suite_hooks(hook_description, hooks); end - # source://rspec-core//lib/rspec/core/configuration.rb#2358 + # source://rspec-core//lib/rspec/core/configuration.rb#2386 def safe_extend(mod, host); end # :nocov: # - # source://rspec-core//lib/rspec/core/configuration.rb#2354 + # source://rspec-core//lib/rspec/core/configuration.rb#2382 def safe_include(mod, host); end - # source://rspec-core//lib/rspec/core/configuration.rb#2348 + # source://rspec-core//lib/rspec/core/configuration.rb#2376 def safe_prepend(mod, host); end - # source://rspec-core//lib/rspec/core/configuration.rb#2300 + # source://rspec-core//lib/rspec/core/configuration.rb#2328 def update_pattern_attr(name, value); end - # source://rspec-core//lib/rspec/core/configuration.rb#2246 + # source://rspec-core//lib/rspec/core/configuration.rb#2274 def value_for(key); end class << self @@ -2469,14 +2493,14 @@ class RSpec::Core::Configuration # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1645 + # source://rspec-core//lib/rspec/core/configuration.rb#1666 def delegate_to_ordering_manager(*methods); end end end # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1625 +# source://rspec-core//lib/rspec/core/configuration.rb#1646 RSpec::Core::Configuration::DEFAULT_FORMATTER = T.let(T.unsafe(nil), Proc) # This buffer is used to capture all messages sent to the reporter during @@ -2486,33 +2510,33 @@ RSpec::Core::Configuration::DEFAULT_FORMATTER = T.let(T.unsafe(nil), Proc) # # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1018 +# source://rspec-core//lib/rspec/core/configuration.rb#1039 class RSpec::Core::Configuration::DeprecationReporterBuffer # @return [DeprecationReporterBuffer] a new instance of DeprecationReporterBuffer # - # source://rspec-core//lib/rspec/core/configuration.rb#1019 + # source://rspec-core//lib/rspec/core/configuration.rb#1040 def initialize; end - # source://rspec-core//lib/rspec/core/configuration.rb#1023 + # source://rspec-core//lib/rspec/core/configuration.rb#1044 def deprecation(*args); end - # source://rspec-core//lib/rspec/core/configuration.rb#1027 + # source://rspec-core//lib/rspec/core/configuration.rb#1048 def play_onto(reporter); end end # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1794 +# source://rspec-core//lib/rspec/core/configuration.rb#1815 module RSpec::Core::Configuration::ExposeCurrentExample; end # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1105 +# source://rspec-core//lib/rspec/core/configuration.rb#1126 RSpec::Core::Configuration::FAILED_STATUS = T.let(T.unsafe(nil), String) # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#728 +# source://rspec-core//lib/rspec/core/configuration.rb#749 RSpec::Core::Configuration::MOCKING_ADAPTERS = T.let(T.unsafe(nil), Hash) # @private @@ -2522,17 +2546,17 @@ class RSpec::Core::Configuration::MustBeConfiguredBeforeExampleGroupsError < ::S # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1108 +# source://rspec-core//lib/rspec/core/configuration.rb#1129 RSpec::Core::Configuration::PASSED_STATUS = T.let(T.unsafe(nil), String) # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1111 +# source://rspec-core//lib/rspec/core/configuration.rb#1132 RSpec::Core::Configuration::PENDING_STATUS = T.let(T.unsafe(nil), String) # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1744 +# source://rspec-core//lib/rspec/core/configuration.rb#1765 RSpec::Core::Configuration::RAISE_ERROR_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc) # Module that holds `attr_reader` declarations. It's in a separate @@ -2590,6 +2614,9 @@ module RSpec::Core::Configuration::Readers # source://rspec-core//lib/rspec/core/configuration.rb#63 def fixed_color; end + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def full_cause_backtrace; end + # source://rspec-core//lib/rspec/core/configuration.rb#63 def libs; end @@ -2608,6 +2635,9 @@ module RSpec::Core::Configuration::Readers # source://rspec-core//lib/rspec/core/configuration.rb#63 def pending_color; end + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def pending_failure_output; end + # source://rspec-core//lib/rspec/core/configuration.rb#63 def project_source_dirs; end @@ -2638,12 +2668,12 @@ end # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1102 +# source://rspec-core//lib/rspec/core/configuration.rb#1123 RSpec::Core::Configuration::UNKNOWN_STATUS = T.let(T.unsafe(nil), String) # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1114 +# source://rspec-core//lib/rspec/core/configuration.rb#1135 RSpec::Core::Configuration::VALID_STATUSES = T.let(T.unsafe(nil), Array) # Responsible for utilizing externally provided configuration options, @@ -2687,22 +2717,22 @@ class RSpec::Core::ConfigurationOptions private - # source://rspec-core//lib/rspec/core/configuration_options.rb#169 + # source://rspec-core//lib/rspec/core/configuration_options.rb#173 def args_from_options_file(path); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#138 + # source://rspec-core//lib/rspec/core/configuration_options.rb#142 def command_line_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#142 + # source://rspec-core//lib/rspec/core/configuration_options.rb#146 def custom_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#183 + # source://rspec-core//lib/rspec/core/configuration_options.rb#188 def custom_options_file; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#129 + # source://rspec-core//lib/rspec/core/configuration_options.rb#133 def env_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#121 + # source://rspec-core//lib/rspec/core/configuration_options.rb#125 def file_options; end # @return [Boolean] @@ -2710,28 +2740,28 @@ class RSpec::Core::ConfigurationOptions # source://rspec-core//lib/rspec/core/configuration_options.rb#66 def force?(key); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#154 + # source://rspec-core//lib/rspec/core/configuration_options.rb#158 def global_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#195 + # source://rspec-core//lib/rspec/core/configuration_options.rb#200 def global_options_file; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#206 + # source://rspec-core//lib/rspec/core/configuration_options.rb#211 def home_options_file_path; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#117 + # source://rspec-core//lib/rspec/core/configuration_options.rb#121 def load_formatters_into(config); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#146 + # source://rspec-core//lib/rspec/core/configuration_options.rb#150 def local_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#191 + # source://rspec-core//lib/rspec/core/configuration_options.rb#196 def local_options_file; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#175 + # source://rspec-core//lib/rspec/core/configuration_options.rb#180 def options_file_as_erb_string(path); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#158 + # source://rspec-core//lib/rspec/core/configuration_options.rb#162 def options_from(path); end # source://rspec-core//lib/rspec/core/configuration_options.rb#70 @@ -2740,25 +2770,25 @@ class RSpec::Core::ConfigurationOptions # source://rspec-core//lib/rspec/core/configuration_options.rb#44 def organize_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#163 + # source://rspec-core//lib/rspec/core/configuration_options.rb#167 def parse_args_ignoring_files_or_dirs_to_run(args, source); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#109 + # source://rspec-core//lib/rspec/core/configuration_options.rb#113 def process_options_into(config); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#150 + # source://rspec-core//lib/rspec/core/configuration_options.rb#154 def project_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#187 + # source://rspec-core//lib/rspec/core/configuration_options.rb#192 def project_options_file; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#222 + # source://rspec-core//lib/rspec/core/configuration_options.rb#227 def resolve_xdg_config_home; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#199 + # source://rspec-core//lib/rspec/core/configuration_options.rb#204 def xdg_options_file_if_exists; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#215 + # source://rspec-core//lib/rspec/core/configuration_options.rb#220 def xdg_options_file_path; end end @@ -4308,7 +4338,7 @@ end # were loaded but not executed (due to filtering, `--fail-fast` # or whatever) should have a `:status` of `UNKNOWN_STATUS`. # -# This willl produce a new list that: +# This will produce a new list that: # - Will be missing examples from previous runs that we know for sure # no longer exist. # - Will have the latest known status for any examples that either @@ -4648,7 +4678,7 @@ end # # This is ideal for use by a example or example group, which may # be updated multiple times with globally configured hooks, etc, -# but will not be queried frequently by other examples or examle +# but will not be queried frequently by other examples or example # groups. # # @private @@ -5319,7 +5349,7 @@ class RSpec::Core::Formatters::ExceptionPresenter # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#16 def initialize(exception, example, options = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#73 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#78 def colorized_formatted_backtrace(colorizer = T.unsafe(nil)); end # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#33 @@ -5348,10 +5378,10 @@ class RSpec::Core::Formatters::ExceptionPresenter # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#45 def formatted_cause(exception); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#79 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#84 def fully_formatted(failure_number, colorizer = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#84 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#89 def fully_formatted_lines(failure_number, colorizer); end # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#29 @@ -5359,7 +5389,7 @@ class RSpec::Core::Formatters::ExceptionPresenter private - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#207 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#224 def add_shared_group_lines(lines, colorizer); end # Returns the value of attribute backtrace_formatter. @@ -5374,27 +5404,27 @@ class RSpec::Core::Formatters::ExceptionPresenter # for 1.8.7 # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#265 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#282 def encoded_description(description); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#115 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#120 def encoded_string(string); end # :nocov: # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#111 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#116 def encoding_of(string); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#275 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#292 def exception_backtrace; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#145 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#150 def exception_class_name(exception = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#185 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#202 def exception_lines; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#178 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#194 def exception_message_string(exception); end # Returns the value of attribute extra_detail_formatter. @@ -5402,25 +5432,25 @@ class RSpec::Core::Formatters::ExceptionPresenter # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 def extra_detail_formatter; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#196 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#213 def extra_failure_lines; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#151 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#156 def failure_lines; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#165 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#170 def failure_slash_error_lines; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#99 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#104 def final_exception(exception, previous = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#241 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#258 def find_failed_line; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#256 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#273 def formatted_message_and_backtrace(colorizer); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#129 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#134 def indent_lines(lines, failure_number); end # Returns the value of attribute message_color. @@ -5428,7 +5458,7 @@ class RSpec::Core::Formatters::ExceptionPresenter # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 def message_color; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#217 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#234 def read_failed_lines; end end @@ -5439,49 +5469,49 @@ end # # @private # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#284 +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#301 class RSpec::Core::Formatters::ExceptionPresenter::Factory # @return [Factory] a new instance of Factory # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#291 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#308 def initialize(example); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#285 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#302 def build; end private - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#342 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#363 def multiple_exception_summarizer(exception, prior_detail_formatter, color); end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#338 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#359 def multiple_exceptions_error?(exception); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#301 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#318 def options; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#305 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#322 def pending_options; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#363 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#384 def sub_failure_list_formatter(exception, message_color); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#322 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#343 def with_multiple_error_options_as_needed(exception, options); end end # @private # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#396 +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#417 class RSpec::Core::Formatters::ExceptionPresenter::Factory::CommonBacktraceTruncater # @return [CommonBacktraceTruncater] a new instance of CommonBacktraceTruncater # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#397 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#418 def initialize(parent); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#401 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#422 def with_truncated_backtrace(child); end end @@ -5490,17 +5520,17 @@ end # # @private # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#389 +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#410 module RSpec::Core::Formatters::ExceptionPresenter::Factory::EmptyBacktraceFormatter class << self - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#390 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#411 def format_backtrace(*_arg0); end end end # @private # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#421 +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#442 RSpec::Core::Formatters::ExceptionPresenter::PENDING_DETAIL_FORMATTER = T.let(T.unsafe(nil), Proc) # @private @@ -5689,7 +5719,6 @@ end # # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#7 class RSpec::Core::Formatters::HtmlPrinter - include ::ERB::Escape include ::ERB::Util # @return [HtmlPrinter] a new instance of HtmlPrinter @@ -5763,20 +5792,20 @@ class RSpec::Core::Formatters::JsonFormatter < ::RSpec::Core::Formatters::BaseFo # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#13 def initialize(output); end - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#55 + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#56 def close(_notification); end - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#59 + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#60 def dump_profile(profile); end # @api private # - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#78 + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#79 def dump_profile_slowest_example_groups(profile); end # @api private # - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#66 + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#67 def dump_profile_slowest_examples(profile); end # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#24 @@ -5790,15 +5819,15 @@ class RSpec::Core::Formatters::JsonFormatter < ::RSpec::Core::Formatters::BaseFo # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#11 def output_hash; end - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#50 + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#51 def seed(notification); end # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#35 - def stop(notification); end + def stop(group_notification); end private - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#87 + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#88 def format_example(example); end end @@ -8129,57 +8158,57 @@ end # individual spec has multiple exceptions, such as one in the `it` block # and one in an `after` block. # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#431 +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#457 class RSpec::Core::MultipleExceptionError < ::StandardError include ::RSpec::Core::MultipleExceptionError::InterfaceTag # @param exceptions [Array<Exception>] The initial list of exceptions. # @return [MultipleExceptionError] a new instance of MultipleExceptionError # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#492 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#513 def initialize(*exceptions); end # @return [nil] Provided only for interface compatibility with # `RSpec::Expectations::MultipleExpectationsNotMetError`. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#489 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#510 def aggregation_block_label; end # @return [Hash] Metadata used by RSpec for formatting purposes. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#485 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#506 def aggregation_metadata; end # @return [Array<Exception>] The list of failures and other exceptions, combined. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#482 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#503 def all_exceptions; end # return [String] A description of the failure/error counts. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#517 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#538 def exception_count_description; end # @return [Array<Exception>] The list of failures. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#476 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#497 def failures; end # @note RSpec does not actually use this -- instead it formats each exception # individually. # @return [String] Combines all the exception messages into a single string. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#507 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#528 def message; end # @return [Array<Exception>] The list of other errors. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#479 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#500 def other_errors; end # @return [String] A summary of the failure, including the block label and a count of failures. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#512 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#533 def summary; end end @@ -8190,14 +8219,14 @@ end # # @private # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#437 +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#458 module RSpec::Core::MultipleExceptionError::InterfaceTag # Appends the provided exception to the list. # # @param exception [Exception] Exception to append to the list. # @private # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#441 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#462 def add(exception); end class << self @@ -8207,7 +8236,7 @@ module RSpec::Core::MultipleExceptionError::InterfaceTag # # @private # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#467 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#488 def for(ex); end end end @@ -8222,7 +8251,7 @@ module RSpec::Core::Notifications; end # other registered listeners, it creates attributes based on supplied hash # of options. # -# source://rspec-core//lib/rspec/core/notifications.rb#510 +# source://rspec-core//lib/rspec/core/notifications.rb#516 class RSpec::Core::Notifications::CustomNotification < ::Struct class << self # Build a custom notification based on the supplied option key / values. @@ -8230,7 +8259,7 @@ class RSpec::Core::Notifications::CustomNotification < ::Struct # @param options [Hash] A hash of method / value pairs to create on this notification # @return [CustomNotification] # - # source://rspec-core//lib/rspec/core/notifications.rb#515 + # source://rspec-core//lib/rspec/core/notifications.rb#517 def for(options = T.unsafe(nil)); end end end @@ -8246,7 +8275,7 @@ end # @attr call_site [String] An optional call site from which the deprecation # was issued # -# source://rspec-core//lib/rspec/core/notifications.rb#491 +# source://rspec-core//lib/rspec/core/notifications.rb#493 class RSpec::Core::Notifications::DeprecationNotification < ::Struct # An optional call site from which the deprecation # was issued @@ -8303,7 +8332,7 @@ class RSpec::Core::Notifications::DeprecationNotification < ::Struct # # @api # - # source://rspec-core//lib/rspec/core/notifications.rb#497 + # source://rspec-core//lib/rspec/core/notifications.rb#499 def from_hash(data); end def inspect; end @@ -8419,7 +8448,7 @@ class RSpec::Core::Notifications::ExamplesNotification private - # source://rspec-core//lib/rspec/core/notifications.rb#134 + # source://rspec-core//lib/rspec/core/notifications.rb#136 def format_examples(examples); end end @@ -8436,11 +8465,11 @@ end # end # @see ExampleNotification # -# source://rspec-core//lib/rspec/core/notifications.rb#154 +# source://rspec-core//lib/rspec/core/notifications.rb#156 class RSpec::Core::Notifications::FailedExampleNotification < ::RSpec::Core::Notifications::ExampleNotification # @return [FailedExampleNotification] a new instance of FailedExampleNotification # - # source://rspec-core//lib/rspec/core/notifications.rb#211 + # source://rspec-core//lib/rspec/core/notifications.rb#213 def initialize(example, exception_presenter = T.unsafe(nil)); end # Returns the failures colorized formatted backtrace. @@ -8448,7 +8477,7 @@ class RSpec::Core::Notifications::FailedExampleNotification < ::RSpec::Core::Not # @param colorizer [#wrap] An object to colorize the message_lines by # @return [Array<String>] the examples colorized backtrace lines # - # source://rspec-core//lib/rspec/core/notifications.rb#193 + # source://rspec-core//lib/rspec/core/notifications.rb#195 def colorized_formatted_backtrace(colorizer = T.unsafe(nil)); end # Returns the message generated for this failure colorized line by line. @@ -8456,48 +8485,44 @@ class RSpec::Core::Notifications::FailedExampleNotification < ::RSpec::Core::Not # @param colorizer [#wrap] An object to colorize the message_lines by # @return [Array<String>] The example failure message colorized # - # source://rspec-core//lib/rspec/core/notifications.rb#178 + # source://rspec-core//lib/rspec/core/notifications.rb#180 def colorized_message_lines(colorizer = T.unsafe(nil)); end # @return [String] The example description # - # source://rspec-core//lib/rspec/core/notifications.rb#163 + # source://rspec-core//lib/rspec/core/notifications.rb#165 def description; end # @return [Exception] The example failure # - # source://rspec-core//lib/rspec/core/notifications.rb#158 + # source://rspec-core//lib/rspec/core/notifications.rb#160 def exception; end # Returns the failures formatted backtrace. # # @return [Array<String>] the examples backtrace lines # - # source://rspec-core//lib/rspec/core/notifications.rb#185 + # source://rspec-core//lib/rspec/core/notifications.rb#187 def formatted_backtrace; end # @return [String] The failure information fully formatted in the way that # RSpec's built-in formatters emit. # - # source://rspec-core//lib/rspec/core/notifications.rb#199 + # source://rspec-core//lib/rspec/core/notifications.rb#201 def fully_formatted(failure_number, colorizer = T.unsafe(nil)); end # @return [Array<string>] The failure information fully formatted in the way that # RSpec's built-in formatters emit, split by line. # - # source://rspec-core//lib/rspec/core/notifications.rb#205 + # source://rspec-core//lib/rspec/core/notifications.rb#207 def fully_formatted_lines(failure_number, colorizer = T.unsafe(nil)); end # Returns the message generated for this failure line by line. # # @return [Array<String>] The example failure message # - # source://rspec-core//lib/rspec/core/notifications.rb#170 + # source://rspec-core//lib/rspec/core/notifications.rb#172 def message_lines; end - - class << self - def new(*_arg0); end - end end # The `GroupNotification` represents notifications sent by the reporter @@ -8511,7 +8536,7 @@ end # puts "Hey I started #{notification.group.description}" # end # -# source://rspec-core//lib/rspec/core/notifications.rb#256 +# source://rspec-core//lib/rspec/core/notifications.rb#258 class RSpec::Core::Notifications::GroupNotification < ::Struct # the current group # @@ -8538,7 +8563,7 @@ end # # @attr message [String] the message # -# source://rspec-core//lib/rspec/core/notifications.rb#262 +# source://rspec-core//lib/rspec/core/notifications.rb#264 class RSpec::Core::Notifications::MessageNotification < ::Struct # the message # @@ -8578,17 +8603,17 @@ end # `NullNotification` represents a placeholder value for notifications that # currently require no information, but we may wish to extend in future. # -# source://rspec-core//lib/rspec/core/notifications.rb#504 +# source://rspec-core//lib/rspec/core/notifications.rb#506 class RSpec::Core::Notifications::NullNotification; end # @deprecated Use {FailedExampleNotification} instead. # -# source://rspec-core//lib/rspec/core/notifications.rb#221 +# source://rspec-core//lib/rspec/core/notifications.rb#223 class RSpec::Core::Notifications::PendingExampleFailedAsExpectedNotification < ::RSpec::Core::Notifications::FailedExampleNotification; end # @deprecated Use {FailedExampleNotification} instead. # -# source://rspec-core//lib/rspec/core/notifications.rb#218 +# source://rspec-core//lib/rspec/core/notifications.rb#220 class RSpec::Core::Notifications::PendingExampleFixedNotification < ::RSpec::Core::Notifications::FailedExampleNotification; end # The `ProfileNotification` holds information about the results of running a @@ -8600,57 +8625,57 @@ class RSpec::Core::Notifications::PendingExampleFixedNotification < ::RSpec::Cor # @attr number_of_examples [Fixnum] the number of examples to profile # @attr example_groups [Array<RSpec::Core::Profiler>] example groups run # -# source://rspec-core//lib/rspec/core/notifications.rb#427 +# source://rspec-core//lib/rspec/core/notifications.rb#429 class RSpec::Core::Notifications::ProfileNotification # @return [ProfileNotification] a new instance of ProfileNotification # - # source://rspec-core//lib/rspec/core/notifications.rb#428 + # source://rspec-core//lib/rspec/core/notifications.rb#430 def initialize(duration, examples, number_of_examples, example_groups); end # the time taken (in seconds) to run the suite # # @return [Float] the current value of duration # - # source://rspec-core//lib/rspec/core/notifications.rb#434 + # source://rspec-core//lib/rspec/core/notifications.rb#436 def duration; end # the examples run # # @return [Array<RSpec::Core::Example>] the current value of examples # - # source://rspec-core//lib/rspec/core/notifications.rb#434 + # source://rspec-core//lib/rspec/core/notifications.rb#436 def examples; end # the number of examples to profile # # @return [Fixnum] the current value of number_of_examples # - # source://rspec-core//lib/rspec/core/notifications.rb#434 + # source://rspec-core//lib/rspec/core/notifications.rb#436 def number_of_examples; end # @return [String] the percentage of total time taken # - # source://rspec-core//lib/rspec/core/notifications.rb#453 + # source://rspec-core//lib/rspec/core/notifications.rb#455 def percentage; end # @return [Float] the time taken (in seconds) to run the slowest examples # - # source://rspec-core//lib/rspec/core/notifications.rb#445 + # source://rspec-core//lib/rspec/core/notifications.rb#447 def slow_duration; end # @return [Array<RSpec::Core::Example>] the slowest examples # - # source://rspec-core//lib/rspec/core/notifications.rb#437 + # source://rspec-core//lib/rspec/core/notifications.rb#439 def slowest_examples; end # @return [Array<RSpec::Core::Example>] the slowest example groups # - # source://rspec-core//lib/rspec/core/notifications.rb#462 + # source://rspec-core//lib/rspec/core/notifications.rb#464 def slowest_groups; end private - # source://rspec-core//lib/rspec/core/notifications.rb#468 + # source://rspec-core//lib/rspec/core/notifications.rb#470 def calculate_slowest_groups; end end @@ -8660,12 +8685,12 @@ end # @attr seed [Fixnum] the seed used to randomize ordering # @attr used [Boolean] whether the seed has been used or not # -# source://rspec-core//lib/rspec/core/notifications.rb#269 +# source://rspec-core//lib/rspec/core/notifications.rb#271 class RSpec::Core::Notifications::SeedNotification < ::Struct # @return [String] The seed information fully formatted in the way that # RSpec's built-in formatters emit. # - # source://rspec-core//lib/rspec/core/notifications.rb#280 + # source://rspec-core//lib/rspec/core/notifications.rb#282 def fully_formatted; end # the seed used to randomize ordering @@ -8682,7 +8707,7 @@ class RSpec::Core::Notifications::SeedNotification < ::Struct # @api # @return [Boolean] has the seed been used? # - # source://rspec-core//lib/rspec/core/notifications.rb#273 + # source://rspec-core//lib/rspec/core/notifications.rb#275 def seed_used?; end # whether the seed has been used or not @@ -8713,17 +8738,13 @@ end # @attr example [RSpec::Core::Example] the current example # @see ExampleNotification # -# source://rspec-core//lib/rspec/core/notifications.rb#228 +# source://rspec-core//lib/rspec/core/notifications.rb#230 class RSpec::Core::Notifications::SkippedExampleNotification < ::RSpec::Core::Notifications::ExampleNotification # @return [String] The pending detail fully formatted in the way that # RSpec's built-in formatters emit. # - # source://rspec-core//lib/rspec/core/notifications.rb#233 + # source://rspec-core//lib/rspec/core/notifications.rb#235 def fully_formatted(pending_number, colorizer = T.unsafe(nil)); end - - class << self - def new(*_arg0); end - end end # The `StartNotification` represents a notification sent by the reporter @@ -8783,7 +8804,7 @@ end # have occurred processing # the spec suite # -# source://rspec-core//lib/rspec/core/notifications.rb#298 +# source://rspec-core//lib/rspec/core/notifications.rb#300 class RSpec::Core::Notifications::SummaryNotification < ::Struct include ::RSpec::Core::ShellEscape @@ -8794,7 +8815,7 @@ class RSpec::Core::Notifications::SummaryNotification < ::Struct # specific colors. # @return [String] A colorized summary line. # - # source://rspec-core//lib/rspec/core/notifications.rb#362 + # source://rspec-core//lib/rspec/core/notifications.rb#364 def colorized_rerun_commands(colorizer = T.unsafe(nil)); end # Wraps the results line with colors based on the configured @@ -8806,7 +8827,7 @@ class RSpec::Core::Notifications::SummaryNotification < ::Struct # specific colors. # @return [String] A colorized results line. # - # source://rspec-core//lib/rspec/core/notifications.rb#345 + # source://rspec-core//lib/rspec/core/notifications.rb#347 def colorized_totals_line(colorizer = T.unsafe(nil)); end # the time taken (in seconds) to run the suite @@ -8838,7 +8859,7 @@ class RSpec::Core::Notifications::SummaryNotification < ::Struct # @api # @return [Fixnum] the number of examples run # - # source://rspec-core//lib/rspec/core/notifications.rb#304 + # source://rspec-core//lib/rspec/core/notifications.rb#306 def example_count; end # the examples run @@ -8866,25 +8887,25 @@ class RSpec::Core::Notifications::SummaryNotification < ::Struct # @api # @return [Fixnum] the number of failed examples # - # source://rspec-core//lib/rspec/core/notifications.rb#310 + # source://rspec-core//lib/rspec/core/notifications.rb#312 def failure_count; end # @return [String] a formatted version of the time it took to run the # suite # - # source://rspec-core//lib/rspec/core/notifications.rb#372 + # source://rspec-core//lib/rspec/core/notifications.rb#374 def formatted_duration; end # @return [String] a formatted version of the time it took to boot RSpec # and load the spec files # - # source://rspec-core//lib/rspec/core/notifications.rb#378 + # source://rspec-core//lib/rspec/core/notifications.rb#380 def formatted_load_time; end # @return [String] The summary information fully formatted in the way that # RSpec's built-in formatters emit. # - # source://rspec-core//lib/rspec/core/notifications.rb#384 + # source://rspec-core//lib/rspec/core/notifications.rb#386 def fully_formatted(colorizer = T.unsafe(nil)); end # the number of seconds taken to boot RSpec @@ -8903,7 +8924,7 @@ class RSpec::Core::Notifications::SummaryNotification < ::Struct # @api # @return [Fixnum] the number of pending examples # - # source://rspec-core//lib/rspec/core/notifications.rb#316 + # source://rspec-core//lib/rspec/core/notifications.rb#318 def pending_count; end # the pending examples @@ -8920,15 +8941,15 @@ class RSpec::Core::Notifications::SummaryNotification < ::Struct # @api # @return [String] A line summarising the result totals of the spec run. # - # source://rspec-core//lib/rspec/core/notifications.rb#322 + # source://rspec-core//lib/rspec/core/notifications.rb#324 def totals_line; end private - # source://rspec-core//lib/rspec/core/notifications.rb#406 + # source://rspec-core//lib/rspec/core/notifications.rb#408 def duplicate_rerun_locations; end - # source://rspec-core//lib/rspec/core/notifications.rb#400 + # source://rspec-core//lib/rspec/core/notifications.rb#402 def rerun_argument_for(example); end class << self @@ -8965,38 +8986,38 @@ module RSpec::Core::Ordering; end # the APIs provided by `RSpec::Core::Configuration` instead. # @private # -# source://rspec-core//lib/rspec/core/ordering.rb#116 +# source://rspec-core//lib/rspec/core/ordering.rb#144 class RSpec::Core::Ordering::ConfigurationManager # @return [ConfigurationManager] a new instance of ConfigurationManager # - # source://rspec-core//lib/rspec/core/ordering.rb#119 + # source://rspec-core//lib/rspec/core/ordering.rb#147 def initialize; end - # source://rspec-core//lib/rspec/core/ordering.rb#151 + # source://rspec-core//lib/rspec/core/ordering.rb#190 def force(hash); end - # source://rspec-core//lib/rspec/core/ordering.rb#136 + # source://rspec-core//lib/rspec/core/ordering.rb#164 def order=(type); end # Returns the value of attribute ordering_registry. # - # source://rspec-core//lib/rspec/core/ordering.rb#117 + # source://rspec-core//lib/rspec/core/ordering.rb#145 def ordering_registry; end - # source://rspec-core//lib/rspec/core/ordering.rb#162 + # source://rspec-core//lib/rspec/core/ordering.rb#201 def register_ordering(name, strategy = T.unsafe(nil)); end # Returns the value of attribute seed. # - # source://rspec-core//lib/rspec/core/ordering.rb#117 + # source://rspec-core//lib/rspec/core/ordering.rb#145 def seed; end - # source://rspec-core//lib/rspec/core/ordering.rb#130 + # source://rspec-core//lib/rspec/core/ordering.rb#158 def seed=(seed); end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/ordering.rb#126 + # source://rspec-core//lib/rspec/core/ordering.rb#154 def seed_used?; end end @@ -9015,6 +9036,29 @@ class RSpec::Core::Ordering::Custom def order(list); end end +# A strategy which delays looking up the ordering until needed +# +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#83 +class RSpec::Core::Ordering::Delayed + # @return [Delayed] a new instance of Delayed + # + # source://rspec-core//lib/rspec/core/ordering.rb#84 + def initialize(registry, name); end + + # source://rspec-core//lib/rspec/core/ordering.rb#89 + def order(list); end + + private + + # source://rspec-core//lib/rspec/core/ordering.rb#99 + def lookup_strategy; end + + # source://rspec-core//lib/rspec/core/ordering.rb#95 + def strategy; end +end + # The default global ordering (defined order). # # @private @@ -9073,22 +9117,27 @@ end # # @private # -# source://rspec-core//lib/rspec/core/ordering.rb#83 +# source://rspec-core//lib/rspec/core/ordering.rb#107 class RSpec::Core::Ordering::Registry # @return [Registry] a new instance of Registry # - # source://rspec-core//lib/rspec/core/ordering.rb#84 + # source://rspec-core//lib/rspec/core/ordering.rb#108 def initialize(configuration); end - # source://rspec-core//lib/rspec/core/ordering.rb#98 + # source://rspec-core//lib/rspec/core/ordering.rb#122 def fetch(name, &fallback); end - # source://rspec-core//lib/rspec/core/ordering.rb#102 + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/ordering.rb#126 + def has_strategy?(name); end + + # source://rspec-core//lib/rspec/core/ordering.rb#130 def register(sym, strategy); end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/ordering.rb#106 + # source://rspec-core//lib/rspec/core/ordering.rb#134 def used_random_seed?; end end @@ -9114,12 +9163,21 @@ class RSpec::Core::OutputWrapper # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def autoclose?(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def beep(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def binmode(*args, &block); end # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def binmode?(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def check_winsize_changed(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def clear_screen(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def close(*args, &block); end @@ -9138,6 +9196,36 @@ class RSpec::Core::OutputWrapper # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def closed?(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def console_mode(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def console_mode=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cooked(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cooked!(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cursor(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cursor=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cursor_down(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cursor_left(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cursor_right(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def cursor_up(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def each(*args, &block); end @@ -9153,12 +9241,24 @@ class RSpec::Core::OutputWrapper # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def each_line(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def echo=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def echo?(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def eof(*args, &block); end # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def eof?(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def erase_line(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def erase_screen(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def external_encoding(*args, &block); end @@ -9183,9 +9283,24 @@ class RSpec::Core::OutputWrapper # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def getc(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def getch(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def getpass(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def gets(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def goto(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def goto_column(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def iflush(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def inspect(*args, &block); end @@ -9195,6 +9310,9 @@ class RSpec::Core::OutputWrapper # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def ioctl(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def ioflush(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def isatty(*args, &block); end @@ -9207,9 +9325,15 @@ class RSpec::Core::OutputWrapper # source://rspec-core//lib/rspec/core/output_wrapper.rb#17 def method_missing(name, *args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def noecho(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def nread(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def oflush(*args, &block); end + # @private # # source://rspec-core//lib/rspec/core/output_wrapper.rb#6 @@ -9235,6 +9359,9 @@ class RSpec::Core::OutputWrapper # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def pread(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def pressed?(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def print(*args, &block); end @@ -9250,6 +9377,12 @@ class RSpec::Core::OutputWrapper # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def pwrite(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def raw(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def raw!(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def read(*args, &block); end @@ -9285,6 +9418,12 @@ class RSpec::Core::OutputWrapper # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def rewind(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def scroll_backward(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def scroll_forward(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def seek(*args, &block); end @@ -9315,12 +9454,6 @@ class RSpec::Core::OutputWrapper # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def tell(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 - def timeout(*args, &block); end - - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 - def timeout=(*args, &block); end - # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def to_i(*args, &block); end @@ -9348,6 +9481,12 @@ class RSpec::Core::OutputWrapper # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def wait_writable(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def winsize(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def winsize=(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def write(*args, &block); end @@ -9828,7 +9967,7 @@ class RSpec::Core::Reporter # Registers a listener to a list of notifications. The reporter will send # notification of events to all registered listeners. # - # @param listener [Object] An obect that wishes to be notified of reporter + # @param listener [Object] An object that wishes to be notified of reporter # events # @param notifications [Array] Array of symbols represents the events a # listener wishes to subscribe too @@ -9959,7 +10098,7 @@ class RSpec::Core::Runner # @private # - # source://rspec-core//lib/rspec/core/runner.rb#190 + # source://rspec-core//lib/rspec/core/runner.rb#194 def exit_code(examples_passed = T.unsafe(nil)); end # @attr_reader @@ -10002,7 +10141,7 @@ class RSpec::Core::Runner private - # source://rspec-core//lib/rspec/core/runner.rb#199 + # source://rspec-core//lib/rspec/core/runner.rb#203 def persist_example_statuses; end class << self @@ -10477,7 +10616,7 @@ end # eval'd when the `SharedExampleGroupModule` instance is included in an example # group. # -# source://rspec-core//lib/rspec/core/shared_example_group.rb#9 +# source://rspec-core//lib/rspec/core/shared_example_group.rb#10 class RSpec::Core::SharedExampleGroupModule < ::Module # @return [SharedExampleGroupModule] a new instance of SharedExampleGroupModule # diff --git a/sorbet/rbi/gems/rspec-expectations@3.12.0.rbi b/sorbet/rbi/gems/rspec-expectations@3.13.0.rbi similarity index 95% rename from sorbet/rbi/gems/rspec-expectations@3.12.0.rbi rename to sorbet/rbi/gems/rspec-expectations@3.13.0.rbi index 73f74496..8d33d8e4 100644 --- a/sorbet/rbi/gems/rspec-expectations@3.12.0.rbi +++ b/sorbet/rbi/gems/rspec-expectations@3.13.0.rbi @@ -10,70 +10,70 @@ # source://rspec-expectations//lib/rspec/matchers/english_phrasing.rb#1 module RSpec class << self - # source://rspec-core/3.12.0/lib/rspec/core.rb#70 + # source://rspec-core/3.13.0/lib/rspec/core.rb#70 def clear_examples; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#85 + # source://rspec-core/3.13.0/lib/rspec/core.rb#85 def configuration; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def configuration=(_arg0); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#97 + # source://rspec-core/3.13.0/lib/rspec/core.rb#97 def configure; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#194 + # source://rspec-core/3.13.0/lib/rspec/core.rb#194 def const_missing(name); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def context(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#122 + # source://rspec-core/3.13.0/lib/rspec/core.rb#122 def current_example; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#128 + # source://rspec-core/3.13.0/lib/rspec/core.rb#128 def current_example=(example); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#154 + # source://rspec-core/3.13.0/lib/rspec/core.rb#154 def current_scope; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#134 + # source://rspec-core/3.13.0/lib/rspec/core.rb#134 def current_scope=(scope); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def describe(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def example_group(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fcontext(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fdescribe(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#58 + # source://rspec-core/3.13.0/lib/rspec/core.rb#58 def reset; end - # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_context(name, *args, &block); end - # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples(name, *args, &block); end - # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples_for(name, *args, &block); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#160 + # source://rspec-core/3.13.0/lib/rspec/core.rb#160 def world; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def world=(_arg0); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xcontext(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xdescribe(*args, &example_group_block); end end end @@ -796,10 +796,10 @@ module RSpec::Expectations::ExpectationTarget::UndefinedValue; end class RSpec::Expectations::FailureAggregator # @return [FailureAggregator] a new instance of FailureAggregator # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#73 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#90 def initialize(block_label, metadata); end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#7 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#22 def aggregate; end # Returns the value of attribute block_label. @@ -810,10 +810,10 @@ class RSpec::Expectations::FailureAggregator # This method is defined to satisfy the callable interface # expected by `RSpec::Support.with_failure_notifier`. # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#44 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#59 def call(failure, options); end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#34 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#49 def failures; end # Returns the value of attribute metadata. @@ -821,20 +821,36 @@ class RSpec::Expectations::FailureAggregator # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#5 def metadata; end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#38 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#53 def other_errors; end private # Using `caller` performs better (and is simpler) than `raise` on most Rubies. # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#68 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#85 def assign_backtrace(failure); end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#79 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#96 def notify_aggregated_failures; end end +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#20 +RSpec::Expectations::FailureAggregator::AGGREGATED_FAILURE = T.let(T.unsafe(nil), RSpec::Expectations::FailureAggregator::AggregatedFailure) + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#8 +class RSpec::Expectations::FailureAggregator::AggregatedFailure + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#15 + def inspect; end +end + +# @private +# +# source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#10 +RSpec::Expectations::FailureAggregator::AggregatedFailure::MESSAGE = T.let(T.unsafe(nil), String) + # RSpec 3.0 was released with the class name misspelled. For SemVer compatibility, # we will provide this misspelled alias until 4.0. # @@ -922,88 +938,88 @@ end class RSpec::Expectations::MultipleExpectationsNotMetError < ::RSpec::Expectations::ExpectationNotMetError # @return [MultipleExpectationsNotMetError] a new instance of MultipleExpectationsNotMetError # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#136 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#153 def initialize(failure_aggregator); end # @return [String] The user-assigned label for the aggregation block. # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#111 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#128 def aggregation_block_label; end # @return [Hash] The metadata hash passed to `aggregate_failures`. # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#116 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#133 def aggregation_metadata; end # @return [Array<Exception>] The list of expectation failures and other exceptions, combined. # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#108 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#125 def all_exceptions; end # return [String] A description of the failure/error counts. # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#127 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#144 def exception_count_description; end # @return [Array<RSpec::Expectations::ExpectationNotMetError>] The list of expectation failures. # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#98 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#115 def failures; end # @return [String] The fully formatted exception message. # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#93 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#110 def message; end # @return [Array<Exception>] The list of other exceptions. # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#103 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#120 def other_errors; end # @return [String] A summary of the failure, including the block label and a count of failures. # - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#121 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#138 def summary; end private - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#168 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#185 def backtrace_line(line); end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#141 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#158 def block_description; end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#150 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#167 def enumerated(exceptions, index_offset); end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#180 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#197 def enumerated_errors; end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#176 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#193 def enumerated_failures; end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#158 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#175 def exclusion_patterns; end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#164 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#181 def format_backtrace(backtrace); end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#195 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#212 def indentation; end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#186 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#203 def indented(failure_message, index); end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#207 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#224 def index_label(index); end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#199 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#216 def longest_index_label_width; end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#146 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#163 def pluralize(noun, count); end - # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#203 + # source://rspec-expectations//lib/rspec/expectations/failure_aggregator.rb#220 def width_of_label(index); end end @@ -1536,7 +1552,7 @@ module RSpec::Matchers # @param message [Symbol] the message to send the receiver # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_block_changing(*args, &block); end + def a_block_changing(*args, **_arg1, &block); end # With no arg, passes if the block outputs `to_stdout` or `to_stderr`. # With a string, passes if the block outputs that specific string `to_stdout` or `to_stderr`. @@ -1569,7 +1585,7 @@ module RSpec::Matchers # are thus significantly (~30x) slower than `to_stdout` and `to_stderr`. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_block_outputting(*args, &block); end + def a_block_outputting(*args, **_arg1, &block); end # With no args, matches if any error is raised. # With a named error, matches only if that specific error is raised. @@ -1589,7 +1605,7 @@ module RSpec::Matchers # expect { do_something_risky }.not_to raise_error # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_block_raising(*args, &block); end + def a_block_raising(*args, **_arg1, &block); end # Given no argument, matches if a proc throws any Symbol. # @@ -1608,7 +1624,7 @@ module RSpec::Matchers # expect { do_something_risky }.not_to throw_symbol(:that_was_risky, 'culprit') # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_block_throwing(*args, &block); end + def a_block_throwing(*args, **_arg1, &block); end # Passes if the method called in the expect block yields, regardless # of whether or not arguments are yielded. @@ -1620,7 +1636,7 @@ module RSpec::Matchers # the method-under-test as a block. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_block_yielding_control(*args, &block); end + def a_block_yielding_control(*args, **_arg1, &block); end # Designed for use with methods that repeatedly yield (such as # iterators). Passes if the method called in the expect block yields @@ -1638,7 +1654,7 @@ module RSpec::Matchers # the method-under-test as a block. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_block_yielding_successive_args(*args, &block); end + def a_block_yielding_successive_args(*args, **_arg1, &block); end # Given no arguments, matches if the method called in the expect # block yields with arguments (regardless of what they are or how @@ -1665,7 +1681,7 @@ module RSpec::Matchers # multiple times. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_block_yielding_with_args(*args, &block); end + def a_block_yielding_with_args(*args, **_arg1, &block); end # Passes if the method called in the expect block yields with # no arguments. Fails if it does not yield, or yields with arguments. @@ -1680,7 +1696,7 @@ module RSpec::Matchers # multiple times. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_block_yielding_with_no_args(*args, &block); end + def a_block_yielding_with_no_args(*args, **_arg1, &block); end # Passes if actual contains all of the expected regardless of order. # This works for collections. Pass in multiple args and it will only @@ -1694,7 +1710,7 @@ module RSpec::Matchers # @see #match_array # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_collection_containing_exactly(*args, &block); end + def a_collection_containing_exactly(*args, **_arg1, &block); end # Matches if the actual value ends with the expected value(s). In the case # of a string, matches against the last `expected.length` characters of the @@ -1707,7 +1723,7 @@ module RSpec::Matchers # expect([0, 2, 3, 4, 4]).to end_with 3, 4 # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_collection_ending_with(*args, &block); end + def a_collection_ending_with(*args, **_arg1, &block); end # Passes if actual includes expected. This works for # collections and Strings. You can also pass in multiple args @@ -1728,7 +1744,7 @@ module RSpec::Matchers # expect(:a => 1, :b => 2).not_to include(:a => 2) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_collection_including(*args, &block); end + def a_collection_including(*args, **_arg1, &block); end # Matches if the actual value starts with the expected value(s). In the # case of a string, matches against the first `expected.length` characters @@ -1741,17 +1757,17 @@ module RSpec::Matchers # expect([0, 2, 3, 4, 4]).to start_with 0, 1 # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_collection_starting_with(*args, &block); end + def a_collection_starting_with(*args, **_arg1, &block); end # Passes if actual is falsey (false or nil) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_falsey_value(*args, &block); end + def a_falsey_value(*args, **_arg1, &block); end # Passes if actual is falsey (false or nil) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_falsy_value(*args, &block); end + def a_falsy_value(*args, **_arg1, &block); end # Passes if actual includes expected. This works for # collections and Strings. You can also pass in multiple args @@ -1772,7 +1788,7 @@ module RSpec::Matchers # expect(:a => 1, :b => 2).not_to include(:a => 2) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_hash_including(*args, &block); end + def a_hash_including(*args, **_arg1, &block); end # Passes if actual.kind_of?(expected) # @@ -1782,12 +1798,12 @@ module RSpec::Matchers # expect(5).not_to be_a_kind_of(Float) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_kind_of(*args, &block); end + def a_kind_of(*args, **_arg1, &block); end # Passes if actual is nil # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_nil_value(*args, &block); end + def a_nil_value(*args, **_arg1, &block); end # Passes if actual covers expected. This works for # Ranges. You can also pass in multiple args @@ -1803,7 +1819,7 @@ module RSpec::Matchers # expect(1..10).not_to cover(5) # fails # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_range_covering(*args, &block); end + def a_range_covering(*args, **_arg1, &block); end # Matches if the actual value ends with the expected value(s). In the case # of a string, matches against the last `expected.length` characters of the @@ -1816,7 +1832,7 @@ module RSpec::Matchers # expect([0, 2, 3, 4, 4]).to end_with 3, 4 # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_string_ending_with(*args, &block); end + def a_string_ending_with(*args, **_arg1, &block); end # Passes if actual includes expected. This works for # collections and Strings. You can also pass in multiple args @@ -1837,7 +1853,7 @@ module RSpec::Matchers # expect(:a => 1, :b => 2).not_to include(:a => 2) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_string_including(*args, &block); end + def a_string_including(*args, **_arg1, &block); end # Given a `Regexp` or `String`, passes if `actual.match(pattern)` # Given an arbitrary nested data structure (e.g. arrays and hashes), @@ -1870,7 +1886,7 @@ module RSpec::Matchers # `match` could not be used there), but is no longer needed in 3.x. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_string_matching(*args, &block); end + def a_string_matching(*args, **_arg1, &block); end # Matches if the actual value starts with the expected value(s). In the # case of a string, matches against the first `expected.length` characters @@ -1883,12 +1899,12 @@ module RSpec::Matchers # expect([0, 2, 3, 4, 4]).to start_with 0, 1 # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_string_starting_with(*args, &block); end + def a_string_starting_with(*args, **_arg1, &block); end # Passes if actual is truthy (anything but false or nil) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_truthy_value(*args, &block); end + def a_truthy_value(*args, **_arg1, &block); end # Given true, false, or nil, will pass if actual value is true, false or # nil (respectively). Given no args means the caller should satisfy an if @@ -1912,7 +1928,7 @@ module RSpec::Matchers # expect(actual).not_to be_[arbitrary_predicate](*args) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_value(*args, &block); end + def a_value(*args, **_arg1, &block); end # Passes if actual.between?(min, max). Works with any Comparable object, # including String, Symbol, Time, or Numeric (Fixnum, Bignum, Integer, @@ -1927,7 +1943,7 @@ module RSpec::Matchers # expect(10).not_to be_between(1, 10).exclusive # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_value_between(*args, &block); end + def a_value_between(*args, **_arg1, &block); end # Passes if actual == expected +/- delta # @@ -1936,7 +1952,7 @@ module RSpec::Matchers # expect(result).not_to be_within(0.5).of(3.0) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def a_value_within(*args, &block); end + def a_value_within(*args, **_arg1, &block); end # Allows multiple expectations in the provided block to fail, and then # aggregates them into a single exception, rather than aborting on the @@ -1990,7 +2006,7 @@ module RSpec::Matchers # An alternate form of `contain_exactly` that accepts # the expected contents as a single array arg rather - # that splatted out as individual items. + # than splatted out as individual items. # # @example # expect(results).to contain_exactly(1, 2) @@ -1999,7 +2015,7 @@ module RSpec::Matchers # @see #contain_exactly # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_array_matching(*args, &block); end + def an_array_matching(*args, **_arg1, &block); end # Passes if actual.instance_of?(expected) # @@ -2009,7 +2025,7 @@ module RSpec::Matchers # expect(5).not_to be_an_instance_of(Float) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_instance_of(*args, &block); end + def an_instance_of(*args, **_arg1, &block); end # Passes if <tt>actual == expected</tt>. # @@ -2021,7 +2037,7 @@ module RSpec::Matchers # expect(5).not_to eq(3) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_object_eq_to(*args, &block); end + def an_object_eq_to(*args, **_arg1, &block); end # Passes if `actual.eql?(expected)` # @@ -2033,7 +2049,7 @@ module RSpec::Matchers # expect(5).not_to eql(3) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_object_eql_to(*args, &block); end + def an_object_eql_to(*args, **_arg1, &block); end # Passes if <tt>actual.equal?(expected)</tt> (object identity). # @@ -2045,7 +2061,7 @@ module RSpec::Matchers # expect("5").not_to equal("5") # Strings that look the same are not the same object # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_object_equal_to(*args, &block); end + def an_object_equal_to(*args, **_arg1, &block); end # Passes if `actual.exist?` or `actual.exists?` # @@ -2053,7 +2069,7 @@ module RSpec::Matchers # expect(File).to exist("path/to/file") # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_object_existing(*args, &block); end + def an_object_existing(*args, **_arg1, &block); end # Passes if actual's attribute values match the expected attributes hash. # This works no matter how you define your attribute readers. @@ -2069,7 +2085,7 @@ module RSpec::Matchers # @note It will fail if actual doesn't respond to any of the expected attributes. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_object_having_attributes(*args, &block); end + def an_object_having_attributes(*args, **_arg1, &block); end # Given a `Regexp` or `String`, passes if `actual.match(pattern)` # Given an arbitrary nested data structure (e.g. arrays and hashes), @@ -2102,7 +2118,7 @@ module RSpec::Matchers # `match` could not be used there), but is no longer needed in 3.x. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_object_matching(*args, &block); end + def an_object_matching(*args, **_arg1, &block); end # Matches if the target object responds to all of the names # provided. Names can be Strings or Symbols. @@ -2111,7 +2127,7 @@ module RSpec::Matchers # expect("string").to respond_to(:length) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_object_responding_to(*args, &block); end + def an_object_responding_to(*args, **_arg1, &block); end # Passes if the submitted block returns true. Yields target to the # block. @@ -2129,7 +2145,7 @@ module RSpec::Matchers # @param description [String] optional description to be used for this matcher. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def an_object_satisfying(*args, &block); end + def an_object_satisfying(*args, **_arg1, &block); end # Given true, false, or nil, will pass if actual value is true, false or # nil (respectively). Given no args means the caller should satisfy an if @@ -2208,7 +2224,7 @@ module RSpec::Matchers # Passes if actual is falsey (false or nil) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def be_falsy(*args, &block); end + def be_falsy(*args, **_arg1, &block); end # Passes if actual.instance_of?(expected) # @@ -2415,7 +2431,7 @@ module RSpec::Matchers # @param message [Symbol] the message to send the receiver # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def changing(*args, &block); end + def changing(*args, **_arg1, &block); end # Passes if actual contains all of the expected regardless of order. # This works for collections. Pass in multiple args and it will only @@ -2443,7 +2459,7 @@ module RSpec::Matchers # @see #match_array # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def containing_exactly(*args, &block); end + def containing_exactly(*args, **_arg1, &block); end # Passes if actual covers expected. This works for # Ranges. You can also pass in multiple args @@ -2475,7 +2491,7 @@ module RSpec::Matchers # expect(1..10).not_to cover(5) # fails # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def covering(*args, &block); end + def covering(*args, **_arg1, &block); end # Matches if the actual value ends with the expected value(s). In the case # of a string, matches against the last `expected.length` characters of the @@ -2501,7 +2517,7 @@ module RSpec::Matchers # expect([0, 2, 3, 4, 4]).to end_with 3, 4 # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def ending_with(*args, &block); end + def ending_with(*args, **_arg1, &block); end # Passes if <tt>actual == expected</tt>. # @@ -2525,7 +2541,7 @@ module RSpec::Matchers # expect(5).not_to eq(3) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def eq_to(*args, &block); end + def eq_to(*args, **_arg1, &block); end # Passes if `actual.eql?(expected)` # @@ -2549,7 +2565,7 @@ module RSpec::Matchers # expect(5).not_to eql(3) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def eql_to(*args, &block); end + def eql_to(*args, **_arg1, &block); end # Passes if <tt>actual.equal?(expected)</tt> (object identity). # @@ -2573,7 +2589,7 @@ module RSpec::Matchers # expect("5").not_to equal("5") # Strings that look the same are not the same object # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def equal_to(*args, &block); end + def equal_to(*args, **_arg1, &block); end # Passes if `actual.exist?` or `actual.exists?` # @@ -2589,7 +2605,7 @@ module RSpec::Matchers # expect(File).to exist("path/to/file") # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def existing(*args, &block); end + def existing(*args, **_arg1, &block); end # Supports `expect(actual).to matcher` syntax by wrapping `actual` in an # `ExpectationTarget`. @@ -2634,7 +2650,7 @@ module RSpec::Matchers # @note It will fail if actual doesn't respond to any of the expected attributes. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def having_attributes(*args, &block); end + def having_attributes(*args, **_arg1, &block); end # Passes if actual includes expected. This works for # collections and Strings. You can also pass in multiple args @@ -2676,7 +2692,7 @@ module RSpec::Matchers # expect(:a => 1, :b => 2).not_to include(:a => 2) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def including(*args, &block); end + def including(*args, **_arg1, &block); end # Given a `Regexp` or `String`, passes if `actual.match(pattern)` # Given an arbitrary nested data structure (e.g. arrays and hashes), @@ -2713,7 +2729,7 @@ module RSpec::Matchers # An alternate form of `contain_exactly` that accepts # the expected contents as a single array arg rather - # that splatted out as individual items. + # than splatted out as individual items. # # @example # expect(results).to contain_exactly(1, 2) @@ -2755,7 +2771,7 @@ module RSpec::Matchers # `match` could not be used there), but is no longer needed in 3.x. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def match_regex(*args, &block); end + def match_regex(*args, **_arg1, &block); end # Given a `Regexp` or `String`, passes if `actual.match(pattern)` # Given an arbitrary nested data structure (e.g. arrays and hashes), @@ -2788,7 +2804,7 @@ module RSpec::Matchers # `match` could not be used there), but is no longer needed in 3.x. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def matching(*args, &block); end + def matching(*args, **_arg1, &block); end # With no arg, passes if the block outputs `to_stdout` or `to_stderr`. # With a string, passes if the block outputs that specific string `to_stdout` or `to_stderr`. @@ -2881,7 +2897,7 @@ module RSpec::Matchers # expect { do_something_risky }.not_to raise_error # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def raising(*args, &block); end + def raising(*args, **_arg1, &block); end # Matches if the target object responds to all of the names # provided. Names can be Strings or Symbols. @@ -2899,7 +2915,7 @@ module RSpec::Matchers # expect("string").to respond_to(:length) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def responding_to(*args, &block); end + def responding_to(*args, **_arg1, &block); end # Passes if the submitted block returns true. Yields target to the # block. @@ -2935,7 +2951,7 @@ module RSpec::Matchers # @param description [String] optional description to be used for this matcher. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def satisfying(*args, &block); end + def satisfying(*args, **_arg1, &block); end # Matches if the actual value starts with the expected value(s). In the # case of a string, matches against the first `expected.length` characters @@ -2961,7 +2977,7 @@ module RSpec::Matchers # expect([0, 2, 3, 4, 4]).to start_with 0, 1 # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def starting_with(*args, &block); end + def starting_with(*args, **_arg1, &block); end # Given no argument, matches if a proc throws any Symbol. # @@ -2999,7 +3015,7 @@ module RSpec::Matchers # expect { do_something_risky }.not_to throw_symbol(:that_was_risky, 'culprit') # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def throwing(*args, &block); end + def throwing(*args, **_arg1, &block); end # Passes if actual == expected +/- delta # @@ -3008,7 +3024,7 @@ module RSpec::Matchers # expect(result).not_to be_within(0.5).of(3.0) # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def within(*args, &block); end + def within(*args, **_arg1, &block); end # Passes if the method called in the expect block yields, regardless # of whether or not arguments are yielded. @@ -3092,7 +3108,7 @@ module RSpec::Matchers # the method-under-test as a block. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def yielding_control(*args, &block); end + def yielding_control(*args, **_arg1, &block); end # Designed for use with methods that repeatedly yield (such as # iterators). Passes if the method called in the expect block yields @@ -3110,7 +3126,7 @@ module RSpec::Matchers # the method-under-test as a block. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def yielding_successive_args(*args, &block); end + def yielding_successive_args(*args, **_arg1, &block); end # Given no arguments, matches if the method called in the expect # block yields with arguments (regardless of what they are or how @@ -3137,7 +3153,7 @@ module RSpec::Matchers # multiple times. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def yielding_with_args(*args, &block); end + def yielding_with_args(*args, **_arg1, &block); end # Passes if the method called in the expect block yields with # no arguments. Fails if it does not yield, or yields with arguments. @@ -3152,7 +3168,7 @@ module RSpec::Matchers # multiple times. # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#38 - def yielding_with_no_args(*args, &block); end + def yielding_with_no_args(*args, **_arg1, &block); end private @@ -3301,7 +3317,7 @@ end # # @private # -# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#64 +# source://rspec-expectations//lib/rspec/matchers/aliased_matcher.rb#65 class RSpec::Matchers::AliasedMatcherWithOperatorSupport < ::RSpec::Matchers::AliasedMatcher; end # @private @@ -3332,7 +3348,7 @@ class RSpec::Matchers::AliasedNegatedMatcher < ::RSpec::Matchers::AliasedMatcher # by going through the effort of defining a negated matcher. # # However, if the override didn't actually change anything, then we - # should return the opposite failure message instead -- the overriden + # should return the opposite failure message instead -- the overridden # message is going to be confusing if we return it as-is, as it represents # the non-negated failure message for a negated match (or vice versa). # @@ -3346,6 +3362,18 @@ RSpec::Matchers::AliasedNegatedMatcher::DefaultFailureMessages = RSpec::Matchers # source://rspec-expectations//lib/rspec/matchers.rb#957 RSpec::Matchers::BE_PREDICATE_REGEX = T.let(T.unsafe(nil), Regexp) +# Provides a base class with as little methods as possible, so that +# most methods can be delegated via `method_missing`. +# +# On Ruby 2.0+ BasicObject could be used for this purpose, but it +# introduce some extra complexity with constant resolution, so the +# BlankSlate pattern was prefered. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#10 +class RSpec::Matchers::BaseDelegator; end + # Container module for all built-in matchers. The matcher classes are here # (rather than directly under `RSpec::Matchers`) in order to prevent name # collisions, since `RSpec::Matchers` gets included into the user's namespace. @@ -3362,7 +3390,7 @@ module RSpec::Matchers::BuiltIn; end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#7 +# source://rspec-expectations//lib/rspec/matchers/built_in/all.rb#8 class RSpec::Matchers::BuiltIn::All < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [All] a new instance of All @@ -3456,6 +3484,7 @@ end class RSpec::Matchers::BuiltIn::BaseMatcher include ::RSpec::Matchers::Composable include ::RSpec::Matchers::BuiltIn::BaseMatcher::HashFormatting + include ::RSpec::Matchers::BuiltIn::BaseMatcher::StringEncodingFormatting include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages # @api private @@ -3602,7 +3631,7 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#166 +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#207 module RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages # Provides a good generic failure message. Based on `description`. # When subclassing, if you are not satisfied with this failure message @@ -3611,7 +3640,7 @@ module RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages # @api private # @return [String] # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#172 + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#213 def failure_message; end # Provides a good generic negative failure message. Based on `description`. @@ -3621,7 +3650,7 @@ module RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages # @api private # @return [String] # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#181 + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#222 def failure_message_when_negated; end class << self @@ -3629,7 +3658,7 @@ module RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages # @private # @return [Boolean] # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#186 + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#227 def has_default_failure_messages?(matcher); end end end @@ -3674,6 +3703,46 @@ module RSpec::Matchers::BuiltIn::BaseMatcher::HashFormatting end end +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#165 +module RSpec::Matchers::BuiltIn::BaseMatcher::StringEncodingFormatting + private + + # Formats a String's encoding as a human readable string + # + # @api private + # @param _value [String] + # @return [nil] nil as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#188 + def format_encoding(value); end + + # @api private + # @return [Boolean] False always as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#171 + def string_encoding_differs?; end + + class << self + # Formats a String's encoding as a human readable string + # + # @api private + # @param _value [String] + # @return [nil] nil as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#188 + def format_encoding(value); end + + # @api private + # @return [Boolean] False always as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#171 + def string_encoding_differs?; end + end +end + # Used to detect when no arg is passed to `initialize`. # `nil` cannot be used because it's a valid value to pass. # @@ -3758,7 +3827,7 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/be_instance_of.rb#7 +# source://rspec-expectations//lib/rspec/matchers/built_in/be_instance_of.rb#9 class RSpec::Matchers::BuiltIn::BeAnInstanceOf < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [String] @@ -3902,7 +3971,7 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#30 +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#32 class RSpec::Matchers::BuiltIn::BeFalsey < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [String] @@ -3951,7 +4020,7 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#53 +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#55 class RSpec::Matchers::BuiltIn::BeNil < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [String] @@ -3978,7 +4047,7 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#137 +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#138 class RSpec::Matchers::BuiltIn::BePredicate < ::RSpec::Matchers::BuiltIn::DynamicPredicate private @@ -4019,7 +4088,7 @@ RSpec::Matchers::BuiltIn::BePredicate::REGEX = T.let(T.unsafe(nil), Regexp) # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#7 +# source://rspec-expectations//lib/rspec/matchers/built_in/be.rb#9 class RSpec::Matchers::BuiltIn::BeTruthy < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [String] @@ -4152,7 +4221,7 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#7 +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#9 class RSpec::Matchers::BuiltIn::Change < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [Change] a new instance of Change @@ -4470,7 +4539,7 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#6 +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#7 class RSpec::Matchers::BuiltIn::Compound < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [Compound] a new instance of Compound @@ -4505,7 +4574,7 @@ class RSpec::Matchers::BuiltIn::Compound < ::RSpec::Matchers::BuiltIn::BaseMatch def evaluator; end # @api private - # @return [RSpec::Matchers::ExpectedsForMultipleDiffs] + # @return [RSpec::Matchers::MultiMatcherDiff] # # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#55 def expected; end @@ -4609,7 +4678,7 @@ end # # @api public # -# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#242 +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#244 class RSpec::Matchers::BuiltIn::Compound::And < ::RSpec::Matchers::BuiltIn::Compound # @api private # @return [String] @@ -4718,7 +4787,7 @@ end # # @api public # -# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#269 +# source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#271 class RSpec::Matchers::BuiltIn::Compound::Or < ::RSpec::Matchers::BuiltIn::Compound # @api private # @return [String] @@ -4763,7 +4832,7 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#8 +# source://rspec-expectations//lib/rspec/matchers/built_in/contain_exactly.rb#10 class RSpec::Matchers::BuiltIn::ContainExactly < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [String] @@ -5361,18 +5430,18 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#7 +# source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#9 class RSpec::Matchers::BuiltIn::Eq < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [String] # - # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#22 + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#26 def description; end # @api private # @return [Boolean] # - # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#28 + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#32 def diffable?; end # @api private @@ -5384,14 +5453,14 @@ class RSpec::Matchers::BuiltIn::Eq < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [String] # - # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#16 + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#20 def failure_message_when_negated; end private # @api private # - # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#34 + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#38 def match(expected, actual); end end @@ -5400,12 +5469,12 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#7 +# source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#9 class RSpec::Matchers::BuiltIn::Eql < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [Boolean] # - # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#22 + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#26 def diffable?; end # @api private @@ -5417,14 +5486,14 @@ class RSpec::Matchers::BuiltIn::Eql < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [String] # - # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#16 + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#20 def failure_message_when_negated; end private # @api private # - # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#28 + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#32 def match(expected, actual); end end @@ -5433,7 +5502,7 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#7 +# source://rspec-expectations//lib/rspec/matchers/built_in/equal.rb#9 class RSpec::Matchers::BuiltIn::Equal < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [Boolean] @@ -5535,7 +5604,7 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#43 +# source://rspec-expectations//lib/rspec/matchers/built_in/exist.rb#45 class RSpec::Matchers::BuiltIn::Exist::ExistenceTest < ::Struct # @api private # @return [Boolean] @@ -5583,7 +5652,7 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#125 +# source://rspec-expectations//lib/rspec/matchers/built_in/has.rb#126 class RSpec::Matchers::BuiltIn::Has < ::RSpec::Matchers::BuiltIn::DynamicPredicate private @@ -5603,7 +5672,7 @@ RSpec::Matchers::BuiltIn::Has::REGEX = T.let(T.unsafe(nil), Regexp) # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#7 +# source://rspec-expectations//lib/rspec/matchers/built_in/have_attributes.rb#8 class RSpec::Matchers::BuiltIn::HaveAttributes < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [HaveAttributes] a new instance of HaveAttributes @@ -5767,7 +5836,7 @@ class RSpec::Matchers::BuiltIn::Include < ::RSpec::Matchers::BuiltIn::BaseMatche # @api private # @return [Boolean] # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#160 + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#167 def actual_collection_includes?(expected_item); end # @api private @@ -5809,23 +5878,23 @@ class RSpec::Matchers::BuiltIn::Include < ::RSpec::Matchers::BuiltIn::BaseMatche # @api private # @return [Boolean] # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#200 + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#207 def convert_to_hash?(obj); end # @api private # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#174 + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#181 def count_enumerable(expected_item); end # @api private # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#179 + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#186 def count_inclusions; end # @api private # @return [Boolean] # - # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#191 + # source://rspec-expectations//lib/rspec/matchers/built_in/include.rb#198 def diff_would_wrongly_highlight_matched_item?; end # @api private @@ -6645,7 +6714,7 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#181 +# source://rspec-expectations//lib/rspec/matchers/built_in/change.rb#182 class RSpec::Matchers::BuiltIn::SpecificValuesChange < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [SpecificValuesChange] a new instance of SpecificValuesChange @@ -7192,7 +7261,7 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#149 +# source://rspec-expectations//lib/rspec/matchers/built_in/yield.rb#150 class RSpec::Matchers::BuiltIn::YieldWithNoArgs < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @private @@ -7348,7 +7417,7 @@ module RSpec::Matchers::Composable # source://rspec-expectations//lib/rspec/matchers/composable.rb#142 def should_enumerate?(item); end - # Transforms the given data structue (typically a hash or array) + # Transforms the given data structure (typically a hash or array) # into a new data structure that, when `#inspect` is called on it, # will provide descriptions of any contained matchers rather than # the normal `#inspect` output. @@ -7420,7 +7489,7 @@ module RSpec::Matchers::Composable # source://rspec-expectations//lib/rspec/matchers/composable.rb#142 def should_enumerate?(item); end - # Transforms the given data structue (typically a hash or array) + # Transforms the given data structure (typically a hash or array) # into a new data structure that, when `#inspect` is called on it, # will provide descriptions of any contained matchers rather than # the normal `#inspect` output. @@ -7488,7 +7557,7 @@ end # # source://rspec-expectations//lib/rspec/matchers/dsl.rb#6 module RSpec::Matchers::DSL - # Defines a matcher alias. The returned matcher's `description` will be overriden + # Defines a matcher alias. The returned matcher's `description` will be overridden # to reflect the phrasing of the new name, which will be used in failure messages # when passed as an argument to another matcher in a composed matcher expression. # @@ -7508,7 +7577,7 @@ module RSpec::Matchers::DSL # @param new_name [Symbol] the new name for the matcher # @param options [Hash] options for the aliased matcher # @see RSpec::Matchers - # @yield [String] optional block that, when given, is used to define the overriden + # @yield [String] optional block that, when given, is used to define the overridden # logic. The yielded arg is the original description or failure message. If no # block is provided, a default override is used based on the old and new names. # @@ -7524,11 +7593,11 @@ module RSpec::Matchers::DSL # When args are passed to your matcher, they will be yielded here, # usually representing the expected value(s). # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#72 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#73 def define(name, &declarations); end # Defines a negated matcher. The returned matcher's `description` and `failure_message` - # will be overriden to reflect the phrasing of the new name, and the match logic will + # will be overridden to reflect the phrasing of the new name, and the match logic will # be based on the original matcher but negated. # # @example @@ -7538,11 +7607,11 @@ module RSpec::Matchers::DSL # @param negated_name [Symbol] the name for the negated matcher # @param base_name [Symbol] the name of the original matcher that will be negated # @see RSpec::Matchers - # @yield [String] optional block that, when given, is used to define the overriden + # @yield [String] optional block that, when given, is used to define the overridden # logic. The yielded arg is the original description or failure message. If no # block is provided, a default override is used based on the old and new names. # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#60 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#61 def define_negated_matcher(negated_name, base_name, &description_override); end # Defines a custom matcher. @@ -7554,14 +7623,14 @@ module RSpec::Matchers::DSL # When args are passed to your matcher, they will be yielded here, # usually representing the expected value(s). # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#72 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#73 def matcher(name, &declarations); end private # :nocov: # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#83 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#84 def warn_about_block_args(name, declarations); end end @@ -7570,13 +7639,13 @@ end # override any of these using the {RSpec::Matchers::DSL::Macros Macros} methods # from within an `RSpec::Matchers.define` block. # -# source://rspec-expectations//lib/rspec/matchers/dsl.rb#384 +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#385 module RSpec::Matchers::DSL::DefaultImplementations include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages # The default description. # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#394 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#395 def description; end # Used internally by objects returns by `should` and `should_not`. @@ -7584,14 +7653,14 @@ module RSpec::Matchers::DSL::DefaultImplementations # @api private # @return [Boolean] # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#389 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#390 def diffable?; end # Most matchers do not expect call stack jumps. # # @return [Boolean] # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#411 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#412 def expects_call_stack_jump?; end # Matchers do not support block expectations by default. You @@ -7599,24 +7668,24 @@ module RSpec::Matchers::DSL::DefaultImplementations # # @return [Boolean] # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#402 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#403 def supports_block_expectations?; end # @return [Boolean] # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#406 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#407 def supports_value_expectations?; end private - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#417 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#418 def chained_method_clause_sentences; end end # Contains the methods that are available from within the # `RSpec::Matchers.define` DSL for creating custom matchers. # -# source://rspec-expectations//lib/rspec/matchers/dsl.rb#103 +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#104 module RSpec::Matchers::DSL::Macros # Convenience for defining methods on this matcher to create a fluent # interface. The trick about fluent interfaces is that each method must @@ -7646,7 +7715,7 @@ module RSpec::Matchers::DSL::Macros # # expect(minor).to have_errors_on(:age).with("Not old enough to participate") # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#297 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#298 def chain(method_name, *attr_names, &definition); end # Customize the description to use for one-liners. Only use this when @@ -7663,16 +7732,16 @@ module RSpec::Matchers::DSL::Macros # end # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#252 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#253 def description(&definition); end # Tells the matcher to diff the actual and expected values in the failure # message. # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#258 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#259 def diffable; end - # Customizes the failure messsage to use when this matcher is + # Customizes the failure message to use when this matcher is # asked to positively match. Only use this when the message # generated by default doesn't suit your needs. # @@ -7687,10 +7756,10 @@ module RSpec::Matchers::DSL::Macros # end # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#215 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#216 def failure_message(&definition); end - # Customize the failure messsage to use when this matcher is asked + # Customize the failure message to use when this matcher is asked # to negatively match. Only use this when the message generated by # default doesn't suit your needs. # @@ -7705,7 +7774,7 @@ module RSpec::Matchers::DSL::Macros # end # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#234 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#235 def failure_message_when_negated(&definition); end # Stores the block that is used to determine whether this matcher passes @@ -7734,7 +7803,7 @@ module RSpec::Matchers::DSL::Macros # @param options [Hash] for defining the behavior of the match block. # @yield [Object] actual the actual value (i.e. the value wrapped by `expect`) # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#130 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#131 def match(options = T.unsafe(nil), &match_block); end # Use this instead of `match` when the block will raise an exception @@ -7751,7 +7820,7 @@ module RSpec::Matchers::DSL::Macros # expect(email_validator).to accept_as_valid("person@company.com") # @yield [Object] actual the actual object (i.e. the value wrapped by `expect`) # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#187 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#188 def match_unless_raises(expected_exception = T.unsafe(nil), &match_block); end # Use this to define the block for a negative expectation (`expect(...).not_to`) @@ -7767,7 +7836,7 @@ module RSpec::Matchers::DSL::Macros # @param options [Hash] for defining the behavior of the match block. # @yield [Object] actual the actual value (i.e. the value wrapped by `expect`) # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#159 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#160 def match_when_negated(options = T.unsafe(nil), &match_block); end # Declares that the matcher can be used in a block expectation. @@ -7775,12 +7844,12 @@ module RSpec::Matchers::DSL::Macros # expectation without declaring this. # (e.g. `expect { do_something }.to matcher`). # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#266 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#267 def supports_block_expectations; end private - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#311 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#312 def assign_attributes(attr_names); end # Does the following: @@ -7788,7 +7857,7 @@ module RSpec::Matchers::DSL::Macros # - Defines the named method using a user-provided block # in @user_method_defs, which is included as an ancestor # in the singleton class in which we eval the `define` block. - # - Defines an overriden definition for the same method + # - Defines an overridden definition for the same method # usign the provided `our_def` block. # - Provides a default `our_def` block for the common case # of needing to call the user's definition with `@actual` @@ -7801,7 +7870,7 @@ module RSpec::Matchers::DSL::Macros # (e.g. assigning `@actual`, rescueing errors, etc) and # can `super` to the user's definition. # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#345 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#346 def define_user_override(method_name, user_def, &our_def); end end @@ -7809,32 +7878,32 @@ end # # @deprecated Use the methods from {Macros} instead. # -# source://rspec-expectations//lib/rspec/matchers/dsl.rb#353 +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#354 module RSpec::Matchers::DSL::Macros::Deprecated # @deprecated Use {Macros#failure_message} instead. # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#367 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#368 def failure_message_for_should(&definition); end # @deprecated Use {Macros#failure_message_when_negated} instead. # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#373 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#374 def failure_message_for_should_not(&definition); end # @deprecated Use {Macros#match} instead. # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#355 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#356 def match_for_should(&definition); end # @deprecated Use {Macros#match_when_negated} instead. # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#361 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#362 def match_for_should_not(&definition); end end # @private # -# source://rspec-expectations//lib/rspec/matchers/dsl.rb#145 +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#146 RSpec::Matchers::DSL::Macros::RAISE_NOTIFIER = T.let(T.unsafe(nil), Proc) # The class used for custom matchers. The block passed to @@ -7842,7 +7911,7 @@ RSpec::Matchers::DSL::Macros::RAISE_NOTIFIER = T.let(T.unsafe(nil), Proc) # of the singleton class of an instance, and will have the # {RSpec::Matchers::DSL::Macros Macros} methods available. # -# source://rspec-expectations//lib/rspec/matchers/dsl.rb#432 +# source://rspec-expectations//lib/rspec/matchers/dsl.rb#433 class RSpec::Matchers::DSL::Matcher include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages include ::RSpec::Matchers::DSL::DefaultImplementations @@ -7854,18 +7923,18 @@ class RSpec::Matchers::DSL::Matcher # @api private # @return [Matcher] a new instance of Matcher # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#461 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#462 def initialize(name, declarations, matcher_execution_context, *expected, &block_arg); end # Exposes the value being matched against -- generally the object # object wrapped by `expect`. # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#448 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#449 def actual; end # The block parameter used in the expectation # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#455 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#456 def block_arg; end # Provides the expected value. This will return an array if @@ -7874,7 +7943,7 @@ class RSpec::Matchers::DSL::Matcher # # @see #expected_as_array # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#481 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#482 def expected; end # Returns the expected value as an an array. This exists primarily @@ -7883,30 +7952,30 @@ class RSpec::Matchers::DSL::Matcher # # @see #expected # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#493 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#494 def expected_as_array; end # Adds the name (rather than a cryptic hex number) # so we can identify an instance of # the matcher in error messages (e.g. for `NoMethodError`) # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#498 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#499 def inspect; end # The name of the matcher. # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#458 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#459 def name; end # Exposes the exception raised during the matching by `match_unless_raises`. # Could be useful to extract details for a failure message. # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#452 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#453 def rescued_exception; end private - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#521 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#522 def actual_arg_for(block); end # Takes care of forwarding unhandled messages to the @@ -7916,7 +7985,7 @@ class RSpec::Matchers::DSL::Matcher # Rails' test helper methods, but it's also a useful # feature in its own right. # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#531 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#532 def method_missing(method, *args, **_arg2, &block); end # Indicates that this matcher responds to messages @@ -7925,7 +7994,7 @@ class RSpec::Matchers::DSL::Matcher # # @return [Boolean] # - # source://rspec-expectations//lib/rspec/matchers/dsl.rb#506 + # source://rspec-expectations//lib/rspec/matchers/dsl.rb#507 def respond_to_missing?(method, include_private = T.unsafe(nil)); end end @@ -7963,17 +8032,52 @@ module RSpec::Matchers::EnglishPhrasing end end -# Handles list of expected values when there is a need to render -# multiple diffs. Also can handle one value. +# source://rspec-expectations//lib/rspec/matchers.rb#958 +RSpec::Matchers::HAS_REGEX = T.let(T.unsafe(nil), Regexp) + +# Provides the necessary plumbing to wrap a matcher with a decorator. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#31 +class RSpec::Matchers::MatcherDelegator < ::RSpec::Matchers::BaseDelegator + include ::RSpec::Matchers::Composable + + # @return [MatcherDelegator] a new instance of MatcherDelegator + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#35 + def initialize(base_matcher); end + + # Returns the value of attribute base_matcher. + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#33 + def base_matcher; end + + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#39 + def method_missing(*args, &block); end + + private + + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#55 + def initialize_copy(other); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#44 + def respond_to_missing?(name, include_all = T.unsafe(nil)); end +end + +# Handles list of expected and actual value pairs when there is a need +# to render multiple diffs. Also can handle one pair. # # @api private # -# source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#6 -class RSpec::Matchers::ExpectedsForMultipleDiffs +# source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#6 +class RSpec::Matchers::MultiMatcherDiff # @api private - # @return [ExpectedsForMultipleDiffs] a new instance of ExpectedsForMultipleDiffs + # @return [MultiMatcherDiff] a new instance of MultiMatcherDiff # - # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#16 + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#16 def initialize(expected_list); end # Returns message with diff(s) appended for provided differ @@ -7982,51 +8086,51 @@ class RSpec::Matchers::ExpectedsForMultipleDiffs # @api private # @param message [String] original failure message # @param differ [Proc] - # @param actual [Any] value # @return [String] # - # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#47 - def message_with_diff(message, differ, actual); end + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#47 + def message_with_diff(message, differ); end private # @api private # - # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#68 - def diffs(differ, actual); end + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#68 + def diffs(differ); end class << self # Wraps provided matcher list in instance of - # ExpectedForMultipleDiffs. + # MultiMatcherDiff. # # @api private # @param matchers [Array<Any>] list of matchers to wrap - # @return [RSpec::Matchers::ExpectedsForMultipleDiffs] + # @return [RSpec::Matchers::MultiMatcherDiff] # - # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#36 + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#37 def for_many_matchers(matchers); end # Wraps provided expected value in instance of - # ExpectedForMultipleDiffs. If provided value is already an - # ExpectedForMultipleDiffs then it just returns it. + # MultiMatcherDiff. If provided value is already an + # MultiMatcherDiff then it just returns it. # # @api private # @param expected [Any] value to be wrapped - # @return [RSpec::Matchers::ExpectedsForMultipleDiffs] + # @param actual [Any] value + # @return [RSpec::Matchers::MultiMatcherDiff] # - # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#26 - def from(expected); end + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#27 + def from(expected, actual); end private # @api private # - # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#58 + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#58 def diff_label_for(matcher); end # @api private # - # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#62 + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#62 def truncated(description); end end end @@ -8037,48 +8141,13 @@ end # @api private # @private # -# source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#10 -RSpec::Matchers::ExpectedsForMultipleDiffs::DEFAULT_DIFF_LABEL = T.let(T.unsafe(nil), String) +# source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#10 +RSpec::Matchers::MultiMatcherDiff::DEFAULT_DIFF_LABEL = T.let(T.unsafe(nil), String) # Maximum readable matcher description length # # @api private # @private # -# source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#14 -RSpec::Matchers::ExpectedsForMultipleDiffs::DESCRIPTION_MAX_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://rspec-expectations//lib/rspec/matchers.rb#958 -RSpec::Matchers::HAS_REGEX = T.let(T.unsafe(nil), Regexp) - -# Provides the necessary plumbing to wrap a matcher with a decorator. -# -# @private -# -# source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#5 -class RSpec::Matchers::MatcherDelegator - include ::RSpec::Matchers::Composable - - # @return [MatcherDelegator] a new instance of MatcherDelegator - # - # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#9 - def initialize(base_matcher); end - - # Returns the value of attribute base_matcher. - # - # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#7 - def base_matcher; end - - # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#13 - def method_missing(*args, &block); end - - private - - # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#29 - def initialize_copy(other); end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#18 - def respond_to_missing?(name, include_all = T.unsafe(nil)); end -end +# source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#14 +RSpec::Matchers::MultiMatcherDiff::DESCRIPTION_MAX_LENGTH = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/rspec-mocks@3.12.0.rbi b/sorbet/rbi/gems/rspec-mocks@3.13.0.rbi similarity index 92% rename from sorbet/rbi/gems/rspec-mocks@3.12.0.rbi rename to sorbet/rbi/gems/rspec-mocks@3.13.0.rbi index dd116fb2..b2e1d98e 100644 --- a/sorbet/rbi/gems/rspec-mocks@3.12.0.rbi +++ b/sorbet/rbi/gems/rspec-mocks@3.13.0.rbi @@ -10,70 +10,70 @@ # source://rspec-mocks//lib/rspec/mocks/instance_method_stasher.rb#1 module RSpec class << self - # source://rspec-core/3.12.0/lib/rspec/core.rb#70 + # source://rspec-core/3.13.0/lib/rspec/core.rb#70 def clear_examples; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#85 + # source://rspec-core/3.13.0/lib/rspec/core.rb#85 def configuration; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def configuration=(_arg0); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#97 + # source://rspec-core/3.13.0/lib/rspec/core.rb#97 def configure; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#194 + # source://rspec-core/3.13.0/lib/rspec/core.rb#194 def const_missing(name); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def context(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#122 + # source://rspec-core/3.13.0/lib/rspec/core.rb#122 def current_example; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#128 + # source://rspec-core/3.13.0/lib/rspec/core.rb#128 def current_example=(example); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#154 + # source://rspec-core/3.13.0/lib/rspec/core.rb#154 def current_scope; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#134 + # source://rspec-core/3.13.0/lib/rspec/core.rb#134 def current_scope=(scope); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def describe(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def example_group(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fcontext(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fdescribe(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#58 + # source://rspec-core/3.13.0/lib/rspec/core.rb#58 def reset; end - # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_context(name, *args, &block); end - # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples(name, *args, &block); end - # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples_for(name, *args, &block); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#160 + # source://rspec-core/3.13.0/lib/rspec/core.rb#160 def world; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def world=(_arg0); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xcontext(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xdescribe(*args, &example_group_block); end end end @@ -109,7 +109,7 @@ module RSpec::Mocks # @private # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#376 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#386 def error_generator; end # Sets a message expectation on `subject`. @@ -543,21 +543,21 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#94 -class RSpec::Mocks::AnyInstance::FluentInterfaceProxy +# source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#103 +class RSpec::Mocks::AnyInstance::FluentInterfaceProxy < ::BasicObject # @return [FluentInterfaceProxy] a new instance of FluentInterfaceProxy # - # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#95 + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#104 def initialize(targets); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#109 + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#118 def method_missing(*args, &block); end private # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#100 + # source://rspec-mocks//lib/rspec/mocks/any_instance/proxy.rb#109 def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end end @@ -647,7 +647,7 @@ RSpec::Mocks::AnyInstance::PositiveExpectationChain::ExpectationInvocationOrder # # This proxy sits in front of the recorder and delegates both to it # and to the `RSpec::Mocks::Proxy` for each already mocked or stubbed -# instance of the class, in order to propogates changes to the instances. +# instance of the class, in order to propagates changes to the instances. # # Note that unlike `RSpec::Mocks::Proxy`, this proxy class is stateless # and is not persisted in `RSpec::Mocks.space`. @@ -815,46 +815,46 @@ class RSpec::Mocks::AnyInstance::Recorder private - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#280 + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#282 def allow_no_prepended_module_definition_of(method_name); end # @return [Boolean] # # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#159 - def ancestor_is_an_observer?(method_name); end + def ancestor_is_an_observer?(ancestor, method_name); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#233 + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#235 def backup_method!(method_name); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#267 + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#269 def mark_invoked!(method_name); end # @yield [args.first, args] # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#176 + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#178 def normalize_chain(*args); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#247 + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#249 def observe!(method_name); end # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#243 + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#245 def public_protected_or_private_method_defined?(method_name); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#181 + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#183 def received_expected_message!(method_name); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#227 + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#229 def remove_dummy_method!(method_name); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#187 + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#189 def restore_method!(method_name); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#195 + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#197 def restore_original_method!(method_name); end - # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#168 + # source://rspec-mocks//lib/rspec/mocks/any_instance/recorder.rb#166 def super_class_observers_for(method_name); end # @return [Boolean] @@ -865,7 +865,7 @@ end # @private # -# source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#5 +# source://rspec-mocks//lib/rspec/mocks/any_instance/stub_chain.rb#6 class RSpec::Mocks::AnyInstance::StubChain < ::RSpec::Mocks::AnyInstance::Chain # @private # @return [Boolean] @@ -1005,15 +1005,15 @@ class RSpec::Mocks::ArgumentListMatcher # # @private # - # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#79 + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#81 def resolve_expected_args_based_on(actual_args); end private - # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#98 + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#100 def ensure_expected_args_valid!; end - # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#90 + # source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#92 def replace_any_args_with_splat_of_anything(before_count, actual_args_count); end end @@ -1021,7 +1021,7 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#112 +# source://rspec-mocks//lib/rspec/mocks/argument_list_matcher.rb#114 RSpec::Mocks::ArgumentListMatcher::MATCH_ALL = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentListMatcher) # ArgumentMatchers are placeholders that you can include in message @@ -1040,7 +1040,7 @@ module RSpec::Mocks::ArgumentMatchers # @example # expect(object).to receive(:message).with(kind_of(Thing)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#111 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#121 def a_kind_of(klass); end # Matches if `arg.instance_of?(klass)` @@ -1048,7 +1048,7 @@ module RSpec::Mocks::ArgumentMatchers # @example # expect(object).to receive(:message).with(instance_of(Thing)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#101 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#111 def an_instance_of(klass); end # Acts like an arg splat, matching any number of args at any point in an arg list. @@ -1072,6 +1072,15 @@ module RSpec::Mocks::ArgumentMatchers # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#34 def anything; end + # Matches an array that excludes the specified items. + # + # @example + # expect(object).to receive(:message).with(array_excluding(1,2,3)) + # expect(object).to receive(:message).with(array_excluding([1,2,3])) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#100 + def array_excluding(*args); end + # Matches an array that includes the specified items at least once. # Ignores duplicates and additional values # @@ -1079,7 +1088,7 @@ module RSpec::Mocks::ArgumentMatchers # expect(object).to receive(:message).with(array_including(1,2,3)) # expect(object).to receive(:message).with(array_including([1,2,3])) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#80 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#90 def array_including(*args); end # Matches a boolean value. @@ -1106,7 +1115,7 @@ module RSpec::Mocks::ArgumentMatchers # expect(object).to receive(:message).with(hash_excluding(:key)) # expect(object).to receive(:message).with(hash_excluding(:key, :key2 => :val2)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#91 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#80 def hash_excluding(*args); end # Matches a hash that includes the specified key(s) or key/value pairs. @@ -1127,7 +1136,7 @@ module RSpec::Mocks::ArgumentMatchers # expect(object).to receive(:message).with(hash_excluding(:key)) # expect(object).to receive(:message).with(hash_excluding(:key, :key2 => :val2)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#91 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#80 def hash_not_including(*args); end # Matches if `arg.instance_of?(klass)` @@ -1135,7 +1144,7 @@ module RSpec::Mocks::ArgumentMatchers # @example # expect(object).to receive(:message).with(instance_of(Thing)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#101 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#111 def instance_of(klass); end # Matches if `arg.kind_of?(klass)` @@ -1143,7 +1152,7 @@ module RSpec::Mocks::ArgumentMatchers # @example # expect(object).to receive(:message).with(kind_of(Thing)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#111 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#121 def kind_of(klass); end # Matches no arguments. @@ -1157,171 +1166,192 @@ module RSpec::Mocks::ArgumentMatchers class << self # @private # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#118 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#128 def anythingize_lonely_keys(*args); end end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#149 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#159 class RSpec::Mocks::ArgumentMatchers::AnyArgMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#150 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#160 def ===(_other); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#154 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#164 def description; end end -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 RSpec::Mocks::ArgumentMatchers::AnyArgMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::AnyArgMatcher) # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#142 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#152 class RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#143 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#153 def description; end end -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher) # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#232 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#274 +class RSpec::Mocks::ArgumentMatchers::ArrayExcludingMatcher + # @return [ArrayExcludingMatcher] a new instance of ArrayExcludingMatcher + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#275 + def initialize(unexpected); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#279 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#292 + def description; end + + private + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#298 + def formatted_unexpected_values; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#242 class RSpec::Mocks::ArgumentMatchers::ArrayIncludingMatcher # @return [ArrayIncludingMatcher] a new instance of ArrayIncludingMatcher # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#233 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#243 def initialize(expected); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#237 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#247 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#248 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#260 def description; end private - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#254 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#266 def formatted_expected_values; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#178 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#188 class RSpec::Mocks::ArgumentMatchers::BaseHashMatcher # @return [BaseHashMatcher] a new instance of BaseHashMatcher # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#179 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#189 def initialize(expected); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#183 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#193 def ===(predicate, actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#191 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#201 def description(name); end private - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#197 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#207 def formatted_expected_hash; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#167 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#177 class RSpec::Mocks::ArgumentMatchers::BooleanMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#168 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#178 def ===(value); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#172 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#182 def description; end end -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 RSpec::Mocks::ArgumentMatchers::BooleanMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::BooleanMatcher) # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#262 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#306 class RSpec::Mocks::ArgumentMatchers::DuckTypeMatcher # @return [DuckTypeMatcher] a new instance of DuckTypeMatcher # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#263 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#307 def initialize(*methods_to_respond_to); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#267 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#311 def ===(value); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#271 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#315 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#221 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#231 class RSpec::Mocks::ArgumentMatchers::HashExcludingMatcher < ::RSpec::Mocks::ArgumentMatchers::BaseHashMatcher - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#222 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#232 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#226 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#236 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#210 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#220 class RSpec::Mocks::ArgumentMatchers::HashIncludingMatcher < ::RSpec::Mocks::ArgumentMatchers::BaseHashMatcher - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#211 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#221 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#215 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#225 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#277 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#321 class RSpec::Mocks::ArgumentMatchers::InstanceOf # @return [InstanceOf] a new instance of InstanceOf # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#278 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#322 def initialize(klass); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#282 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#326 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#286 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#330 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#292 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#336 class RSpec::Mocks::ArgumentMatchers::KindOf # @return [KindOf] a new instance of KindOf # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#293 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#337 def initialize(klass); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#297 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#341 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#301 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#345 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#160 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#170 class RSpec::Mocks::ArgumentMatchers::NoArgsMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#161 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#171 def description; end end -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 RSpec::Mocks::ArgumentMatchers::NoArgsMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::NoArgsMatcher) # Intended to be subclassed by stateless, immutable argument matchers. @@ -1334,17 +1364,13 @@ RSpec::Mocks::ArgumentMatchers::NoArgsMatcher::INSTANCE = T.let(T.unsafe(nil), R # # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#133 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#143 class RSpec::Mocks::ArgumentMatchers::SingletonMatcher class << self # @private # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#136 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#146 def inherited(subklass); end - - private - - def new(*_arg0); end end end @@ -1404,7 +1430,7 @@ RSpec::Mocks::ClassNewMethodReference::CLASS_NEW = T.let(T.unsafe(nil), UnboundM # # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#117 +# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#119 class RSpec::Mocks::ClassVerifyingDouble < ::Module include ::RSpec::Mocks::TestDouble include ::RSpec::Mocks::VerifyingDouble @@ -1727,7 +1753,7 @@ class RSpec::Mocks::Constant # Queries rspec-mocks to find out information about the named constant. # # @param name [String] the name of the constant - # @return [Constant] an object contaning information about the named + # @return [Constant] an object containing information about the named # constant. # # source://rspec-mocks//lib/rspec/mocks/mutate_const.rb#86 @@ -2122,19 +2148,19 @@ class RSpec::Mocks::ErrorGenerator private - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#318 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#328 def __raise(message, backtrace_line = T.unsafe(nil), source_id = T.unsafe(nil)); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#346 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#356 def arg_list(args); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#356 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#366 def count_message(count, expectation_count_type = T.unsafe(nil)); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#292 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#302 def diff_message(expected_args, actual_args); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#314 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#324 def differ; end # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#268 @@ -2143,39 +2169,39 @@ class RSpec::Mocks::ErrorGenerator # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#257 def expected_part_of_expectation_error(expected_received_count, expectation_count_type, argument_list_matcher); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#341 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#351 def format_args(args); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#350 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#360 def format_received_args(args_for_multiple_calls); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#370 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#380 def group_count(index, args); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#366 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#376 def grouped_args(args); end # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#310 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#320 def list_of_exactly_one_string?(args); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#337 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#347 def notify(*args); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#332 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#342 def prepend_to_backtrace(exception, line); end # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#250 def received_part_of_expectation_error(actual_received_count, args); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#362 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#372 def times(count); end # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#264 def unexpected_arguments_message(expected_args_string, actual_args_string); end - # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#302 + # source://rspec-mocks//lib/rspec/mocks/error_generator.rb#312 def unpack_string_args(formatted_expected_args, actual_args); end end @@ -2526,7 +2552,7 @@ end # @private # -# source://rspec-mocks//lib/rspec/mocks/message_chain.rb#61 +# source://rspec-mocks//lib/rspec/mocks/message_chain.rb#62 class RSpec::Mocks::ExpectChain < ::RSpec::Mocks::MessageChain private @@ -2727,12 +2753,12 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#69 +# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#71 class RSpec::Mocks::InstanceVerifyingDouble include ::RSpec::Mocks::TestDouble include ::RSpec::Mocks::VerifyingDouble - # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#73 + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#75 def __build_mock_proxy(order_group); end end @@ -2815,14 +2841,14 @@ class RSpec::Mocks::Matchers::HaveReceived # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#44 def failure_message_when_negated; end + # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#19 + def matcher_name; end + # @return [Boolean] # # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#23 def matches?(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#19 - def name; end - # source://rspec-mocks//lib/rspec/mocks/matchers/have_received.rb#53 def once(*args); end @@ -2921,31 +2947,31 @@ class RSpec::Mocks::Matchers::Receive # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#10 def initialize(message, block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def and_call_original(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def and_invoke(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def and_raise(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def and_return(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def and_throw(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def and_wrap_original(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def and_yield(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def at_least(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def at_most(*args, **_arg1, &block); end # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#20 @@ -2954,22 +2980,25 @@ class RSpec::Mocks::Matchers::Receive # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#30 def does_not_match?(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def exactly(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#24 - def matches?(subject, &block); end + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def inspect(*args, **_arg1, &block); end # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#16 - def name; end + def matcher_name; end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#24 + def matches?(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def never(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def once(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def ordered(*args, **_arg1, &block); end # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#41 @@ -2990,39 +3019,42 @@ class RSpec::Mocks::Matchers::Receive # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#30 def setup_negative_expectation(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def thrice(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def time(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def times(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 + def to_s(*args, **_arg1, &block); end + + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def twice(*args, **_arg1, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#61 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#62 def with(*args, **_arg1, &block); end private - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#70 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#71 def describable; end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#107 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#108 def move_block_to_last_customization(block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#90 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#91 def setup_any_instance_method_substitute(subject, method, block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#95 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#96 def setup_method_substitute(host, method, block, *args); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#85 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#86 def setup_mock_proxy_method_substitute(subject, method, block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#74 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#75 def warn_if_any_instance(expression, subject); end end @@ -3031,18 +3063,18 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#118 +# source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#119 class RSpec::Mocks::Matchers::Receive::DefaultDescribable # @return [DefaultDescribable] a new instance of DefaultDescribable # - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#119 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#120 def initialize(message); end # This is much simpler for the `any_instance` case than what the # user may want, but I'm not up for putting a bunch of effort # into full descriptions for `any_instance` expectations at this point :(. # - # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#126 + # source://rspec-mocks//lib/rspec/mocks/matchers/receive.rb#127 def description_for(verb); end end @@ -3083,12 +3115,12 @@ class RSpec::Mocks::Matchers::ReceiveMessageChain # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#53 def does_not_match?(*_args); end + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#23 + def matcher_name; end + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#48 def matches?(subject, &block); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#23 - def name; end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_message_chain.rb#31 def setup_allowance(subject, &block); end @@ -3137,12 +3169,12 @@ class RSpec::Mocks::Matchers::ReceiveMessages # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#29 def does_not_match?(_subject); end + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#13 + def matcher_name; end + # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#21 def matches?(subject); end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#13 - def name; end - # source://rspec-mocks//lib/rspec/mocks/matchers/receive_messages.rb#36 def setup_allowance(subject); end @@ -3722,22 +3754,22 @@ class RSpec::Mocks::MethodDouble # @private # @return [MethodDouble] a new instance of MethodDouble # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#12 def initialize(object, method_name, proxy); end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#191 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#216 def add_default_stub(*args, &implementation); end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#141 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#166 def add_expectation(error_generator, expectation_ordering, expected_from, opts, &implementation); end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#177 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#202 def add_simple_expectation(method_name, response, error_generator, backtrace_line); end # A simple stub can only return a concrete value for a message, and @@ -3749,37 +3781,37 @@ class RSpec::Mocks::MethodDouble # # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#172 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#197 def add_simple_stub(method_name, response); end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#156 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#181 def add_stub(error_generator, expectation_ordering, expected_from, opts = T.unsafe(nil), &implementation); end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#150 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#175 def build_expectation(error_generator, expectation_ordering); end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#127 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#152 def clear; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#51 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#61 def configure_method; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#58 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#68 def define_proxy_method; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#6 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 def expectations; end # The type of message expectation to create has been extracted to its own @@ -3787,30 +3819,35 @@ class RSpec::Mocks::MethodDouble # # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#136 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#161 def message_expectation_class; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#6 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#41 + def method_missing_block; end + + # @private + # + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 def method_name; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#6 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 def method_stasher; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#6 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 def object; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#46 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#56 def object_singleton_class; end - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#21 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#24 def original_implementation_callable; end # source://rspec-mocks//lib/rspec/mocks/method_double.rb#34 @@ -3821,85 +3858,90 @@ class RSpec::Mocks::MethodDouble # # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#79 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#97 def proxy_method_invoked(_obj, *args, **_arg2, &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#208 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#233 def raise_method_not_stubbed_error; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#197 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#222 def remove_stub; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#203 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#228 def remove_stub_if_present; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#121 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#146 def reset; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#85 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#103 def restore_original_method; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#108 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#133 def restore_original_visibility; end - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#21 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#24 def save_original_implementation_callable!; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#182 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#207 def setup_simple_method_double(method_name, response, collection, error_generator = T.unsafe(nil), backtrace_line = T.unsafe(nil)); end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#97 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#122 def show_frozen_warning; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#6 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#9 def stubs; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#116 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#141 def verify; end # @private # - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#41 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#51 def visibility; end private - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#230 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#255 def definition_target; end - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#250 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#275 def new_rspec_prepended_module; end - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#268 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#293 def remove_method_from_definition_target; end - # source://rspec-mocks//lib/rspec/mocks/method_double.rb#234 + # source://rspec-mocks//lib/rspec/mocks/method_double.rb#259 def usable_rspec_prepended_module; end end +# @private TODO: drop in favor of FrozenError in ruby 2.5+ +# +# source://rspec-mocks//lib/rspec/mocks/method_double.rb#6 +RSpec::Mocks::MethodDouble::FROZEN_ERROR_MSG = T.let(T.unsafe(nil), Regexp) + # We subclass `Module` in order to be able to easily detect our prepended module. # -# source://rspec-mocks//lib/rspec/mocks/method_double.rb#228 +# source://rspec-mocks//lib/rspec/mocks/method_double.rb#253 class RSpec::Mocks::MethodDouble::RSpecPrependedModule < ::Module; end # Represents a method on an object that may or may not be defined. @@ -4142,7 +4184,7 @@ RSpec::Mocks::ObjectReference::MODULE_NAME_METHOD = T.let(T.unsafe(nil), Unbound # # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#108 +# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#110 class RSpec::Mocks::ObjectVerifyingDouble include ::RSpec::Mocks::TestDouble include ::RSpec::Mocks::VerifyingDouble @@ -4154,17 +4196,17 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#85 +# source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#87 module RSpec::Mocks::ObjectVerifyingDoubleMethods include ::RSpec::Mocks::TestDouble include ::RSpec::Mocks::VerifyingDouble - # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#89 + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#91 def as_stubbed_const(options = T.unsafe(nil)); end private - # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#96 + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#98 def __build_mock_proxy(order_group); end end @@ -4239,7 +4281,7 @@ class RSpec::Mocks::OutsideOfExampleError < ::StandardError; end # @private # -# source://rspec-mocks//lib/rspec/mocks/proxy.rb#464 +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#459 class RSpec::Mocks::PartialClassDoubleProxy < ::RSpec::Mocks::PartialDoubleProxy include ::RSpec::Mocks::PartialClassDoubleProxyMethods end @@ -4251,9 +4293,9 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/proxy.rb#388 +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#383 module RSpec::Mocks::PartialClassDoubleProxyMethods - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#389 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#384 def initialize(source_space, *args); end # Consider this situation: @@ -4277,54 +4319,54 @@ module RSpec::Mocks::PartialClassDoubleProxyMethods # That's what this method (together with `original_unbound_method_handle_from_ancestor_for`) # does. # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#414 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#409 def original_method_handle_for(message); end protected - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#442 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#437 def method_double_from_ancestor_for(message); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#437 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#432 def original_unbound_method_handle_from_ancestor_for(message); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#452 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#447 def superclass_proxy; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/proxy.rb#325 +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#320 class RSpec::Mocks::PartialDoubleProxy < ::RSpec::Mocks::Proxy # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#339 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#334 def add_simple_expectation(method_name, response, location); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#345 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#340 def add_simple_stub(method_name, response); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#362 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#357 def message_received(message, *args, **_arg2, &block); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#326 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#321 def original_method_handle_for(message); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#357 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#352 def reset; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#351 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#346 def visibility_for(method_name); end private # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#372 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#367 def any_instance_class_recorder_observing_method?(klass, method_name); end end @@ -4340,22 +4382,22 @@ class RSpec::Mocks::Proxy # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#74 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#68 def add_message_expectation(method_name, opts = T.unsafe(nil), &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#88 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#82 def add_simple_expectation(method_name, response, location); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#149 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#143 def add_simple_stub(method_name, response); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#143 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#137 def add_stub(method_name, opts = T.unsafe(nil), &implementation); end # Tells the object to ignore any messages that aren't explicitly set as @@ -4363,17 +4405,17 @@ class RSpec::Mocks::Proxy # # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#61 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#55 def as_null_object; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#93 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#87 def build_expectation(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#126 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#120 def check_for_unexpected_arguments(expectation); end # @private @@ -4390,121 +4432,121 @@ class RSpec::Mocks::Proxy # @private # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#190 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#184 def has_negative_expectation?(message); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#203 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#198 def message_received(message, *args, **_arg2, &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#183 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#177 def messages_arg_list; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#268 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#263 def method_double_if_exists_for_message(message); end # @private # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#54 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#48 def null_object?; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#51 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#45 def object; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#67 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#61 def original_method_handle_for(_message); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#262 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#257 def prepended_modules_of_singleton_class; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#241 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#236 def raise_missing_default_stub_error(expectation, args_for_multiple_calls); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#236 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#231 def raise_unexpected_message_error(method_name, args); end # @private # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#176 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#170 def received_message?(method_name, *args, &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#195 - def record_message_received(message, *args, &block); end + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#189 + def record_message_received(message, *args, **_arg2, &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#154 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#148 def remove_stub(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#159 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#153 def remove_stub_if_present(method_name); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#103 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#97 def replay_received_message_on(expectation, &block); end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#169 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#163 def reset; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#164 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#158 def verify; end # @private # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#246 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#241 def visibility_for(_method_name); end private - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#285 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#280 def find_almost_matching_expectation(method_name, *args, **_arg2); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#309 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#304 def find_almost_matching_stub(method_name, *args, **_arg2); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#292 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#287 def find_best_matching_expectation_for(method_name); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#278 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#273 def find_matching_expectation(method_name, *args, **_arg2); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#304 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#299 def find_matching_method_stub(method_name, *args, **_arg2); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#274 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#269 def method_double_for(message); end class << self - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#252 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#247 def prepended_modules_of(klass); end end end -# source://rspec-mocks//lib/rspec/mocks/proxy.rb#71 +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#65 RSpec::Mocks::Proxy::DEFAULT_MESSAGE_EXPECTATION_OPTS = T.let(T.unsafe(nil), Hash) # @private @@ -4558,55 +4600,55 @@ end # @private # -# source://rspec-mocks//lib/rspec/mocks/proxy.rb#469 +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#464 class RSpec::Mocks::ProxyForNil < ::RSpec::Mocks::PartialDoubleProxy # @return [ProxyForNil] a new instance of ProxyForNil # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#470 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#465 def initialize(order_group); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#478 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#473 def add_message_expectation(method_name, opts = T.unsafe(nil), &block); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#483 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#478 def add_stub(method_name, opts = T.unsafe(nil), &implementation); end # Returns the value of attribute disallow_expectations. # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#475 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#470 def disallow_expectations; end # Sets the attribute disallow_expectations # # @param value the value to set the attribute disallow_expectations to. # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#475 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#470 def disallow_expectations=(_arg0); end # Returns the value of attribute warn_about_expectations. # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#476 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#471 def warn_about_expectations; end # Sets the attribute warn_about_expectations # # @param value the value to set the attribute warn_about_expectations to. # - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#476 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#471 def warn_about_expectations=(_arg0); end private - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#520 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#515 def raise_error(method_name); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#490 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#485 def set_expectation_behavior; end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#515 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#510 def warn(method_name); end - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#504 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#499 def warn_or_raise!(method_name); end end @@ -5040,9 +5082,9 @@ end # @private # -# source://rspec-mocks//lib/rspec/mocks/proxy.rb#316 +# source://rspec-mocks//lib/rspec/mocks/proxy.rb#311 class RSpec::Mocks::TestDoubleProxy < ::RSpec::Mocks::Proxy - # source://rspec-mocks//lib/rspec/mocks/proxy.rb#317 + # source://rspec-mocks//lib/rspec/mocks/proxy.rb#312 def reset; end end @@ -5055,11 +5097,11 @@ class RSpec::Mocks::UnsupportedMatcherError < ::StandardError; end # # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#6 module RSpec::Mocks::VerifyingDouble - # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#51 + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#53 def initialize(doubled_module, *args); end # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#39 - def __send__(name, *args, &block); end + def __send__(name, *args, **_arg2, &block); end # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#20 def method_missing(message, *args, &block); end @@ -5069,8 +5111,8 @@ module RSpec::Mocks::VerifyingDouble # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#7 def respond_to?(message, include_private = T.unsafe(nil)); end - # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#47 - def send(name, *args, &block); end + # source://rspec-mocks//lib/rspec/mocks/verifying_double.rb#48 + def send(name, *args, **_arg2, &block); end end # @private @@ -5084,11 +5126,11 @@ class RSpec::Mocks::VerifyingDoubleNotDefinedError < ::StandardError; end # # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#214 +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#215 class RSpec::Mocks::VerifyingExistingClassNewMethodDouble < ::RSpec::Mocks::VerifyingExistingMethodDouble # @yield [Support::MethodSignature.new(object.instance_method(:initialize))] # - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#215 + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#216 def with_signature; end end @@ -5100,25 +5142,25 @@ end # # @private # -# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#179 +# source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#180 class RSpec::Mocks::VerifyingExistingMethodDouble < ::RSpec::Mocks::VerifyingMethodDouble # @return [VerifyingExistingMethodDouble] a new instance of VerifyingExistingMethodDouble # - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#180 + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#181 def initialize(object, method_name, proxy); end # @return [Boolean] # - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#194 + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#195 def unimplemented?; end # @yield [Support::MethodSignature.new(original_implementation_callable)] # - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#190 + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#191 def with_signature; end class << self - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#198 + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#199 def for(object, method_name, proxy); end end end @@ -5129,7 +5171,7 @@ end # # @api private # -# source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#9 +# source://rspec-mocks//lib/rspec/mocks/verifying_message_expectation.rb#17 class RSpec::Mocks::VerifyingMessageExpectation < ::RSpec::Mocks::MessageExpectation # @api private # @return [VerifyingMessageExpectation] a new instance of VerifyingMessageExpectation @@ -5198,9 +5240,9 @@ class RSpec::Mocks::VerifyingMethodDouble < ::RSpec::Mocks::MethodDouble def message_expectation_class; end # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#159 - def proxy_method_invoked(obj, *args, &block); end + def proxy_method_invoked(obj, *args, **_arg2, &block); end - # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#164 + # source://rspec-mocks//lib/rspec/mocks/verifying_proxy.rb#165 def validate_arguments!(actual_args); end end @@ -5232,7 +5274,7 @@ end # A verifying proxy mostly acts like a normal proxy, except that it # contains extra logic to try and determine the validity of any expectation # set on it. This includes whether or not methods have been defined and the -# validatiy of arguments on method calls. +# validity of arguments on method calls. # # In all other ways this behaves like a normal proxy. It only adds the # verification behaviour to specific methods then delegates to the parent diff --git a/sorbet/rbi/gems/rspec-support@3.12.0.rbi b/sorbet/rbi/gems/rspec-support@3.13.0.rbi similarity index 83% rename from sorbet/rbi/gems/rspec-support@3.12.0.rbi rename to sorbet/rbi/gems/rspec-support@3.13.0.rbi index aa45b63a..a19567e6 100644 --- a/sorbet/rbi/gems/rspec-support@3.12.0.rbi +++ b/sorbet/rbi/gems/rspec-support@3.13.0.rbi @@ -4,75 +4,75 @@ # This is an autogenerated file for types exported from the `rspec-support` gem. # Please instead update this file by running `bin/tapioca gem rspec-support`. -# source://rspec-support//lib/rspec/support.rb#1 +# source://rspec-support//lib/rspec/support.rb#3 module RSpec extend ::RSpec::Support::Warnings class << self - # source://rspec-core/3.12.0/lib/rspec/core.rb#70 + # source://rspec-core/3.13.0/lib/rspec/core.rb#70 def clear_examples; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#85 + # source://rspec-core/3.13.0/lib/rspec/core.rb#85 def configuration; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def configuration=(_arg0); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#97 + # source://rspec-core/3.13.0/lib/rspec/core.rb#97 def configure; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#194 + # source://rspec-core/3.13.0/lib/rspec/core.rb#194 def const_missing(name); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def context(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#122 + # source://rspec-core/3.13.0/lib/rspec/core.rb#122 def current_example; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#128 + # source://rspec-core/3.13.0/lib/rspec/core.rb#128 def current_example=(example); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#154 + # source://rspec-core/3.13.0/lib/rspec/core.rb#154 def current_scope; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#134 + # source://rspec-core/3.13.0/lib/rspec/core.rb#134 def current_scope=(scope); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def describe(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def example_group(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fcontext(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fdescribe(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#58 + # source://rspec-core/3.13.0/lib/rspec/core.rb#58 def reset; end - # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_context(name, *args, &block); end - # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples(name, *args, &block); end - # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples_for(name, *args, &block); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#160 + # source://rspec-core/3.13.0/lib/rspec/core.rb#160 def world; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def world=(_arg0); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xcontext(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xdescribe(*args, &example_group_block); end end end @@ -82,18 +82,18 @@ end # the code using the library, which is far more useful than the particular # internal method that raised an error. # -# source://rspec-support//lib/rspec/support/caller_filter.rb#8 +# source://rspec-support//lib/rspec/support/caller_filter.rb#10 class RSpec::CallerFilter class << self # Earlier rubies do not support the two argument form of `caller`. This # fallback is logically the same, but slower. # - # source://rspec-support//lib/rspec/support/caller_filter.rb#47 + # source://rspec-support//lib/rspec/support/caller_filter.rb#49 def first_non_rspec_line(skip_frames = T.unsafe(nil), increment = T.unsafe(nil)); end end end -# source://rspec-support//lib/rspec/support/caller_filter.rb#18 +# source://rspec-support//lib/rspec/support/caller_filter.rb#20 RSpec::CallerFilter::ADDITIONAL_TOP_LEVEL_FILES = T.let(T.unsafe(nil), Array) # rubygems/core_ext/kernel_require.rb isn't actually part of rspec (obviously) but we want @@ -103,23 +103,23 @@ RSpec::CallerFilter::ADDITIONAL_TOP_LEVEL_FILES = T.let(T.unsafe(nil), Array) # file, but it depends on if rubygems is loaded or not. We don't want to have to deal # with this complexity in our `RSpec.deprecate` calls, so we ignore it here. # -# source://rspec-support//lib/rspec/support/caller_filter.rb#28 +# source://rspec-support//lib/rspec/support/caller_filter.rb#30 RSpec::CallerFilter::IGNORE_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rspec-support//lib/rspec/support/caller_filter.rb#20 +# source://rspec-support//lib/rspec/support/caller_filter.rb#22 RSpec::CallerFilter::LIB_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rspec-support//lib/rspec/support/caller_filter.rb#9 +# source://rspec-support//lib/rspec/support/caller_filter.rb#11 RSpec::CallerFilter::RSPEC_LIBS = T.let(T.unsafe(nil), Array) -# source://rspec-support//lib/rspec/support.rb#2 +# source://rspec-support//lib/rspec/support.rb#4 module RSpec::Support class << self # Used internally to get a class of a given object, even if it does not respond to #class. # # @api private # - # source://rspec-support//lib/rspec/support.rb#84 + # source://rspec-support//lib/rspec/support.rb#86 def class_of(object); end # Defines a helper method that is optimized to require files from the @@ -134,7 +134,7 @@ module RSpec::Support # # @api private # - # source://rspec-support//lib/rspec/support.rb#14 + # source://rspec-support//lib/rspec/support.rb#16 def define_optimized_require_for_rspec(lib, &require_relative); end # Remove a previously registered matcher. Useful for cleaning up after @@ -142,36 +142,36 @@ module RSpec::Support # # @private # - # source://rspec-support//lib/rspec/support/matcher_definition.rb#22 + # source://rspec-support//lib/rspec/support/matcher_definition.rb#24 def deregister_matcher_definition(&block); end # @api private # - # source://rspec-support//lib/rspec/support.rb#105 + # source://rspec-support//lib/rspec/support.rb#113 def failure_notifier; end # @api private # - # source://rspec-support//lib/rspec/support.rb#97 + # source://rspec-support//lib/rspec/support.rb#105 def failure_notifier=(callable); end # @private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/matcher_definition.rb#27 + # source://rspec-support//lib/rspec/support/matcher_definition.rb#29 def is_a_matcher?(object); end # @private # - # source://rspec-support//lib/rspec/support/matcher_definition.rb#4 + # source://rspec-support//lib/rspec/support/matcher_definition.rb#6 def matcher_definitions; end - # source://rspec-support//lib/rspec/support.rb#52 + # source://rspec-support//lib/rspec/support.rb#54 def method_handle_for(object, method_name); end # @api private # - # source://rspec-support//lib/rspec/support.rb#110 + # source://rspec-support//lib/rspec/support.rb#118 def notify_failure(failure, options = T.unsafe(nil)); end # Used internally to break cyclic dependency between mocks, expectations, @@ -181,50 +181,51 @@ module RSpec::Support # # @private # - # source://rspec-support//lib/rspec/support/matcher_definition.rb#14 + # source://rspec-support//lib/rspec/support/matcher_definition.rb#16 def register_matcher_definition(&block); end - # source://rspec-support//lib/rspec/support.rb#23 + # source://rspec-support//lib/rspec/support.rb#25 def require_rspec_core(f); end - # source://rspec-support//lib/rspec/support.rb#23 + # source://rspec-support//lib/rspec/support.rb#25 + def require_rspec_mocks(f); end + + # source://rspec-support//lib/rspec/support.rb#25 def require_rspec_support(f); end # gives a string representation of an object for use in RSpec descriptions # # @api private # - # source://rspec-support//lib/rspec/support/matcher_definition.rb#34 + # source://rspec-support//lib/rspec/support/matcher_definition.rb#36 def rspec_description_for_object(object); end - # A single thread local variable so we don't excessively pollute that namespace. - # - # source://rspec-support//lib/rspec/support.rb#92 + # source://rspec-support//lib/rspec/support.rb#95 def thread_local_data; end # @api private # - # source://rspec-support//lib/rspec/support.rb#132 + # source://rspec-support//lib/rspec/support.rb#140 def warning_notifier; end # @api private # - # source://rspec-support//lib/rspec/support.rb#125 + # source://rspec-support//lib/rspec/support.rb#133 def warning_notifier=(_arg0); end # @api private # - # source://rspec-support//lib/rspec/support.rb#115 + # source://rspec-support//lib/rspec/support.rb#123 def with_failure_notifier(callable); end end end # @private # -# source://rspec-support//lib/rspec/support.rb#137 +# source://rspec-support//lib/rspec/support.rb#145 module RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue class << self - # source://rspec-support//lib/rspec/support.rb#142 + # source://rspec-support//lib/rspec/support.rb#150 def ===(exception); end end end @@ -232,7 +233,7 @@ end # These exceptions are dangerous to rescue as rescuing them # would interfere with things we should not interfere with. # -# source://rspec-support//lib/rspec/support.rb#140 +# source://rspec-support//lib/rspec/support.rb#148 RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue::AVOID_RESCUING = T.let(T.unsafe(nil), Array) # Deals with the slightly different semantics of block arguments. @@ -245,144 +246,144 @@ RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue::AVOID_RESCUING = T.let(T # # @api private # -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#266 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#268 class RSpec::Support::BlockSignature < ::RSpec::Support::MethodSignature # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#268 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#270 def classify_parameters; end end # @private # -# source://rspec-support//lib/rspec/support/comparable_version.rb#4 +# source://rspec-support//lib/rspec/support/comparable_version.rb#6 class RSpec::Support::ComparableVersion include ::Comparable # @return [ComparableVersion] a new instance of ComparableVersion # - # source://rspec-support//lib/rspec/support/comparable_version.rb#9 + # source://rspec-support//lib/rspec/support/comparable_version.rb#11 def initialize(string); end - # source://rspec-support//lib/rspec/support/comparable_version.rb#13 + # source://rspec-support//lib/rspec/support/comparable_version.rb#15 def <=>(other); end - # source://rspec-support//lib/rspec/support/comparable_version.rb#35 + # source://rspec-support//lib/rspec/support/comparable_version.rb#37 def segments; end # Returns the value of attribute string. # - # source://rspec-support//lib/rspec/support/comparable_version.rb#7 + # source://rspec-support//lib/rspec/support/comparable_version.rb#9 def string; end end # @private # -# source://rspec-support//lib/rspec/support.rb#102 +# source://rspec-support//lib/rspec/support.rb#110 RSpec::Support::DEFAULT_FAILURE_NOTIFIER = T.let(T.unsafe(nil), Proc) # @private # -# source://rspec-support//lib/rspec/support.rb#129 +# source://rspec-support//lib/rspec/support.rb#137 RSpec::Support::DEFAULT_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc) -# source://rspec-support//lib/rspec/support/differ.rb#10 +# source://rspec-support//lib/rspec/support/differ.rb#12 class RSpec::Support::Differ # @return [Differ] a new instance of Differ # - # source://rspec-support//lib/rspec/support/differ.rb#67 + # source://rspec-support//lib/rspec/support/differ.rb#69 def initialize(opts = T.unsafe(nil)); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/differ.rb#63 + # source://rspec-support//lib/rspec/support/differ.rb#65 def color?; end - # source://rspec-support//lib/rspec/support/differ.rb#11 + # source://rspec-support//lib/rspec/support/differ.rb#13 def diff(actual, expected); end - # source://rspec-support//lib/rspec/support/differ.rb#57 + # source://rspec-support//lib/rspec/support/differ.rb#59 def diff_as_object(actual, expected); end - # source://rspec-support//lib/rspec/support/differ.rb#28 + # source://rspec-support//lib/rspec/support/differ.rb#30 def diff_as_string(actual, expected); end private - # source://rspec-support//lib/rspec/support/differ.rb#128 + # source://rspec-support//lib/rspec/support/differ.rb#130 def add_old_hunk_to_hunk(hunk, oldhunk); end - # source://rspec-support//lib/rspec/support/differ.rb#124 + # source://rspec-support//lib/rspec/support/differ.rb#126 def add_to_output(output, string); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/differ.rb#78 + # source://rspec-support//lib/rspec/support/differ.rb#80 def all_strings?(*args); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/differ.rb#82 + # source://rspec-support//lib/rspec/support/differ.rb#84 def any_multiline_strings?(*args); end - # source://rspec-support//lib/rspec/support/differ.rb#153 + # source://rspec-support//lib/rspec/support/differ.rb#155 def blue(text); end - # source://rspec-support//lib/rspec/support/differ.rb#115 + # source://rspec-support//lib/rspec/support/differ.rb#117 def build_hunks(actual, expected); end - # source://rspec-support//lib/rspec/support/differ.rb#90 + # source://rspec-support//lib/rspec/support/differ.rb#92 def coerce_to_string(string_or_array); end - # source://rspec-support//lib/rspec/support/differ.rb#141 + # source://rspec-support//lib/rspec/support/differ.rb#143 def color(text, color_code); end - # source://rspec-support//lib/rspec/support/differ.rb#161 + # source://rspec-support//lib/rspec/support/differ.rb#163 def color_diff(diff); end - # source://rspec-support//lib/rspec/support/differ.rb#95 + # source://rspec-support//lib/rspec/support/differ.rb#97 def diffably_stringify(array); end - # source://rspec-support//lib/rspec/support/differ.rb#119 + # source://rspec-support//lib/rspec/support/differ.rb#121 def finalize_output(output, final_line); end - # source://rspec-support//lib/rspec/support/differ.rb#137 + # source://rspec-support//lib/rspec/support/differ.rb#139 def format_type; end - # source://rspec-support//lib/rspec/support/differ.rb#149 + # source://rspec-support//lib/rspec/support/differ.rb#151 def green(text); end - # source://rspec-support//lib/rspec/support/differ.rb#202 + # source://rspec-support//lib/rspec/support/differ.rb#204 def handle_encoding_errors(actual, expected); end - # source://rspec-support//lib/rspec/support/differ.rb#192 + # source://rspec-support//lib/rspec/support/differ.rb#194 def hash_to_string(hash); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/differ.rb#106 + # source://rspec-support//lib/rspec/support/differ.rb#108 def multiline?(string); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/differ.rb#86 + # source://rspec-support//lib/rspec/support/differ.rb#88 def no_numbers?(*args); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/differ.rb#74 + # source://rspec-support//lib/rspec/support/differ.rb#76 def no_procs?(*args); end - # source://rspec-support//lib/rspec/support/differ.rb#157 + # source://rspec-support//lib/rspec/support/differ.rb#159 def normal(text); end - # source://rspec-support//lib/rspec/support/differ.rb#178 + # source://rspec-support//lib/rspec/support/differ.rb#180 def object_to_string(object); end - # source://rspec-support//lib/rspec/support/differ.rb#145 + # source://rspec-support//lib/rspec/support/differ.rb#147 def red(text); end - # source://rspec-support//lib/rspec/support/differ.rb#132 + # source://rspec-support//lib/rspec/support/differ.rb#134 def safely_flatten(array); end end @@ -391,14 +392,14 @@ end # # @api private # -# source://rspec-support//lib/rspec/support/directory_maker.rb#9 +# source://rspec-support//lib/rspec/support/directory_maker.rb#11 class RSpec::Support::DirectoryMaker class << self # Implements nested directory construction # # @api private # - # source://rspec-support//lib/rspec/support/directory_maker.rb#13 + # source://rspec-support//lib/rspec/support/directory_maker.rb#15 def mkdir_p(path); end private @@ -406,65 +407,65 @@ class RSpec::Support::DirectoryMaker # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/directory_maker.rb#55 + # source://rspec-support//lib/rspec/support/directory_maker.rb#57 def directory_exists?(dirname); end # @api private # - # source://rspec-support//lib/rspec/support/directory_maker.rb#50 + # source://rspec-support//lib/rspec/support/directory_maker.rb#52 def generate_path(stack, part); end # @api private # - # source://rspec-support//lib/rspec/support/directory_maker.rb#47 + # source://rspec-support//lib/rspec/support/directory_maker.rb#49 def generate_stack(path); end end end # @private # -# source://rspec-support//lib/rspec/support/encoded_string.rb#4 +# source://rspec-support//lib/rspec/support/encoded_string.rb#6 class RSpec::Support::EncodedString # @return [EncodedString] a new instance of EncodedString # - # source://rspec-support//lib/rspec/support/encoded_string.rb#14 + # source://rspec-support//lib/rspec/support/encoded_string.rb#16 def initialize(string, encoding = T.unsafe(nil)); end - # source://rspec-support//lib/rspec/support/encoded_string.rb#26 + # source://rspec-support//lib/rspec/support/encoded_string.rb#28 def <<(string); end - # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 def ==(*args, &block); end - # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 def empty?(*args, &block); end - # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 def encoding(*args, &block); end - # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 def eql?(*args, &block); end - # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 def lines(*args, &block); end # Returns the value of attribute source_encoding. # - # source://rspec-support//lib/rspec/support/encoded_string.rb#19 + # source://rspec-support//lib/rspec/support/encoded_string.rb#21 def source_encoding; end - # source://rspec-support//lib/rspec/support/encoded_string.rb#39 + # source://rspec-support//lib/rspec/support/encoded_string.rb#41 def split(regex_or_string); end - # source://rspec-support//lib/rspec/support/encoded_string.rb#44 + # source://rspec-support//lib/rspec/support/encoded_string.rb#46 def to_s; end - # source://rspec-support//lib/rspec/support/encoded_string.rb#44 + # source://rspec-support//lib/rspec/support/encoded_string.rb#46 def to_str; end private - # source://rspec-support//lib/rspec/support/encoded_string.rb#137 + # source://rspec-support//lib/rspec/support/encoded_string.rb#139 def detect_source_encoding(string); end # Encoding Exceptions: @@ -506,7 +507,7 @@ class RSpec::Support::EncodedString # RangeError: out of char range # e.g. the UTF-16LE emoji: 128169.chr # - # source://rspec-support//lib/rspec/support/encoded_string.rb#91 + # source://rspec-support//lib/rspec/support/encoded_string.rb#93 def matching_encoding(string); end # http://stackoverflow.com/a/8711118/879854 @@ -514,11 +515,11 @@ class RSpec::Support::EncodedString # with invalid encoding, which is a pretty good proxy # for the invalid byte sequence that causes an ArgumentError # - # source://rspec-support//lib/rspec/support/encoded_string.rb#122 + # source://rspec-support//lib/rspec/support/encoded_string.rb#124 def remove_invalid_bytes(string); end class << self - # source://rspec-support//lib/rspec/support/encoded_string.rb#141 + # source://rspec-support//lib/rspec/support/encoded_string.rb#143 def pick_encoding(source_a, source_b); end end end @@ -527,50 +528,79 @@ end # U+FFFD ("\xEF\xBF\xBD"), for Unicode encoding forms, else # ? ("\x3F") # -# source://rspec-support//lib/rspec/support/encoded_string.rb#12 +# source://rspec-support//lib/rspec/support/encoded_string.rb#14 RSpec::Support::EncodedString::REPLACE = T.let(T.unsafe(nil), String) -# source://rspec-support//lib/rspec/support/encoded_string.rb#7 +# source://rspec-support//lib/rspec/support/encoded_string.rb#9 RSpec::Support::EncodedString::US_ASCII = T.let(T.unsafe(nil), String) # Reduce allocations by storing constants. # -# source://rspec-support//lib/rspec/support/encoded_string.rb#6 +# source://rspec-support//lib/rspec/support/encoded_string.rb#8 RSpec::Support::EncodedString::UTF_8 = T.let(T.unsafe(nil), String) +# Provides a means to fuzzy-match between two arbitrary objects. +# Understands array/hash nesting. Uses `===` or `==` to +# perform the matching. +# +# source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#8 +module RSpec::Support::FuzzyMatcher + class << self + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#10 + def values_match?(expected, actual); end + + private + + # @private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#29 + def arrays_match?(expected_list, actual_list); end + + # @private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#38 + def hashes_match?(expected_hash, actual_hash); end + end +end + # @private # -# source://rspec-support//lib/rspec/support/hunk_generator.rb#7 +# source://rspec-support//lib/rspec/support/hunk_generator.rb#9 class RSpec::Support::HunkGenerator # @return [HunkGenerator] a new instance of HunkGenerator # - # source://rspec-support//lib/rspec/support/hunk_generator.rb#8 + # source://rspec-support//lib/rspec/support/hunk_generator.rb#10 def initialize(actual, expected); end - # source://rspec-support//lib/rspec/support/hunk_generator.rb#13 + # source://rspec-support//lib/rspec/support/hunk_generator.rb#15 def hunks; end private - # source://rspec-support//lib/rspec/support/hunk_generator.rb#30 + # source://rspec-support//lib/rspec/support/hunk_generator.rb#32 def actual_lines; end - # source://rspec-support//lib/rspec/support/hunk_generator.rb#34 + # source://rspec-support//lib/rspec/support/hunk_generator.rb#36 def build_hunk(piece); end - # source://rspec-support//lib/rspec/support/hunk_generator.rb#42 + # source://rspec-support//lib/rspec/support/hunk_generator.rb#44 def context_lines; end - # source://rspec-support//lib/rspec/support/hunk_generator.rb#22 + # source://rspec-support//lib/rspec/support/hunk_generator.rb#24 def diffs; end - # source://rspec-support//lib/rspec/support/hunk_generator.rb#26 + # source://rspec-support//lib/rspec/support/hunk_generator.rb#28 def expected_lines; end end # @api private # -# source://rspec-support//lib/rspec/support.rb#38 +# source://rspec-support//lib/rspec/support.rb#40 RSpec::Support::KERNEL_METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) # Allows matchers to be used instead of providing keyword arguments. In @@ -578,11 +608,11 @@ RSpec::Support::KERNEL_METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) # # @private # -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#391 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#395 class RSpec::Support::LooseSignatureVerifier < ::RSpec::Support::MethodSignatureVerifier private - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#394 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#398 def split_args(*args); end end @@ -595,30 +625,30 @@ end # # @private # -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#411 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#415 class RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher # @return [SignatureWithKeywordArgumentsMatcher] a new instance of SignatureWithKeywordArgumentsMatcher # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#412 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#416 def initialize(signature); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#432 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#436 def has_kw_args_in?(args); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#420 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#424 def invalid_kw_args_from(_kw_args); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#416 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#420 def missing_kw_args_from(_kw_args); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#424 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#428 def non_kw_args_arity_description; end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#428 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#432 def valid_non_kw_args?(*args); end end @@ -627,22 +657,22 @@ end # # @private # -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#11 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#13 class RSpec::Support::MethodSignature # @return [MethodSignature] a new instance of MethodSignature # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#16 def initialize(method); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#96 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#98 def arbitrary_kw_args?; end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#36 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#38 def classify_arity(arity = T.unsafe(nil)); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#104 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#106 def classify_parameters; end # Without considering what the last arg is, could it @@ -650,10 +680,10 @@ class RSpec::Support::MethodSignature # # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#90 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#92 def could_contain_kw_args?(args); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#49 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#51 def description; end # If the last argument is Hash, Ruby will treat only symbol keys as keyword arguments @@ -661,42 +691,42 @@ class RSpec::Support::MethodSignature # # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#82 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#84 def has_kw_args_in?(args); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#75 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#77 def invalid_kw_args_from(given_kw_args); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 def max_non_kw_args; end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 def min_non_kw_args; end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#71 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#73 def missing_kw_args_from(given_kw_args); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#21 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#23 def non_kw_args_arity_description; end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 def optional_kw_args; end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 def required_kw_args; end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#100 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#102 def unlimited_args?; end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#29 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#31 def valid_non_kw_args?(positional_arg_count, optional_max_arg_count = T.unsafe(nil)); end end -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#160 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#162 RSpec::Support::MethodSignature::INFINITY = T.let(T.unsafe(nil), Float) # Encapsulates expectations about the number of arguments and @@ -704,70 +734,70 @@ RSpec::Support::MethodSignature::INFINITY = T.let(T.unsafe(nil), Float) # # @api private # -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#217 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#219 class RSpec::Support::MethodSignatureExpectation # @api private # @return [MethodSignatureExpectation] a new instance of MethodSignatureExpectation # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#218 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#220 def initialize; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#245 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#247 def empty?; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231 def expect_arbitrary_keywords; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231 def expect_arbitrary_keywords=(_arg0); end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231 def expect_unlimited_arguments; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231 def expect_unlimited_arguments=(_arg0); end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 def keywords; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#252 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#254 def keywords=(values); end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 def max_count; end # @api private # @raise [ArgumentError] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#233 def max_count=(number); end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 def min_count; end # @api private # @raise [ArgumentError] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#238 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#240 def min_count=(number); end end @@ -775,48 +805,48 @@ end # # @api private # -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#278 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#280 class RSpec::Support::MethodSignatureVerifier # @api private # @return [MethodSignatureVerifier] a new instance of MethodSignatureVerifier # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#283 def initialize(signature, args = T.unsafe(nil)); end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#324 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#326 def error_message; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281 def kw_args; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281 def max_non_kw_args; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281 def min_non_kw_args; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281 def non_kw_args; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#316 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#318 def valid?; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#288 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#290 def with_expectation(expectation); end private @@ -824,82 +854,82 @@ class RSpec::Support::MethodSignatureVerifier # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#355 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#357 def arbitrary_kw_args?; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#351 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#353 def invalid_kw_args; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#347 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#349 def missing_kw_args; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#363 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#365 def split_args(*args); end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#359 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#361 def unlimited_args?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#343 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#345 def valid_non_kw_args?; end end # On 1.9 and up, this is in core, so we just use the real one # -# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#63 +# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#67 class RSpec::Support::Mutex < ::Thread::Mutex class << self - # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#68 + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#70 def new; end end end # If you mock Mutex.new you break our usage of Mutex, so -# instead we capture the original method to return Mutexs. +# instead we capture the original method to return Mutexes. # -# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#66 +# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#68 RSpec::Support::Mutex::NEW_MUTEX_METHOD = T.let(T.unsafe(nil), Method) # Provides query methods for different OS or OS features. # # @api private # -# source://rspec-support//lib/rspec/support/ruby_features.rb#9 +# source://rspec-support//lib/rspec/support/ruby_features.rb#11 module RSpec::Support::OS private # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#12 + # source://rspec-support//lib/rspec/support/ruby_features.rb#14 def windows?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#16 + # source://rspec-support//lib/rspec/support/ruby_features.rb#18 def windows_file_path?; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#12 + # source://rspec-support//lib/rspec/support/ruby_features.rb#14 def windows?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#16 + # source://rspec-support//lib/rspec/support/ruby_features.rb#18 def windows_file_path?; end end end @@ -909,37 +939,37 @@ end # # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#8 +# source://rspec-support//lib/rspec/support/object_formatter.rb#10 class RSpec::Support::ObjectFormatter # @api private # @return [ObjectFormatter] a new instance of ObjectFormatter # - # source://rspec-support//lib/rspec/support/object_formatter.rb#27 + # source://rspec-support//lib/rspec/support/object_formatter.rb#29 def initialize(max_formatted_output_length = T.unsafe(nil)); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#32 + # source://rspec-support//lib/rspec/support/object_formatter.rb#34 def format(object); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#11 + # source://rspec-support//lib/rspec/support/object_formatter.rb#13 def max_formatted_output_length; end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#11 + # source://rspec-support//lib/rspec/support/object_formatter.rb#13 def max_formatted_output_length=(_arg0); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#68 + # source://rspec-support//lib/rspec/support/object_formatter.rb#70 def prepare_array(array); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#92 + # source://rspec-support//lib/rspec/support/object_formatter.rb#94 def prepare_element(element); end # Prepares the provided object to be formatted by wrapping it as needed @@ -954,28 +984,28 @@ class RSpec::Support::ObjectFormatter # # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#56 + # source://rspec-support//lib/rspec/support/object_formatter.rb#58 def prepare_for_inspection(object); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#74 + # source://rspec-support//lib/rspec/support/object_formatter.rb#76 def prepare_hash(input_hash); end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#111 + # source://rspec-support//lib/rspec/support/object_formatter.rb#113 def recursive_structure?(object); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#84 + # source://rspec-support//lib/rspec/support/object_formatter.rb#86 def sort_hash_keys(input_hash); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#104 + # source://rspec-support//lib/rspec/support/object_formatter.rb#106 def with_entering_structure(structure); end private @@ -987,7 +1017,7 @@ class RSpec::Support::ObjectFormatter # # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#266 + # source://rspec-support//lib/rspec/support/object_formatter.rb#268 def truncate_string(str, start_index, end_index); end class << self @@ -996,24 +1026,24 @@ class RSpec::Support::ObjectFormatter # # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#15 + # source://rspec-support//lib/rspec/support/object_formatter.rb#17 def default_instance; end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#19 + # source://rspec-support//lib/rspec/support/object_formatter.rb#21 def format(object); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#23 + # source://rspec-support//lib/rspec/support/object_formatter.rb#25 def prepare_for_inspection(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#125 +# source://rspec-support//lib/rspec/support/object_formatter.rb#127 class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct # Returns the value of attribute formatter # @@ -1029,7 +1059,7 @@ class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct # @api private # @raise [NotImplementedError] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#130 + # source://rspec-support//lib/rspec/support/object_formatter.rb#132 def inspect; end # Returns the value of attribute object @@ -1045,7 +1075,7 @@ class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#134 + # source://rspec-support//lib/rspec/support/object_formatter.rb#136 def pretty_print(pp); end class << self @@ -1055,7 +1085,7 @@ class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct # @raise [NotImplementedError] # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#126 + # source://rspec-support//lib/rspec/support/object_formatter.rb#128 def can_inspect?(_object); end def inspect; end @@ -1067,106 +1097,106 @@ end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#175 +# source://rspec-support//lib/rspec/support/object_formatter.rb#177 class RSpec::Support::ObjectFormatter::BigDecimalInspector < ::RSpec::Support::ObjectFormatter::BaseInspector # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#180 + # source://rspec-support//lib/rspec/support/object_formatter.rb#182 def inspect; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#176 + # source://rspec-support//lib/rspec/support/object_formatter.rb#178 def can_inspect?(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#157 +# source://rspec-support//lib/rspec/support/object_formatter.rb#159 class RSpec::Support::ObjectFormatter::DateTimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector # ActiveSupport sometimes overrides inspect. If `ActiveSupport` is # defined use a custom format string that includes more time precision. # # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#166 + # source://rspec-support//lib/rspec/support/object_formatter.rb#168 def inspect; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#160 + # source://rspec-support//lib/rspec/support/object_formatter.rb#162 def can_inspect?(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#158 +# source://rspec-support//lib/rspec/support/object_formatter.rb#160 RSpec::Support::ObjectFormatter::DateTimeInspector::FORMAT = T.let(T.unsafe(nil), String) # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#222 +# source://rspec-support//lib/rspec/support/object_formatter.rb#224 class RSpec::Support::ObjectFormatter::DelegatorInspector < ::RSpec::Support::ObjectFormatter::BaseInspector # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#227 + # source://rspec-support//lib/rspec/support/object_formatter.rb#229 def inspect; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#223 + # source://rspec-support//lib/rspec/support/object_formatter.rb#225 def can_inspect?(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#185 +# source://rspec-support//lib/rspec/support/object_formatter.rb#187 class RSpec::Support::ObjectFormatter::DescribableMatcherInspector < ::RSpec::Support::ObjectFormatter::BaseInspector # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#190 + # source://rspec-support//lib/rspec/support/object_formatter.rb#192 def inspect; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#186 + # source://rspec-support//lib/rspec/support/object_formatter.rb#188 def can_inspect?(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#9 +# source://rspec-support//lib/rspec/support/object_formatter.rb#11 RSpec::Support::ObjectFormatter::ELLIPSIS = T.let(T.unsafe(nil), String) # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#245 +# source://rspec-support//lib/rspec/support/object_formatter.rb#247 RSpec::Support::ObjectFormatter::INSPECTOR_CLASSES = T.let(T.unsafe(nil), Array) # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#115 +# source://rspec-support//lib/rspec/support/object_formatter.rb#117 class RSpec::Support::ObjectFormatter::InspectableItem < ::Struct # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#116 + # source://rspec-support//lib/rspec/support/object_formatter.rb#118 def inspect; end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#120 + # source://rspec-support//lib/rspec/support/object_formatter.rb#122 def pretty_print(pp); end # Returns the value of attribute text @@ -1191,109 +1221,109 @@ end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#232 +# source://rspec-support//lib/rspec/support/object_formatter.rb#234 class RSpec::Support::ObjectFormatter::InspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#240 + # source://rspec-support//lib/rspec/support/object_formatter.rb#242 def inspect; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#233 + # source://rspec-support//lib/rspec/support/object_formatter.rb#235 def can_inspect?(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#139 +# source://rspec-support//lib/rspec/support/object_formatter.rb#141 class RSpec::Support::ObjectFormatter::TimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector # for 1.8.7 # # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#147 + # source://rspec-support//lib/rspec/support/object_formatter.rb#149 def inspect; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#142 + # source://rspec-support//lib/rspec/support/object_formatter.rb#144 def can_inspect?(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#140 +# source://rspec-support//lib/rspec/support/object_formatter.rb#142 RSpec::Support::ObjectFormatter::TimeInspector::FORMAT = T.let(T.unsafe(nil), String) # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#195 +# source://rspec-support//lib/rspec/support/object_formatter.rb#197 class RSpec::Support::ObjectFormatter::UninspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#205 + # source://rspec-support//lib/rspec/support/object_formatter.rb#207 def inspect; end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#209 + # source://rspec-support//lib/rspec/support/object_formatter.rb#211 def klass; end # http://stackoverflow.com/a/2818916 # # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#214 + # source://rspec-support//lib/rspec/support/object_formatter.rb#216 def native_object_id; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#198 + # source://rspec-support//lib/rspec/support/object_formatter.rb#200 def can_inspect?(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#196 +# source://rspec-support//lib/rspec/support/object_formatter.rb#198 RSpec::Support::ObjectFormatter::UninspectableObjectInspector::OBJECT_ID_FORMAT = T.let(T.unsafe(nil), String) # Provides recursive constant lookup methods useful for # constant stubbing. # -# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#5 +# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#7 module RSpec::Support::RecursiveConstMethods # @return [Boolean] # - # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#43 + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#45 def const_defined_on?(mod, const_name); end - # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#51 + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#53 def constants_defined_on(mod); end # @raise [NameError] # - # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#47 + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#49 def get_const_defined_on(mod, const_name); end - # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#71 + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#73 def normalize_const_name(const_name); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#62 + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#64 def recursive_const_defined?(const_name); end - # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#56 + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#58 def recursive_const_get(const_name); end end @@ -1309,22 +1339,22 @@ end # # @private # -# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#14 +# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#16 class RSpec::Support::ReentrantMutex # @return [ReentrantMutex] a new instance of ReentrantMutex # - # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#15 + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#17 def initialize; end - # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#21 + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#23 def synchronize; end private - # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#33 + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#35 def enter; end - # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#38 + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#40 def exit; end end @@ -1332,85 +1362,85 @@ end # # @api private # -# source://rspec-support//lib/rspec/support/ruby_features.rb#24 +# source://rspec-support//lib/rspec/support/ruby_features.rb#26 module RSpec::Support::Ruby private # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#27 + # source://rspec-support//lib/rspec/support/ruby_features.rb#29 def jruby?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#35 + # source://rspec-support//lib/rspec/support/ruby_features.rb#37 def jruby_9000?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#31 + # source://rspec-support//lib/rspec/support/ruby_features.rb#33 def jruby_version; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#47 + # source://rspec-support//lib/rspec/support/ruby_features.rb#49 def mri?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#43 + # source://rspec-support//lib/rspec/support/ruby_features.rb#45 def non_mri?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#39 + # source://rspec-support//lib/rspec/support/ruby_features.rb#41 def rbx?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#51 + # source://rspec-support//lib/rspec/support/ruby_features.rb#53 def truffleruby?; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#27 + # source://rspec-support//lib/rspec/support/ruby_features.rb#29 def jruby?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#35 + # source://rspec-support//lib/rspec/support/ruby_features.rb#37 def jruby_9000?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#31 + # source://rspec-support//lib/rspec/support/ruby_features.rb#33 def jruby_version; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#47 + # source://rspec-support//lib/rspec/support/ruby_features.rb#49 def mri?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#43 + # source://rspec-support//lib/rspec/support/ruby_features.rb#45 def non_mri?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#39 + # source://rspec-support//lib/rspec/support/ruby_features.rb#41 def rbx?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#51 + # source://rspec-support//lib/rspec/support/ruby_features.rb#53 def truffleruby?; end end end @@ -1420,18 +1450,18 @@ end # # @api private # -# source://rspec-support//lib/rspec/support/ruby_features.rb#60 +# source://rspec-support//lib/rspec/support/ruby_features.rb#62 module RSpec::Support::RubyFeatures private # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#83 + # source://rspec-support//lib/rspec/support/ruby_features.rb#85 def caller_locations_supported?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#132 + # source://rspec-support//lib/rspec/support/ruby_features.rb#155 def distincts_kw_args_from_positional_hash?; end # On JRuby 1.7 `--1.8` mode, `Process.respond_to?(:fork)` returns true, @@ -1444,131 +1474,151 @@ module RSpec::Support::RubyFeatures # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#74 + # source://rspec-support//lib/rspec/support/ruby_features.rb#76 def fork_supported?; end + # https://rubyreferences.github.io/rubychanges/3.0.html#keyword-arguments-are-now-fully-separated-from-positional-arguments + # + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#111 + def kw_arg_separation?; end + # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#137 + # source://rspec-support//lib/rspec/support/ruby_features.rb#160 def kw_args_supported?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#193 + # source://rspec-support//lib/rspec/support/ruby_features.rb#216 def module_prepends_supported?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#189 + # source://rspec-support//lib/rspec/support/ruby_features.rb#212 def module_refinement_supported?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#79 + # source://rspec-support//lib/rspec/support/ruby_features.rb#81 def optional_and_splat_args_supported?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#141 + # source://rspec-support//lib/rspec/support/ruby_features.rb#164 def required_kw_args_supported?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#123 + # source://rspec-support//lib/rspec/support/ruby_features.rb#146 def ripper_supported?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#88 + # source://rspec-support//lib/rspec/support/ruby_features.rb#90 def supports_exception_cause?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#145 + # source://rspec-support//lib/rspec/support/ruby_features.rb#168 def supports_rebinding_module_methods?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#98 + # source://rspec-support//lib/rspec/support/ruby_features.rb#104 + def supports_syntax_suggest?; end + + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#121 def supports_taint?; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#83 + # source://rspec-support//lib/rspec/support/ruby_features.rb#85 def caller_locations_supported?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#132 + # source://rspec-support//lib/rspec/support/ruby_features.rb#155 def distincts_kw_args_from_positional_hash?; end - # source://rspec-support//lib/rspec/support/ruby_features.rb#74 + # source://rspec-support//lib/rspec/support/ruby_features.rb#76 def fork_supported?; end - # source://rspec-support//lib/rspec/support/ruby_features.rb#137 + # source://rspec-support//lib/rspec/support/ruby_features.rb#111 + def kw_arg_separation?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#160 def kw_args_supported?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#193 + # source://rspec-support//lib/rspec/support/ruby_features.rb#216 def module_prepends_supported?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#189 + # source://rspec-support//lib/rspec/support/ruby_features.rb#212 def module_refinement_supported?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#79 + # source://rspec-support//lib/rspec/support/ruby_features.rb#81 def optional_and_splat_args_supported?; end - # source://rspec-support//lib/rspec/support/ruby_features.rb#141 + # source://rspec-support//lib/rspec/support/ruby_features.rb#164 def required_kw_args_supported?; end - # source://rspec-support//lib/rspec/support/ruby_features.rb#123 + # source://rspec-support//lib/rspec/support/ruby_features.rb#146 def ripper_supported?; end - # source://rspec-support//lib/rspec/support/ruby_features.rb#88 + # source://rspec-support//lib/rspec/support/ruby_features.rb#90 def supports_exception_cause?; end - # source://rspec-support//lib/rspec/support/ruby_features.rb#145 + # source://rspec-support//lib/rspec/support/ruby_features.rb#168 def supports_rebinding_module_methods?; end - # source://rspec-support//lib/rspec/support/ruby_features.rb#98 + # source://rspec-support//lib/rspec/support/ruby_features.rb#104 + def supports_syntax_suggest?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#121 def supports_taint?; end end end -# Figures out wether a given method can accept various arguments. +# Figures out whether a given method can accept various arguments. # Surprisingly non-trivial. # # @private # -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#385 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#389 RSpec::Support::StrictSignatureVerifier = RSpec::Support::MethodSignatureVerifier -# source://rspec-support//lib/rspec/support/version.rb#3 +# source://rspec-support//lib/rspec/support/version.rb#5 module RSpec::Support::Version; end -# source://rspec-support//lib/rspec/support/version.rb#4 +# source://rspec-support//lib/rspec/support/version.rb#6 RSpec::Support::Version::STRING = T.let(T.unsafe(nil), String) -# source://rspec-support//lib/rspec/support/warnings.rb#6 +# source://rspec-support//lib/rspec/support/warnings.rb#8 module RSpec::Support::Warnings - # source://rspec-support//lib/rspec/support/warnings.rb#7 + # source://rspec-support//lib/rspec/support/warnings.rb#9 def deprecate(deprecated, options = T.unsafe(nil)); end # Used internally to print deprecation warnings @@ -1576,36 +1626,36 @@ module RSpec::Support::Warnings # # @private # - # source://rspec-support//lib/rspec/support/warnings.rb#15 + # source://rspec-support//lib/rspec/support/warnings.rb#17 def warn_deprecation(message, options = T.unsafe(nil)); end # Used internally to print longer warnings # # @private # - # source://rspec-support//lib/rspec/support/warnings.rb#29 + # source://rspec-support//lib/rspec/support/warnings.rb#31 def warn_with(message, options = T.unsafe(nil)); end # Used internally to print warnings # # @private # - # source://rspec-support//lib/rspec/support/warnings.rb#22 + # source://rspec-support//lib/rspec/support/warnings.rb#24 def warning(text, options = T.unsafe(nil)); end end -# source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#5 +# source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#7 module RSpec::Support::WithKeywordsWhenNeeded private # Remove this in RSpec 4 in favour of explicitly passed in kwargs where # this is used. Works around a warning in Ruby 2.7 # - # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#15 + # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#17 def class_exec(klass, *args, **_arg2, &block); end class << self - # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#15 + # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#17 def class_exec(klass, *args, **_arg2, &block); end end end diff --git a/sorbet/rbi/gems/rspec@3.12.0.rbi b/sorbet/rbi/gems/rspec@3.13.0.rbi similarity index 51% rename from sorbet/rbi/gems/rspec@3.12.0.rbi rename to sorbet/rbi/gems/rspec@3.13.0.rbi index 851ab775..d5f82b03 100644 --- a/sorbet/rbi/gems/rspec@3.12.0.rbi +++ b/sorbet/rbi/gems/rspec@3.13.0.rbi @@ -7,70 +7,70 @@ # source://rspec//lib/rspec/version.rb#1 module RSpec class << self - # source://rspec-core/3.12.0/lib/rspec/core.rb#70 + # source://rspec-core/3.13.0/lib/rspec/core.rb#70 def clear_examples; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#85 + # source://rspec-core/3.13.0/lib/rspec/core.rb#85 def configuration; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def configuration=(_arg0); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#97 + # source://rspec-core/3.13.0/lib/rspec/core.rb#97 def configure; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#194 + # source://rspec-core/3.13.0/lib/rspec/core.rb#194 def const_missing(name); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def context(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#122 + # source://rspec-core/3.13.0/lib/rspec/core.rb#122 def current_example; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#128 + # source://rspec-core/3.13.0/lib/rspec/core.rb#128 def current_example=(example); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#154 + # source://rspec-core/3.13.0/lib/rspec/core.rb#154 def current_scope; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#134 + # source://rspec-core/3.13.0/lib/rspec/core.rb#134 def current_scope=(scope); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def describe(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def example_group(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fcontext(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fdescribe(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#58 + # source://rspec-core/3.13.0/lib/rspec/core.rb#58 def reset; end - # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_context(name, *args, &block); end - # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples(name, *args, &block); end - # source://rspec-core/3.12.0/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples_for(name, *args, &block); end - # source://rspec-core/3.12.0/lib/rspec/core.rb#160 + # source://rspec-core/3.13.0/lib/rspec/core.rb#160 def world; end - # source://rspec-core/3.12.0/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def world=(_arg0); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xcontext(*args, &example_group_block); end - # source://rspec-core/3.12.0/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xdescribe(*args, &example_group_block); end end end diff --git a/sorbet/rbi/gems/rubocop-ast@1.28.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi similarity index 94% rename from sorbet/rbi/gems/rubocop-ast@1.28.0.rbi rename to sorbet/rbi/gems/rubocop-ast@1.30.0.rbi index 851e4bea..24d5bf30 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.28.0.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi @@ -22,7 +22,7 @@ end # node when the builder constructs the AST, making its methods available # to all `alias` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/alias_node.rb#11 class RuboCop::AST::AliasNode < ::RuboCop::AST::Node # Returns the new identifier as specified by the `alias`. # @@ -43,7 +43,7 @@ end # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/and_asgn_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/and_asgn_node.rb#11 class RuboCop::AST::AndAsgnNode < ::RuboCop::AST::OpAsgnNode # The operator being used for assignment as a symbol. # @@ -84,7 +84,7 @@ end # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all `arg` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#9 +# source://rubocop-ast//lib/rubocop/ast/node/arg_node.rb#12 class RuboCop::AST::ArgNode < ::RuboCop::AST::Node # Checks whether the argument has a default value # @@ -198,7 +198,7 @@ RuboCop::AST::ArrayNode::PERCENT_LITERAL_TYPES = T.let(T.unsafe(nil), Hash) # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/asgn_node.rb#11 class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node # The expression being assigned to the variable. # @@ -275,7 +275,7 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node # # @return [Array<Node>] # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#42 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#60 def argument_list; end # The arguments of this block. @@ -285,63 +285,81 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node # # @return [Array<Node>] # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#30 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#48 def arguments; end # Checks whether this block takes any arguments. # # @return [Boolean] whether this `block` node takes any arguments # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#67 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#85 def arguments?; end # The body of this block. # # @return [Node, nil] the body of the `block` node or `nil` # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#53 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#71 def body; end # Checks whether the `block` literal is delimited by curly braces. # # @return [Boolean] whether the `block` literal is enclosed in braces # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#74 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#92 def braces?; end # The closing delimiter for this `block` literal. # # @return [String] the closing delimiter for the `block` literal # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#102 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#120 def closing_delimiter; end # The delimiters for this `block` literal. # # @return [Array<String>] the delimiters for the `block` literal # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#88 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#106 def delimiters; end + # A shorthand for getting the first argument of this block. + # Equivalent to `arguments.first`. + # + # @return [Node, nil] the first argument of this block, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#29 + def first_argument; end + # Checks whether the `block` literal is delimited by `do`-`end` keywords. # # @return [Boolean] whether the `block` literal is enclosed in `do`-`end` # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#81 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#99 def keywords?; end # Checks whether this `block` literal belongs to a lambda. # # @return [Boolean] whether the `block` literal belongs to a lambda # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#125 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#143 def lambda?; end + # A shorthand for getting the last argument of this block. + # Equivalent to `arguments.last`. + # + # @return [Node, nil] the last argument of this block, + # or `nil` if there are no arguments + # + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#38 + def last_argument; end + # The name of the dispatched method as a symbol. # # @return [Symbol] the name of the dispatched method # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#60 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#78 def method_name; end # Checks whether this is a multiline block. This is overridden here @@ -349,14 +367,14 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node # # @return [Boolean] whether the `block` literal is on a several lines # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#118 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#136 def multiline?; end # The opening delimiter for this `block` literal. # # @return [String] the opening delimiter for the `block` literal # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#95 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#113 def opening_delimiter; end # The `send` node associated with this block. @@ -371,21 +389,21 @@ class RuboCop::AST::BlockNode < ::RuboCop::AST::Node # # @return [Boolean] whether the `block` literal is on a single line # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#110 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#128 def single_line?; end # Checks whether this node body is a void context. # # @return [Boolean] whether the `block` node body is a void context # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#150 def void_context?; end private # Numbered arguments of this `numblock`. # - # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#139 + # source://rubocop-ast//lib/rubocop/ast/node/block_node.rb#157 def numbered_arguments; end end @@ -549,7 +567,7 @@ end # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/casgn_node.rb#11 class RuboCop::AST::CasgnNode < ::RuboCop::AST::Node # The expression being assigned to the variable. # @@ -577,7 +595,7 @@ end # node when the builder constructs the AST, making its methods available # to all `class` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/class_node.rb#11 class RuboCop::AST::ClassNode < ::RuboCop::AST::Node # The body of this `class` node. # @@ -607,409 +625,409 @@ end module RuboCop::AST::CollectionNode extend ::Forwardable - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def &(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def *(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def +(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def -(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def <<(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def [](*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def []=(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def all?(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def any?(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def append(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def assoc(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def at(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def bsearch(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def bsearch_index(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def chain(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def chunk(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def chunk_while(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def clear(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def collect(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def collect!(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def collect_concat(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def combination(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def compact(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def compact!(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def concat(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def count(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def cycle(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def deconstruct(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def delete(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def delete_at(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def delete_if(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def detect(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def difference(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def dig(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def drop(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def drop_while(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def each(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def each_cons(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def each_entry(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def each_index(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def each_slice(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def each_with_index(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def each_with_object(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def empty?(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def entries(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def fetch(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def fill(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def filter(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def filter!(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def filter_map(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def find(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def find_all(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def find_index(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def first(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def flat_map(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def flatten(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def flatten!(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def grep(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def grep_v(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def group_by(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def include?(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def index(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def inject(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def insert(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def intersect?(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def intersection(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def join(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def keep_if(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def last(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def lazy(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def length(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def map(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def map!(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def max(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def max_by(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def member?(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def min(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def min_by(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def minmax(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def minmax_by(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def none?(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def one?(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def pack(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def partition(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def permutation(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def place(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def pop(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def prepend(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def product(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def push(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def rassoc(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def reduce(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def reject(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def reject!(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def repeated_combination(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def repeated_permutation(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def replace(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def reverse(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def reverse!(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def reverse_each(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def rindex(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def rotate(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def rotate!(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def sample(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def select(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def select!(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def shelljoin(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def shift(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def shuffle(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def shuffle!(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def size(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def slice(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def slice!(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def slice_after(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def slice_before(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def slice_when(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def sort(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def sort!(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def sort_by(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def sort_by!(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def sum(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def take(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def take_while(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def tally(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def to_ary(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def to_h(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def to_set(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def transpose(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def union(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def uniq(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def uniq!(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def unshift(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def values_at(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def zip(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def |(*args, **_arg1, &block); end end @@ -1059,7 +1077,7 @@ end # A node extension for `const` nodes. # -# source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#6 +# source://rubocop-ast//lib/rubocop/ast/node/const_node.rb#7 class RuboCop::AST::ConstNode < ::RuboCop::AST::Node # @return [Boolean] if the constant starts with `::` (aka s(:cbase)) # @@ -1284,7 +1302,7 @@ end # node when the builder constructs the AST, making its methods available # to all `ensure` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#11 class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node # Returns the body of the `ensure` clause. # @@ -1338,7 +1356,7 @@ end # node when the builder constructs the AST, making its methods available # to all `for` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/for_node.rb#11 class RuboCop::AST::ForNode < ::RuboCop::AST::Node # Returns the body of the `for` loop. # @@ -1521,7 +1539,7 @@ end # node when the builder constructs the AST, making its methods available # to all `hash` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/hash_node.rb#14 class RuboCop::AST::HashNode < ::RuboCop::AST::Node # Checks whether the `hash` literal is delimited by curly braces. # @@ -1716,7 +1734,7 @@ class RuboCop::AST::IfNode < ::RuboCop::AST::Node # source://rubocop-ast//lib/rubocop/ast/node/if_node.rb#80 def modifier_form?; end - # Chacks whether the `if` node has nested `if` nodes in any of its + # Checks whether the `if` node has nested `if` nodes in any of its # branches. # # @note This performs a shallow search. @@ -1753,7 +1771,7 @@ end # node when the builder constructs the AST, making its methods available # to all `in` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/in_pattern_node.rb#11 class RuboCop::AST::InPatternNode < ::RuboCop::AST::Node # Returns the body of the `in` node. # @@ -2033,10 +2051,10 @@ module RuboCop::AST::MethodDispatchNode # # @return [Boolean] whether the dispatched method is an access modifier # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#53 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#64 def access_modifier?; end - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#262 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#273 def adjacent_def_modifier?(param0 = T.unsafe(nil)); end # Checks whether this node is an arithmetic operation @@ -2044,14 +2062,14 @@ module RuboCop::AST::MethodDispatchNode # @return [Boolean] whether the dispatched method is an arithmetic # operation # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#164 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#175 def arithmetic_operation?; end # Checks whether the dispatched method is a setter method. # # @return [Boolean] whether the dispatched method is a setter # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#96 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#107 def assignment?; end # Checks whether the dispatched method is a bare access modifier that @@ -2060,10 +2078,10 @@ module RuboCop::AST::MethodDispatchNode # @return [Boolean] whether the dispatched method is a bare # access modifier # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#62 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#73 def bare_access_modifier?; end - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#267 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#278 def bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end # Checks whether this is a binary operation. @@ -2073,14 +2091,14 @@ module RuboCop::AST::MethodDispatchNode # foo + bar # @return [Boolean] whether this method is a binary operation # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#237 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#248 def binary_operation?; end # Whether this method dispatch has an explicit block. # # @return [Boolean] whether the dispatched method has a block # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#156 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#167 def block_literal?; end # The `block` or `numblock` node associated with this method dispatch, if any. @@ -2088,7 +2106,7 @@ module RuboCop::AST::MethodDispatchNode # @return [BlockNode, nil] the `block` or `numblock` node associated with this method # call or `nil` # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#35 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#46 def block_node; end # Checks whether the name of the dispatched method matches the argument @@ -2097,7 +2115,7 @@ module RuboCop::AST::MethodDispatchNode # @param name [Symbol, String] the method name to check for # @return [Boolean] whether the method name matches the argument # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#89 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#100 def command?(name); end # Checks whether the *explicit* receiver of this method dispatch is a @@ -2106,7 +2124,7 @@ module RuboCop::AST::MethodDispatchNode # @return [Boolean] whether the receiver of this method dispatch # is a `const` node # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#141 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#152 def const_receiver?; end # Checks if this node is part of a chain of `def` or `defs` modifiers. @@ -2118,7 +2136,7 @@ module RuboCop::AST::MethodDispatchNode # private def foo; end # @return [Node | nil] returns the `def|defs` node this is a modifier for, # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#188 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#199 def def_modifier(node = T.unsafe(nil)); end # Checks if this node is part of a chain of `def` or `defs` modifiers. @@ -2130,7 +2148,7 @@ module RuboCop::AST::MethodDispatchNode # private def foo; end # @return [Boolean] whether the `def|defs` node is a modifier or not. # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#176 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#187 def def_modifier?(node = T.unsafe(nil)); end # Checks whether the dispatched method uses a dot to connect the @@ -2141,7 +2159,7 @@ module RuboCop::AST::MethodDispatchNode # # @return [Boolean] whether the method was called with a connecting dot # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#108 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#119 def dot?; end # Checks whether the dispatched method uses a double colon to connect the @@ -2149,7 +2167,7 @@ module RuboCop::AST::MethodDispatchNode # # @return [Boolean] whether the method was called with a connecting dot # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#116 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#127 def double_colon?; end # Checks whether the method dispatch is the implicit form of `#call`, @@ -2157,10 +2175,10 @@ module RuboCop::AST::MethodDispatchNode # # @return [Boolean] whether the method is the implicit form of `#call` # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#149 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#160 def implicit_call?; end - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#246 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#257 def in_macro_scope?(param0 = T.unsafe(nil)); end # Checks whether this is a lambda. Some versions of parser parses @@ -2168,7 +2186,7 @@ module RuboCop::AST::MethodDispatchNode # # @return [Boolean] whether this method is a lambda # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#202 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#213 def lambda?; end # Checks whether this is a lambda literal (stabby lambda.) @@ -2178,7 +2196,7 @@ module RuboCop::AST::MethodDispatchNode # -> (foo) { bar } # @return [Boolean] whether this method is a lambda literal # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#213 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#224 def lambda_literal?; end # Checks whether the dispatched method is a macro method. A macro method @@ -2188,7 +2206,7 @@ module RuboCop::AST::MethodDispatchNode # @note This does not include DSLs that use nested blocks, like RSpec # @return [Boolean] whether the dispatched method is a macro method # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#46 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#57 def macro?; end # The name of the dispatched method as a symbol. @@ -2204,10 +2222,10 @@ module RuboCop::AST::MethodDispatchNode # @return [Boolean] whether the dispatched method is a non-bare # access modifier # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#71 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#82 def non_bare_access_modifier?; end - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#272 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#283 def non_bare_access_modifier_declaration?(param0 = T.unsafe(nil)); end # The receiving node of the method dispatch. @@ -2222,22 +2240,29 @@ module RuboCop::AST::MethodDispatchNode # # @return [Boolean] whether the method was called with a connecting dot # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#124 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#135 def safe_navigation?; end + # The source range for the method name or keyword that dispatches this call. + # + # @return [Parser::Source::Range] the source range for the method name or keyword + # + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#34 + def selector; end + # Checks whether the *explicit* receiver of this method dispatch is # `self`. # # @return [Boolean] whether the receiver of this method dispatch is `self` # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#132 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#143 def self_receiver?; end # Checks whether the dispatched method is a setter method. # # @return [Boolean] whether the dispatched method is a setter # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#96 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#107 def setter_method?; end # Checks whether the dispatched method is a bare `private` or `protected` @@ -2246,7 +2271,7 @@ module RuboCop::AST::MethodDispatchNode # @return [Boolean] whether the dispatched method is a bare # `private` or `protected` access modifier # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#80 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#91 def special_modifier?; end # Checks whether this is a unary operation. @@ -2256,7 +2281,7 @@ module RuboCop::AST::MethodDispatchNode # -foo # @return [Boolean] whether this method is a unary operation # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#224 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/method_dispatch_node.rb#235 def unary_operation?; end end @@ -2463,7 +2488,7 @@ end # plain node when the builder constructs the AST, making its methods # available to all `module` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/module_node.rb#11 class RuboCop::AST::ModuleNode < ::RuboCop::AST::Node # The body of this `module` node. # @@ -3502,7 +3527,7 @@ class RuboCop::AST::NodePattern # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 def ast; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def captures(*args, **_arg1, &block); end # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#111 @@ -3531,7 +3556,7 @@ class RuboCop::AST::NodePattern # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 def match_code; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def named_parameters(*args, **_arg1, &block); end # Returns the value of attribute pattern. @@ -3539,7 +3564,7 @@ class RuboCop::AST::NodePattern # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 def pattern; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def positional_parameters(*args, **_arg1, &block); end # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#95 @@ -3652,7 +3677,7 @@ class RuboCop::AST::NodePattern::Compiler # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#15 def initialize; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def bind(*args, **_arg1, &block); end # Returns the value of attribute binding. @@ -3789,14 +3814,14 @@ end # Variant of the Compiler with tracing information for nodes # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#10 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#12 class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern::Compiler # @return [Debug] a new instance of Debug # # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#123 def initialize; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def comments(*args, **_arg1, &block); end # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#128 @@ -3810,7 +3835,7 @@ class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern:: # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#132 def parser; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def tokens(*args, **_arg1, &block); end end @@ -4165,9 +4190,6 @@ class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST: private - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/subcompiler.rb#20 - def compile(node); end - # Compilation helpers # # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#165 @@ -4677,9 +4699,9 @@ RuboCop::AST::NodePattern::Node::AnyOrder::ARITIES = T.let(T.unsafe(nil), Hash) # Node class for `$something` # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#97 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#98 class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def arity(*args, **_arg1, &block); end # @return [Boolean] @@ -4693,7 +4715,7 @@ class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::No # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#105 def nb_captures; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def rest?(*args, **_arg1, &block); end end @@ -4807,7 +4829,7 @@ end # Doc on how this fits in the compiling process: # /docs/modules/ROOT/pages/node_pattern.adoc # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#12 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#13 class RuboCop::AST::NodePattern::Parser < ::Racc::Parser extend ::Forwardable @@ -4816,140 +4838,140 @@ class RuboCop::AST::NodePattern::Parser < ::Racc::Parser # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#19 def initialize(builder = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#333 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#335 def _reduce_10(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#337 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#339 def _reduce_11(val, _values); end # reduce 12 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#343 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#345 def _reduce_13(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#347 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#349 def _reduce_14(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#351 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#353 def _reduce_15(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#355 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#357 def _reduce_16(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#359 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#361 def _reduce_17(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#363 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#365 def _reduce_18(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#367 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#369 def _reduce_19(val, _values); end # reduce 1 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#301 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#303 def _reduce_2(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#371 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#373 def _reduce_20(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#375 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#377 def _reduce_21(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#379 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#381 def _reduce_22(val, _values); end # reduce 24 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#387 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#389 def _reduce_25(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#393 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#395 def _reduce_26(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#305 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#307 def _reduce_3(val, _values); end # reduce 32 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#413 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#415 def _reduce_33(val, _values); end # reduce 36 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#423 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#425 def _reduce_37(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#427 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#429 def _reduce_38(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#431 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#433 def _reduce_39(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#309 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#311 def _reduce_4(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#435 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#437 def _reduce_40(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#439 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#441 def _reduce_41(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#443 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#445 def _reduce_42(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#447 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#449 def _reduce_43(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#451 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#453 def _reduce_44(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#455 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#457 def _reduce_45(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#459 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#461 def _reduce_46(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#313 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#315 def _reduce_5(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#317 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#319 def _reduce_6(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#321 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#323 def _reduce_7(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#325 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#327 def _reduce_8(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#329 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#331 def _reduce_9(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#463 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#465 def _reduce_none(val, _values); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def emit_atom(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def emit_call(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def emit_capture(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def emit_list(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def emit_unary_op(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def emit_union(*args, **_arg1, &block); end # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#40 def inspect; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def next_token(*args, **_arg1, &block); end # (Similar API to `parser` gem) @@ -4985,15 +5007,15 @@ RuboCop::AST::NodePattern::Parser::Lexer = RuboCop::AST::NodePattern::Lexer # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#227 RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#293 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#295 RuboCop::AST::NodePattern::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#243 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#244 RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) # Overrides Parser to use `WithMeta` variants and provide additional methods # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/with_meta.rb#9 class RuboCop::AST::NodePattern::Parser::WithMeta < ::RuboCop::AST::NodePattern::Parser # Returns the value of attribute comments. # @@ -5109,6 +5131,9 @@ RuboCop::AST::NodePattern::Sets::SET_ABSTRACT_OVERRIDE_OVERRIDABLE_ETC = T.let(T # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ALL_ANY_CLASS_OF_ETC = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_ALL_CONTEXT = T.let(T.unsafe(nil), Set) @@ -5116,10 +5141,10 @@ RuboCop::AST::NodePattern::Sets::SET_ALL_CONTEXT = T.let(T.unsafe(nil), Set) RuboCop::AST::NodePattern::Sets::SET_AND_RETURN_AND_RAISE_AND_THROW_ETC = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ANY_ALL_NORETURN_ETC = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY_NONE_ETC = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_ASSERT_EQUAL_REFUTE_EQUAL = T.let(T.unsafe(nil), Set) @@ -5133,9 +5158,6 @@ RuboCop::AST::NodePattern::Sets::SET_ATTR_READER_ATTR_WRITER_ATTR_ACCESSOR_ATTR # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_BACKGROUND_SCENARIO_XSCENARIO_ETC = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_BEFORE_AFTER = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_BE_EQ_EQL_EQUAL = T.let(T.unsafe(nil), Set) @@ -5187,6 +5209,9 @@ RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_CONTEXT_FEATURE_ETC = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_DOUBLE_SPY = T.let(T.unsafe(nil), Set) @@ -5223,6 +5248,9 @@ RuboCop::AST::NodePattern::Sets::SET_EXPECT_ALLOW = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_FACTORYGIRL_FACTORYBOT = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FACTORY_TRAIT = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_FILETEST_FILE_DIR_SHELL = T.let(T.unsafe(nil), Set) @@ -5232,6 +5260,9 @@ RuboCop::AST::NodePattern::Sets::SET_FILE_DIR = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_FILE_FILETEST = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FILE_TEMPFILE = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_FILE_TEMPFILE_STRINGIO = T.let(T.unsafe(nil), Set) @@ -5295,6 +5326,9 @@ RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_MATCH_MATCH = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_MATCH_MATCH_ = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_MATCH__MATCH = T.let(T.unsafe(nil), Set) @@ -5323,7 +5357,7 @@ RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let RuboCop::AST::NodePattern::Sets::SET_PRESENT_ANY_BLANK_EMPTY = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PRIVATE_CLASS_METHOD = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PUBLIC = T.let(T.unsafe(nil), Set) @@ -5368,11 +5402,14 @@ RuboCop::AST::NodePattern::Sets::SET_RECEIVE_RECEIVE_MESSAGE_CHAIN = T.let(T.uns RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_REJECT_REJECT = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_REJECT_DELETE_IF_REJECT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL_REJECT = T.let(T.unsafe(nil), Set) @@ -5382,9 +5419,15 @@ RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SEND___SEND__ = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SIG_HELPERS = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SKIP_PENDING = T.let(T.unsafe(nil), Set) @@ -5392,7 +5435,7 @@ RuboCop::AST::NodePattern::Sets::SET_SKIP_PENDING = T.let(T.unsafe(nil), Set) RuboCop::AST::NodePattern::Sets::SET_SORT_BY_SORT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_SORT_MIN_MAX = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_SORT_SORT_MIN_ETC = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SPAWN_SYSTEM = T.let(T.unsafe(nil), Set) @@ -5406,15 +5449,27 @@ RuboCop::AST::NodePattern::Sets::SET_START_WITH_END_WITH = T.let(T.unsafe(nil), # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_START_WITH_STARTS_WITH_END_WITH_ENDS_WITH = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_STATUS_CODE = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_STRUCT_IMMUTABLESTRUCT = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_STRUCT_IMMUTABLESTRUCT_INEXACTSTRUCT = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SUCC_PRED_NEXT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_TASK_NAMESPACE = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_TEXT_EXACT_TEXT = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set) @@ -5430,9 +5485,6 @@ RuboCop::AST::NodePattern::Sets::SET_TO_TO_NOT_NOT_TO = T.let(T.unsafe(nil), Set # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_TYPE_TEMPLATE_TYPE_MEMBER = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_ZERO_POSITIVE_NEGATIVE = T.let(T.unsafe(nil), Set) @@ -5457,9 +5509,6 @@ RuboCop::AST::NodePattern::Sets::SET__GLOB = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET___ = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET___10 = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET___2 = T.let(T.unsafe(nil), Set) @@ -5496,6 +5545,9 @@ RuboCop::AST::NodePattern::Sets::SET___METHOD_____CALLEE__ = T.let(T.unsafe(nil) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET____ = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____2 = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET____ETC = T.let(T.unsafe(nil), Set) @@ -5505,6 +5557,9 @@ RuboCop::AST::NodePattern::Sets::SET____ETC_2 = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET____ETC_3 = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET____ETC_4 = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_____2 = T.let(T.unsafe(nil), Set) @@ -5533,7 +5588,7 @@ RuboCop::AST::NumericNode::SIGN_REGEX = T.let(T.unsafe(nil), Regexp) # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/op_asgn_node.rb#9 class RuboCop::AST::OpAsgnNode < ::RuboCop::AST::Node # @return [AsgnNode] the assignment node # @@ -5566,7 +5621,7 @@ end # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all assignment nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/or_asgn_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/or_asgn_node.rb#11 class RuboCop::AST::OrAsgnNode < ::RuboCop::AST::OpAsgnNode # The operator being used for assignment as a symbol. # @@ -5834,7 +5889,7 @@ RuboCop::AST::PredicateOperatorNode::SEMANTIC_OR = T.let(T.unsafe(nil), String) # This will be used in place of a plain node when the builder constructs # the AST, making its methods available to all `arg` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/procarg0_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/procarg0_node.rb#11 class RuboCop::AST::Procarg0Node < ::RuboCop::AST::ArgNode # Returns the name of an argument. # @@ -6171,7 +6226,7 @@ RuboCop::AST::RegexpNode::OPTIONS = T.let(T.unsafe(nil), Hash) # plain node when the builder constructs the AST, making its methods # available to all `resbody` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/resbody_node.rb#11 class RuboCop::AST::ResbodyNode < ::RuboCop::AST::Node # Returns the body of the `rescue` clause. # @@ -6206,7 +6261,7 @@ end # plain node when the builder constructs the AST, making its methods # available to all `rescue` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/rescue_node.rb#11 class RuboCop::AST::RescueNode < ::RuboCop::AST::Node # Returns the body of the rescue node. # @@ -6278,7 +6333,7 @@ RuboCop::AST::RuboCopCompatibility::INCOMPATIBLE_COPS = T.let(T.unsafe(nil), Has # plain node when the builder constructs the AST, making its methods # available to all `sclass` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/self_class_node.rb#11 class RuboCop::AST::SelfClassNode < ::RuboCop::AST::Node # The body of this `sclass` node. # @@ -7025,7 +7080,7 @@ RuboCop::AST::Version::STRING = T.let(T.unsafe(nil), String) # node when the builder constructs the AST, making its methods available # to all `when` nodes within RuboCop. # -# source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#8 +# source://rubocop-ast//lib/rubocop/ast/node/when_node.rb#11 class RuboCop::AST::WhenNode < ::RuboCop::AST::Node # Returns the body of the `when` node. # diff --git a/sorbet/rbi/gems/rubocop-capybara@2.17.1.rbi b/sorbet/rbi/gems/rubocop-capybara@2.17.1.rbi deleted file mode 100644 index c3bfc36b..00000000 --- a/sorbet/rbi/gems/rubocop-capybara@2.17.1.rbi +++ /dev/null @@ -1,774 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-capybara` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-capybara`. - -# source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#3 -module RuboCop; end - -# source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#4 -module RuboCop::Cop; end - -# source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#5 -module RuboCop::Cop::Capybara; end - -# Help methods for capybara. -# -# source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#7 -module RuboCop::Cop::Capybara::CapybaraHelp - private - - # @example - # common_attributes?('a[focused]') # => true - # common_attributes?('button[focused][visible]') # => true - # common_attributes?('table[id=some-id]') # => true - # common_attributes?('h1[invalid]') # => false - # @param selector [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#60 - def common_attributes?(selector); end - - # @param node [RuboCop::AST::SendNode] - # @param option [Symbol] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#124 - def include_option?(node, option); end - - # @example - # replaceable_attributes?('table[id=some-id]') # => true - # replaceable_attributes?('a[focused]') # => false - # @param attrs [Array<String>] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#69 - def replaceable_attributes?(attrs); end - - # @param node [RuboCop::AST::SendNode] - # @param element [String] - # @param attrs [Array<String>] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#107 - def replaceable_element?(node, element, attrs); end - - # @param node [RuboCop::AST::SendNode] - # @param locator [String] - # @param element [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#44 - def replaceable_option?(node, locator, element); end - - # @param pseudo_class [String] - # @param locator [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#84 - def replaceable_pseudo_class?(pseudo_class, locator); end - - # @param locator [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#95 - def replaceable_pseudo_class_not?(locator); end - - # @param locator [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#75 - def replaceable_pseudo_classes?(locator); end - - # @param node [RuboCop::AST::SendNode] - # @param attrs [Array<String>] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#117 - def replaceable_to_link?(node, attrs); end - - class << self - # @example - # common_attributes?('a[focused]') # => true - # common_attributes?('button[focused][visible]') # => true - # common_attributes?('table[id=some-id]') # => true - # common_attributes?('h1[invalid]') # => false - # @param selector [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#60 - def common_attributes?(selector); end - - # @param node [RuboCop::AST::SendNode] - # @param option [Symbol] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#124 - def include_option?(node, option); end - - # @example - # replaceable_attributes?('table[id=some-id]') # => true - # replaceable_attributes?('a[focused]') # => false - # @param attrs [Array<String>] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#69 - def replaceable_attributes?(attrs); end - - # @param node [RuboCop::AST::SendNode] - # @param element [String] - # @param attrs [Array<String>] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#107 - def replaceable_element?(node, element, attrs); end - - # @param node [RuboCop::AST::SendNode] - # @param locator [String] - # @param element [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#44 - def replaceable_option?(node, locator, element); end - - # @param pseudo_class [String] - # @param locator [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#84 - def replaceable_pseudo_class?(pseudo_class, locator); end - - # @param locator [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#95 - def replaceable_pseudo_class_not?(locator); end - - # @param locator [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#75 - def replaceable_pseudo_classes?(locator); end - - # @param node [RuboCop::AST::SendNode] - # @param attrs [Array<String>] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#117 - def replaceable_to_link?(node, attrs); end - end -end - -# source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#8 -RuboCop::Cop::Capybara::CapybaraHelp::COMMON_OPTIONS = T.let(T.unsafe(nil), Array) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#11 -RuboCop::Cop::Capybara::CapybaraHelp::SPECIFIC_OPTIONS = T.let(T.unsafe(nil), Hash) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#34 -RuboCop::Cop::Capybara::CapybaraHelp::SPECIFIC_PSEUDO_CLASSES = T.let(T.unsafe(nil), Array) - -# Helps parsing css selector. -# -# source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#7 -module RuboCop::Cop::Capybara::CssSelector - private - - # @example - # attribute?('[attribute]') # => true - # attribute?('attribute') # => false - # @param selector [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#47 - def attribute?(selector); end - - # @example - # attributes('a[foo-bar_baz]') # => {"foo-bar_baz=>nil} - # attributes('button[foo][bar=baz]') # => {"foo"=>nil, "bar"=>"'baz'"} - # attributes('table[foo=bar]') # => {"foo"=>"'bar'"} - # @param selector [String] - # @return [Array<String>] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#57 - def attributes(selector); end - - # @example - # classes('#some-id') # => [] - # classes('.some-cls') # => ['some-cls'] - # classes('#some-id.some-cls') # => ['some-cls'] - # classes('#some-id.cls1.cls2') # => ['cls1', 'cls2'] - # @param selector [String] - # @return [Array<String>] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#38 - def classes(selector); end - - # @example - # id('#some-id') # => some-id - # id('.some-cls') # => nil - # id('#some-id.cls') # => some-id - # @param selector [String] - # @return [String] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#16 - def id(selector); end - - # @example - # id?('#some-id') # => true - # id?('.some-cls') # => false - # @param selector [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#27 - def id?(selector); end - - # @example - # multiple_selectors?('a.cls b#id') # => true - # multiple_selectors?('a.cls') # => false - # @param selector [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#87 - def multiple_selectors?(selector); end - - # @example - # normalize_value('true') # => true - # normalize_value('false') # => false - # normalize_value(nil) # => nil - # normalize_value("foo") # => "'foo'" - # @param value [String] - # @return [Boolean, String] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#99 - def normalize_value(value); end - - # @example - # pseudo_classes('button:not([disabled])') # => ['not()'] - # pseudo_classes('a:enabled:not([valid])') # => ['enabled', 'not()'] - # @param selector [String] - # @return [Array<String>] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#73 - def pseudo_classes(selector); end - - class << self - # @example - # attribute?('[attribute]') # => true - # attribute?('attribute') # => false - # @param selector [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#47 - def attribute?(selector); end - - # @example - # attributes('a[foo-bar_baz]') # => {"foo-bar_baz=>nil} - # attributes('button[foo][bar=baz]') # => {"foo"=>nil, "bar"=>"'baz'"} - # attributes('table[foo=bar]') # => {"foo"=>"'bar'"} - # @param selector [String] - # @return [Array<String>] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#57 - def attributes(selector); end - - # @example - # classes('#some-id') # => [] - # classes('.some-cls') # => ['some-cls'] - # classes('#some-id.some-cls') # => ['some-cls'] - # classes('#some-id.cls1.cls2') # => ['cls1', 'cls2'] - # @param selector [String] - # @return [Array<String>] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#38 - def classes(selector); end - - # @example - # id('#some-id') # => some-id - # id('.some-cls') # => nil - # id('#some-id.cls') # => some-id - # @param selector [String] - # @return [String] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#16 - def id(selector); end - - # @example - # id?('#some-id') # => true - # id?('.some-cls') # => false - # @param selector [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#27 - def id?(selector); end - - # @example - # multiple_selectors?('a.cls b#id') # => true - # multiple_selectors?('a.cls') # => false - # @param selector [String] - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#87 - def multiple_selectors?(selector); end - - # @example - # normalize_value('true') # => true - # normalize_value('false') # => false - # normalize_value(nil) # => nil - # normalize_value("foo") # => "'foo'" - # @param value [String] - # @return [Boolean, String] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#99 - def normalize_value(value); end - - # @example - # pseudo_classes('button:not([disabled])') # => ['not()'] - # pseudo_classes('a:enabled:not([valid])') # => ['enabled', 'not()'] - # @param selector [String] - # @return [Array<String>] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#73 - def pseudo_classes(selector); end - end -end - -# Checks that no expectations are set on Capybara's `current_path`. -# -# The -# https://www.rubydoc.info/github/teamcapybara/capybara/main/Capybara/RSpecMatchers#have_current_path-instance_method[`have_current_path` matcher] -# should be used on `page` to set expectations on Capybara's -# current path, since it uses -# https://github.com/teamcapybara/capybara/blob/main/README.md#asynchronous-javascript-ajax-and-friends[Capybara's waiting functionality] -# which ensures that preceding actions (like `click_link`) have -# completed. -# -# This cop does not support autocorrection in some cases. -# -# @example -# # bad -# expect(current_path).to eq('/callback') -# -# # good -# expect(page).to have_current_path('/callback') -# -# # bad (does not support autocorrection) -# expect(page.current_path).to match(variable) -# -# # good -# expect(page).to have_current_path('/callback') -# -# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#31 -class RuboCop::Cop::Capybara::CurrentPathExpectation < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # Supported matchers: eq(...) / match(/regexp/) / match('regexp') - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#47 - def as_is_matcher(param0 = T.unsafe(nil)); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#41 - def expectation_set_on_current_path(param0 = T.unsafe(nil)); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#64 - def on_send(node); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#54 - def regexp_node_matcher(param0 = T.unsafe(nil)); end - - private - - # `have_current_path` with no options will include the querystring - # while `page.current_path` does not. - # This ensures the option `ignore_query: true` is added - # except when the expectation is a regexp or string - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#118 - def add_ignore_query_options(corrector, node); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#76 - def autocorrect(corrector, node); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#100 - def convert_regexp_node_to_literal(corrector, matcher_node, regexp_node); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#106 - def regexp_node_to_regexp_expr(regexp_node); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#87 - def rewrite_expectation(corrector, node, to_symbol, matcher_node); end - - class << self - # source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#60 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#34 -RuboCop::Cop::Capybara::CurrentPathExpectation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/current_path_expectation.rb#38 -RuboCop::Cop::Capybara::CurrentPathExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for usage of deprecated style methods. -# -# @example when using `assert_style` -# # bad -# page.find(:css, '#first').assert_style(display: 'block') -# -# # good -# page.find(:css, '#first').assert_matches_style(display: 'block') -# @example when using `has_style?` -# # bad -# expect(page.find(:css, 'first') -# .has_style?(display: 'block')).to be true -# -# # good -# expect(page.find(:css, 'first') -# .matches_style?(display: 'block')).to be true -# @example when using `have_style` -# # bad -# expect(page).to have_style(display: 'block') -# -# # good -# expect(page).to match_style(display: 'block') -# -# source://rubocop-capybara//lib/rubocop/cop/capybara/match_style.rb#31 -class RuboCop::Cop::Capybara::MatchStyle < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-capybara//lib/rubocop/cop/capybara/match_style.rb#42 - def on_send(node); end - - private - - # source://rubocop-capybara//lib/rubocop/cop/capybara/match_style.rb#52 - def message(node); end -end - -# source://rubocop-capybara//lib/rubocop/cop/capybara/match_style.rb#34 -RuboCop::Cop::Capybara::MatchStyle::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/match_style.rb#36 -RuboCop::Cop::Capybara::MatchStyle::PREFERRED_METHOD = T.let(T.unsafe(nil), Hash) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/match_style.rb#35 -RuboCop::Cop::Capybara::MatchStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces use of `have_no_*` or `not_to` for negated expectations. -# -# @example EnforcedStyle: not_to (default) -# # bad -# expect(page).to have_no_selector -# expect(page).to have_no_css('a') -# -# # good -# expect(page).not_to have_selector -# expect(page).not_to have_css('a') -# @example EnforcedStyle: have_no -# # bad -# expect(page).not_to have_selector -# expect(page).not_to have_css('a') -# -# # good -# expect(page).to have_no_selector -# expect(page).to have_no_css('a') -# -# source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#26 -class RuboCop::Cop::Capybara::NegationMatcher < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#50 - def have_no?(param0 = T.unsafe(nil)); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#44 - def not_to?(param0 = T.unsafe(nil)); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#55 - def on_send(node); end - - private - - # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#78 - def message(matcher); end - - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#69 - def offense?(node); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#74 - def offense_range(node); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#93 - def replaced_matcher(matcher); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#84 - def replaced_runner; end -end - -# source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#31 -RuboCop::Cop::Capybara::NegationMatcher::CAPYBARA_MATCHERS = T.let(T.unsafe(nil), Array) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#30 -RuboCop::Cop::Capybara::NegationMatcher::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#38 -RuboCop::Cop::Capybara::NegationMatcher::NEGATIVE_MATCHERS = T.let(T.unsafe(nil), Set) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#36 -RuboCop::Cop::Capybara::NegationMatcher::POSITIVE_MATCHERS = T.let(T.unsafe(nil), Set) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#41 -RuboCop::Cop::Capybara::NegationMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# Checks for there is a more specific actions offered by Capybara. -# -# @example -# -# # bad -# find('a').click -# find('button.cls').click -# find('a', exact_text: 'foo').click -# find('div button').click -# -# # good -# click_link -# click_button(class: 'cls') -# click_link(exact_text: 'foo') -# find('div').click_button -# -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_actions.rb#22 -class RuboCop::Cop::Capybara::SpecificActions < ::RuboCop::Cop::Base - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_actions.rb#31 - def click_on_selector(param0 = T.unsafe(nil)); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_actions.rb#35 - def on_send(node); end - - private - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_actions.rb#87 - def good_action(action); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_actions.rb#73 - def last_selector(arg); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_actions.rb#81 - def message(action, selector); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_actions.rb#77 - def offense_range(node, receiver); end - - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_actions.rb#57 - def replaceable?(node, arg, action); end - - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_actions.rb#63 - def replaceable_attributes?(selector); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_actions.rb#53 - def specific_action(selector); end - - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_actions.rb#69 - def supported_selector?(selector); end -end - -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_actions.rb#23 -RuboCop::Cop::Capybara::SpecificActions::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_actions.rb#24 -RuboCop::Cop::Capybara::SpecificActions::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_actions.rb#25 -RuboCop::Cop::Capybara::SpecificActions::SPECIFIC_ACTION = T.let(T.unsafe(nil), Hash) - -# Checks if there is a more specific finder offered by Capybara. -# -# @example -# # bad -# find('#some-id') -# find('[visible][id=some-id]') -# -# # good -# find_by_id('some-id') -# find_by_id('some-id', visible: true) -# -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#17 -class RuboCop::Cop::Capybara::SpecificFinders < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#31 - def class_options(param0); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#26 - def find_argument(param0 = T.unsafe(nil)); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#35 - def on_send(node); end - - private - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#89 - def append_options(classes, options); end - - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#63 - def attribute?(arg); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#79 - def autocorrect_classes(corrector, node, classes); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#116 - def end_pos(node); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#94 - def keyword_argument_class(classes); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#112 - def offense_range(node); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#47 - def on_attr(node, arg); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#55 - def on_id(node, arg); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#68 - def register_offense(node, id, classes = T.unsafe(nil)); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#99 - def replaced_arguments(arg, id); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#104 - def to_options(attrs); end -end - -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#22 -RuboCop::Cop::Capybara::SpecificFinders::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#23 -RuboCop::Cop::Capybara::SpecificFinders::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for there is a more specific matcher offered by Capybara. -# -# @example -# -# # bad -# expect(page).to have_selector('button') -# expect(page).to have_no_selector('button.cls') -# expect(page).to have_css('button') -# expect(page).to have_no_css('a.cls', href: 'http://example.com') -# expect(page).to have_css('table.cls') -# expect(page).to have_css('select') -# expect(page).to have_css('input', exact_text: 'foo') -# -# # good -# expect(page).to have_button -# expect(page).to have_no_button(class: 'cls') -# expect(page).to have_button -# expect(page).to have_no_link('foo', class: 'cls', href: 'http://example.com') -# expect(page).to have_table(class: 'cls') -# expect(page).to have_select -# expect(page).to have_field('foo') -# -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#28 -class RuboCop::Cop::Capybara::SpecificMatcher < ::RuboCop::Cop::Base - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#41 - def first_argument(param0 = T.unsafe(nil)); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#45 - def on_send(node); end - - private - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#80 - def good_matcher(node, matcher); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#74 - def message(node, matcher); end - - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#62 - def replaceable?(node, arg, matcher); end - - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#68 - def replaceable_attributes?(selector); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#57 - def specific_matcher(arg); end -end - -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#29 -RuboCop::Cop::Capybara::SpecificMatcher::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#30 -RuboCop::Cop::Capybara::SpecificMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#32 -RuboCop::Cop::Capybara::SpecificMatcher::SPECIFIC_MATCHER = T.let(T.unsafe(nil), Hash) - -# Checks for boolean visibility in Capybara finders. -# -# Capybara lets you find elements that match a certain visibility using -# the `:visible` option. `:visible` accepts both boolean and symbols as -# values, however using booleans can have unwanted effects. `visible: -# false` does not find just invisible elements, but both visible and -# invisible elements. For expressiveness and clarity, use one of the -# symbol values, `:all`, `:hidden` or `:visible`. -# Read more in -# https://www.rubydoc.info/gems/capybara/Capybara%2FNode%2FFinders:all[the documentation]. -# -# @example -# # bad -# expect(page).to have_selector('.foo', visible: false) -# expect(page).to have_css('.foo', visible: true) -# expect(page).to have_link('my link', visible: false) -# -# # good -# expect(page).to have_selector('.foo', visible: :visible) -# expect(page).to have_css('.foo', visible: :all) -# expect(page).to have_link('my link', visible: :hidden) -# -# source://rubocop-capybara//lib/rubocop/cop/capybara/visibility_matcher.rb#28 -class RuboCop::Cop::Capybara::VisibilityMatcher < ::RuboCop::Cop::Base - # source://rubocop-capybara//lib/rubocop/cop/capybara/visibility_matcher.rb#58 - def on_send(node); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/visibility_matcher.rb#54 - def visible_false?(param0 = T.unsafe(nil)); end - - # source://rubocop-capybara//lib/rubocop/cop/capybara/visibility_matcher.rb#49 - def visible_true?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/visibility_matcher.rb#65 - def capybara_matcher?(method_name); end -end - -# source://rubocop-capybara//lib/rubocop/cop/capybara/visibility_matcher.rb#31 -RuboCop::Cop::Capybara::VisibilityMatcher::CAPYBARA_MATCHER_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/visibility_matcher.rb#29 -RuboCop::Cop::Capybara::VisibilityMatcher::MSG_FALSE = T.let(T.unsafe(nil), String) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/visibility_matcher.rb#30 -RuboCop::Cop::Capybara::VisibilityMatcher::MSG_TRUE = T.let(T.unsafe(nil), String) - -# source://rubocop-capybara//lib/rubocop/cop/capybara/visibility_matcher.rb#46 -RuboCop::Cop::Capybara::VisibilityMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) diff --git a/sorbet/rbi/gems/rubocop-packaging@0.5.2.rbi b/sorbet/rbi/gems/rubocop-packaging@0.5.2.rbi deleted file mode 100644 index 2a9d6123..00000000 --- a/sorbet/rbi/gems/rubocop-packaging@0.5.2.rbi +++ /dev/null @@ -1,387 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-packaging` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-packaging`. - -# source://rubocop-packaging//lib/rubocop/packaging/version.rb#3 -module RuboCop; end - -# source://rubocop-packaging//lib/rubocop/cop/packaging/bundler_setup_in_tests.rb#6 -module RuboCop::Cop; end - -# source://rubocop-packaging//lib/rubocop/cop/packaging/bundler_setup_in_tests.rb#7 -module RuboCop::Cop::Packaging; end - -# This cop flags the `require "bundler/setup"` calls if they're -# made from inside the tests directory. -# -# @example -# -# # bad -# require "foo" -# require "bundler/setup" -# -# # good -# require "foo" -# -# source://rubocop-packaging//lib/rubocop/cop/packaging/bundler_setup_in_tests.rb#20 -class RuboCop::Cop::Packaging::BundlerSetupInTests < ::RuboCop::Cop::Base - include ::RuboCop::Packaging::LibHelperModule - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # Called from on_send, this method helps to autocorrect - # the offenses flagged by this cop. - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/bundler_setup_in_tests.rb#57 - def autocorrect(corrector, node); end - - # source://rubocop-packaging//lib/rubocop/cop/packaging/bundler_setup_in_tests.rb#29 - def bundler_setup?(param0 = T.unsafe(nil)); end - - # This method is called from inside `#def_node_matcher`. - # It flags an offense if the `require "bundler/setup"` - # call is made from the tests directory. - # - # @return [Boolean] - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/bundler_setup_in_tests.rb#66 - def bundler_setup_in_test_dir?(str); end - - # This method determines if the call is made *from* the tests directory. - # - # @return [Boolean] - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/bundler_setup_in_tests.rb#71 - def falls_in_test_dir?; end - - # Extended from the Base class. - # More about the `#on_new_investigation` method can be found here: - # https://github.com/rubocop-hq/rubocop/blob/343f62e4555be0470326f47af219689e21c61a37/lib/rubocop/cop/base.rb - # - # Processing of the AST happens here. - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/bundler_setup_in_tests.rb#39 - def on_new_investigation; end - - # Extended from AST::Traversal. - # More about the `#on_send` method can be found here: - # https://github.com/rubocop-hq/rubocop-ast/blob/08d0f49a47af1e9a30a6d8f67533ba793c843d67/lib/rubocop/ast/traversal.rb#L112 - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/bundler_setup_in_tests.rb#47 - def on_send(node); end -end - -# This is the message that will be displayed when RuboCop::Packaging finds -# an offense of using `require "bundler/setup"` in the tests directory. -# -# source://rubocop-packaging//lib/rubocop/cop/packaging/bundler_setup_in_tests.rb#27 -RuboCop::Cop::Packaging::BundlerSetupInTests::MSG = T.let(T.unsafe(nil), String) - -# This cop flags the usage of `git ls-files` in gemspec -# and suggests to use a plain Ruby alternative, like `Dir`, -# `Dir.glob`, or `Rake::FileList` instead. -# -# @example -# -# # bad -# Gem::Specification.new do |spec| -# spec.files = `git ls-files`.split("\n") -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.files = Dir["lib/**/*", "LICENSE", "README.md"] -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.files = Dir.chdir(File.expand_path(__dir__)) do -# `git ls-files -z`.split("\\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } -# end -# end -# -# # good -# require "rake/file_list" -# -# Gem::Specification.new do |spec| -# spec.files = Rake::FileList["**/*"].exclude(*File.read(".gitignore").split) -# end -# -# # bad -# Gem::Specification.new do |spec| -# spec.files = `git ls-files -- lib/`.split("\n") -# spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } -# end -# -# # good -# Gem::Specification.new do |spec| -# spec.files = Dir.glob("lib/**/*") -# spec.executables = Dir.glob("bin/*").map{ |f| File.basename(f) } -# end -# -# source://rubocop-packaging//lib/rubocop/cop/packaging/gemspec_git.rb#48 -class RuboCop::Cop::Packaging::GemspecGit < ::RuboCop::Cop::Base - # Extended from the Cop class. - # More about the `#investigate` method can be found here: - # https://github.com/rubocop-hq/rubocop/blob/59543c8e2b66bff249de131fa9105f3eb11e9edb/lib/rubocop/cop/cop.rb#L13-L25 - # - # Processing of the AST happens here. - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/gemspec_git.rb#70 - def on_new_investigation; end - - # This method is called from inside `#def_node_search`. - # It is used to find strings which start with "git". - # - # @return [Boolean] - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/gemspec_git.rb#83 - def starts_with_git?(str); end - - # source://rubocop-packaging//lib/rubocop/cop/packaging/gemspec_git.rb#56 - def xstr(param0); end -end - -# This is the message that will be displayed when RuboCop finds an -# offense of using `git ls-files`. -# -# source://rubocop-packaging//lib/rubocop/cop/packaging/gemspec_git.rb#51 -RuboCop::Cop::Packaging::GemspecGit::MSG = T.let(T.unsafe(nil), String) - -# This cop flags the `require` calls, from anywhere mapping to -# the "lib" directory, except originating from lib/. -# -# @example -# -# # bad -# require "../lib/foo/bar" -# -# # good -# require "foo/bar" -# -# # bad -# require File.expand_path("../../lib/foo", __FILE__) -# -# # good -# require "foo" -# -# # bad -# require File.expand_path("../../../lib/foo/bar/baz/qux", __dir__) -# -# # good -# require "foo/bar/baz/qux" -# -# # bad -# require File.dirname(__FILE__) + "/../../lib/baz/qux" -# -# # good -# require "baz/qux" -# -# source://rubocop-packaging//lib/rubocop/cop/packaging/require_hardcoding_lib.rb#37 -class RuboCop::Cop::Packaging::RequireHardcodingLib < ::RuboCop::Cop::Base - include ::RuboCop::Packaging::LibHelperModule - extend ::RuboCop::Cop::AutoCorrector - - # This method is called from inside `#def_node_matcher`. - # It flags an offense if the `require` call is made from - # anywhere except the "lib" directory. - # - # @return [Boolean] - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/require_hardcoding_lib.rb#85 - def falls_in_lib?(str); end - - # This method is called from inside `#def_node_matcher`. - # It flags an offense if the `require` call (using the __FILE__ - # arguement) is made from anywhere except the "lib" directory. - # - # @return [Boolean] - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/require_hardcoding_lib.rb#93 - def falls_in_lib_using_file?(str); end - - # This method preprends a "." to the string that starts with "/". - # And then determines if that call is made to "lib/". - # - # @return [Boolean] - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/require_hardcoding_lib.rb#100 - def falls_in_lib_with_file_dirname_plus_str?(str); end - - # Called from on_send, this method helps to replace - # the "bad" require call with the "good" one. - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/require_hardcoding_lib.rb#77 - def good_require_call; end - - # Extended from the Base class. - # More about the `#on_new_investigation` method can be found here: - # https://github.com/rubocop-hq/rubocop/blob/343f62e4555be0470326f47af219689e21c61a37/lib/rubocop/cop/base.rb - # - # Processing of the AST happens here. - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/require_hardcoding_lib.rb#59 - def on_new_investigation; end - - # Extended from AST::Traversal. - # More about the `#on_send` method can be found here: - # https://github.com/rubocop-hq/rubocop-ast/blob/08d0f49a47af1e9a30a6d8f67533ba793c843d67/lib/rubocop/ast/traversal.rb#L112 - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/require_hardcoding_lib.rb#67 - def on_send(node); end - - # source://rubocop-packaging//lib/rubocop/cop/packaging/require_hardcoding_lib.rb#46 - def require?(param0 = T.unsafe(nil)); end -end - -# This is the message that will be displayed when RuboCop::Packaging -# finds an offense of using `require` with relative path to lib. -# -# source://rubocop-packaging//lib/rubocop/cop/packaging/require_hardcoding_lib.rb#43 -RuboCop::Cop::Packaging::RequireHardcodingLib::MSG = T.let(T.unsafe(nil), String) - -# This cop flags the `require_relative` calls, from anywhere -# mapping to the "lib" directory, except originating from lib/ or -# the gemspec file, and suggests to use `require` instead. -# -# @example -# -# # bad -# require_relative "lib/foo" -# -# # good -# require "foo" -# -# # bad -# require_relative "../../lib/foo/bar" -# -# # good -# require "foo/bar" -# -# # good -# require_relative "foo/bar/bax" -# require_relative "baz/qux" -# -# source://rubocop-packaging//lib/rubocop/cop/packaging/require_relative_hardcoding_lib.rb#30 -class RuboCop::Cop::Packaging::RequireRelativeHardcodingLib < ::RuboCop::Cop::Base - include ::RuboCop::Packaging::LibHelperModule - extend ::RuboCop::Cop::AutoCorrector - - # This method is called from inside `#def_node_matcher`. - # It flags an offense if the `require_relative` call is made - # from anywhere except the "lib" directory. - # - # @return [Boolean] - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/require_relative_hardcoding_lib.rb#75 - def falls_in_lib?(str); end - - # Called from on_send, this method helps to replace the - # "bad" require_relative call with the "good" one. - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/require_relative_hardcoding_lib.rb#67 - def good_require_call; end - - # Extended from the Base class. - # More about the `#on_new_investigation` method can be found here: - # https://github.com/rubocop-hq/rubocop/blob/343f62e4555be0470326f47af219689e21c61a37/lib/rubocop/cop/base.rb - # - # Processing of the AST happens here. - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/require_relative_hardcoding_lib.rb#49 - def on_new_investigation; end - - # Extended from AST::Traversal. - # More about the `#on_send` method can be found here: - # https://github.com/rubocop-hq/rubocop-ast/blob/08d0f49a47af1e9a30a6d8f67533ba793c843d67/lib/rubocop/ast/traversal.rb#L112 - # - # source://rubocop-packaging//lib/rubocop/cop/packaging/require_relative_hardcoding_lib.rb#57 - def on_send(node); end - - # source://rubocop-packaging//lib/rubocop/cop/packaging/require_relative_hardcoding_lib.rb#39 - def require_relative(param0 = T.unsafe(nil)); end -end - -# This is the message that will be displayed when RuboCop finds an -# offense of using `require_relative` with relative path to lib. -# -# source://rubocop-packaging//lib/rubocop/cop/packaging/require_relative_hardcoding_lib.rb#36 -RuboCop::Cop::Packaging::RequireRelativeHardcodingLib::MSG = T.let(T.unsafe(nil), String) - -# RuboCop Packaging project namespace -# -# source://rubocop-packaging//lib/rubocop/packaging/version.rb#4 -module RuboCop::Packaging; end - -# source://rubocop-packaging//lib/rubocop/packaging.rb#10 -RuboCop::Packaging::CONFIG = T.let(T.unsafe(nil), Hash) - -# source://rubocop-packaging//lib/rubocop/packaging.rb#9 -RuboCop::Packaging::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) - -# Because RuboCop doesn't yet support plugins, we have to monkey patch in a -# bit of our configuration. -# -# source://rubocop-packaging//lib/rubocop/packaging/inject.rb#7 -module RuboCop::Packaging::Inject - class << self - # source://rubocop-packaging//lib/rubocop/packaging/inject.rb#8 - def defaults!; end - end -end - -# This helper module extracts the methods which can be used -# in other cop classes. -# -# source://rubocop-packaging//lib/rubocop/packaging/lib_helper_module.rb#7 -module RuboCop::Packaging::LibHelperModule - # This method determines if that call is made *from* the "lib" directory. - # - # @return [Boolean] - # - # source://rubocop-packaging//lib/rubocop/packaging/lib_helper_module.rb#25 - def inspected_file_falls_in_lib?; end - - # This method determines if that call is made *from* the "gemspec" file. - # - # @return [Boolean] - # - # source://rubocop-packaging//lib/rubocop/packaging/lib_helper_module.rb#30 - def inspected_file_is_gemspec?; end - - # This method determines if the inspected file is not in lib/ or - # isn't a gemspec file. - # - # @return [Boolean] - # - # source://rubocop-packaging//lib/rubocop/packaging/lib_helper_module.rb#36 - def inspected_file_is_not_in_lib_or_gemspec?; end - - # For determining the root directory of the project. - # - # source://rubocop-packaging//lib/rubocop/packaging/lib_helper_module.rb#9 - def root_dir; end - - # This method determines if the calls are made to the "lib" directory. - # - # @return [Boolean] - # - # source://rubocop-packaging//lib/rubocop/packaging/lib_helper_module.rb#14 - def target_falls_in_lib?(str); end - - # This method determines if the calls (using the __FILE__ argument) - # are made to the "lib" directory. - # - # @return [Boolean] - # - # source://rubocop-packaging//lib/rubocop/packaging/lib_helper_module.rb#20 - def target_falls_in_lib_using_file?(str); end -end - -# source://rubocop-packaging//lib/rubocop/packaging.rb#8 -RuboCop::Packaging::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) - -# source://rubocop-packaging//lib/rubocop/packaging/version.rb#5 -RuboCop::Packaging::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop-performance@1.17.1.rbi b/sorbet/rbi/gems/rubocop-performance@1.17.1.rbi deleted file mode 100644 index d1d07cd3..00000000 --- a/sorbet/rbi/gems/rubocop-performance@1.17.1.rbi +++ /dev/null @@ -1,3036 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-performance` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-performance`. - -# source://rubocop-performance//lib/rubocop/performance.rb#3 -module RuboCop; end - -# source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#4 -module RuboCop::Cop; end - -# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#5 -module RuboCop::Cop::Performance; end - -# Identifies usages of `ancestors.include?` and change them to use `<=` instead. -# -# @example -# # bad -# A.ancestors.include?(B) -# -# # good -# A <= B -# -# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#19 -class RuboCop::Cop::Performance::AncestorsInclude < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#26 - def ancestors_include_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#30 - def on_send(node); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#43 - def range(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#23 -RuboCop::Cop::Performance::AncestorsInclude::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/ancestors_include.rb#24 -RuboCop::Cop::Performance::AncestorsInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where slicing arrays with semi-infinite ranges -# can be replaced by `Array#take` and `Array#drop`. -# This cop was created due to a mistake in microbenchmark and hence is disabled by default. -# Refer https://github.com/rubocop/rubocop-performance/pull/175#issuecomment-731892717 -# -# @example -# # bad -# array[..2] -# array[...2] -# array[2..] -# array[2...] -# array.slice(..2) -# -# # good -# array.take(3) -# array.take(2) -# array.drop(2) -# array.drop(2) -# array.take(3) -# -# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#29 -class RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#45 - def endless_range?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#41 - def endless_range_slice?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#52 - def on_send(node); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#65 - def correction(receiver, range_node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#36 -RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#39 -RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#38 -RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::SLICE_METHODS = T.let(T.unsafe(nil), Set) - -# Identifies places where numeric argument to BigDecimal should be -# converted to string. Initializing from String is faster -# than from Numeric for BigDecimal. -# -# @example -# # bad -# BigDecimal(1, 2) -# 4.to_d(6) -# BigDecimal(1.2, 3, exception: true) -# 4.5.to_d(6, exception: true) -# -# # good -# BigDecimal('1', 2) -# BigDecimal('4', 6) -# BigDecimal('1.2', 3, exception: true) -# BigDecimal('4.5', 6, exception: true) -# -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#23 -class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#29 - def big_decimal_with_numeric_argument?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#37 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#33 - def to_d?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#26 -RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#27 -RuboCop::Cop::Performance::BigDecimalWithNumericArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# In Ruby 2.7, `UnboundMethod#bind_call` has been added. -# -# This cop identifies places where `bind(obj).call(args, ...)` -# can be replaced by `bind_call(obj, args, ...)`. -# -# The `bind_call(obj, args, ...)` method is faster than -# `bind(obj).call(args, ...)`. -# -# @example -# # bad -# umethod.bind(obj).call(foo, bar) -# umethod.bind(obj).(foo, bar) -# -# # good -# umethod.bind_call(obj, foo, bar) -# -# source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#22 -class RuboCop::Cop::Performance::BindCall < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#32 - def bind_with_call_method?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#40 - def on_send(node); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#71 - def build_call_args(call_args_node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#64 - def correction_range(receiver, node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#58 - def message(bind_arg, call_args); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#29 -RuboCop::Cop::Performance::BindCall::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/bind_call.rb#30 -RuboCop::Cop::Performance::BindCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies unnecessary use of a `block_given?` where explicit check -# of block argument would suffice. -# -# @example -# # bad -# def method(&block) -# do_something if block_given? -# end -# -# # good -# def method(&block) -# do_something if block -# end -# -# # good - block is reassigned -# def method(&block) -# block ||= -> { do_something } -# warn "Using default ..." unless block_given? -# # ... -# end -# -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#27 -class RuboCop::Cop::Performance::BlockGivenWithExplicitBlock < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#35 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#33 - def reassigns_block_arg?(param0 = T.unsafe(nil), param1); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#31 -RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#30 -RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where `caller[n]` can be replaced by `caller(n..n).first`. -# -# @example -# # bad -# caller[1] -# caller.first -# caller_locations[1] -# caller_locations.first -# -# # good -# caller(2..2).first -# caller(1..1).first -# caller_locations(2..2).first -# caller_locations(1..1).first -# -# source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#20 -class RuboCop::Cop::Performance::Caller < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#33 - def caller_with_scope_method?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#40 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#26 - def slow_caller?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#61 - def int_value(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#23 -RuboCop::Cop::Performance::Caller::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/caller.rb#24 -RuboCop::Cop::Performance::Caller::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Reordering `when` conditions with a splat to the end -# of the `when` branches can improve performance. -# -# Ruby has to allocate memory for the splat expansion every time -# that the `case` `when` statement is run. Since Ruby does not support -# fall through inside of `case` `when`, like some other languages do, -# the order of the `when` branches should not matter. By placing any -# splat expansions at the end of the list of `when` branches we will -# reduce the number of times that memory has to be allocated for -# the expansion. The exception to this is if multiple of your `when` -# conditions can be true for any given condition. A likely scenario for -# this defining a higher level when condition to override a condition -# that is inside of the splat expansion. -# -# @example -# # bad -# case foo -# when *condition -# bar -# when baz -# foobar -# end -# -# case foo -# when *[1, 2, 3, 4] -# bar -# when 5 -# baz -# end -# -# # good -# case foo -# when baz -# foobar -# when *condition -# bar -# end -# -# case foo -# when 1, 2, 3, 4 -# bar -# when 5 -# baz -# end -# -# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#58 -class RuboCop::Cop::Performance::CaseWhenSplat < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#66 - def on_case(case_node); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#83 - def autocorrect(corrector, when_node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#140 - def indent_for(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#100 - def inline_fix_branch(corrector, when_node); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#164 - def needs_reorder?(when_node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#136 - def new_branch_without_then(node, new_condition); end - - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#132 - def new_condition_with_then(node, new_condition); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#158 - def non_splat?(condition); end - - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#91 - def range(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#107 - def reorder_condition(corrector, when_node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#116 - def reordering_correction(when_node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#95 - def replacement(conditions); end - - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#144 - def splat_offenses(when_conditions); end - - # source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#126 - def when_branch_range(when_node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#64 -RuboCop::Cop::Performance::CaseWhenSplat::ARRAY_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/case_when_splat.rb#63 -RuboCop::Cop::Performance::CaseWhenSplat::MSG = T.let(T.unsafe(nil), String) - -# Identifies places where a case-insensitive string comparison -# can better be implemented using `casecmp`. -# -# @example -# # bad -# str.downcase == 'abc' -# str.upcase.eql? 'ABC' -# 'abc' == str.downcase -# 'ABC'.eql? str.upcase -# str.downcase == str.downcase -# -# # good -# str.casecmp('ABC').zero? -# 'abc'.casecmp(str).zero? -# -# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#24 -class RuboCop::Cop::Performance::Casecmp < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#45 - def downcase_downcase(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#31 - def downcase_eq(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#38 - def eq_downcase(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#52 - def on_send(node); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#84 - def autocorrect(corrector, node, replacement); end - - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#88 - def build_good_method(method, arg, variable); end - - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#67 - def take_method_apart(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#29 -RuboCop::Cop::Performance::Casecmp::CASE_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#27 -RuboCop::Cop::Performance::Casecmp::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#28 -RuboCop::Cop::Performance::Casecmp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies usages of `array.compact.flatten.map { |x| x.downcase }`. -# Each of these methods (`compact`, `flatten`, `map`) will generate a new intermediate array -# that is promptly thrown away. Instead it is faster to mutate when we know it's safe. -# -# @example -# # bad -# array = ["a", "b", "c"] -# array.compact.flatten.map { |x| x.downcase } -# -# # good -# array = ["a", "b", "c"] -# array.compact! -# array.flatten! -# array.map! { |x| x.downcase } -# array -# -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#21 -class RuboCop::Cop::Performance::ChainArrayAllocation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#54 - def chain_array_allocation?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#62 - def on_send(node); end -end - -# These methods ALWAYS return a new array -# after they're called it's safe to mutate the resulting array -# -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#37 -RuboCop::Cop::Performance::ChainArrayAllocation::ALWAYS_RETURNS_NEW_ARRAY = T.let(T.unsafe(nil), Set) - -# These methods have a mutation alternative. For example :collect -# can be called as :collect! -# -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#45 -RuboCop::Cop::Performance::ChainArrayAllocation::HAS_MUTATION_ALTERNATIVE = T.let(T.unsafe(nil), Set) - -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#50 -RuboCop::Cop::Performance::ChainArrayAllocation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#48 -RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY = T.let(T.unsafe(nil), Set) - -# These methods return a new array only when called without a block. -# -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#33 -RuboCop::Cop::Performance::ChainArrayAllocation::RETURNS_NEW_ARRAY_WHEN_NO_BLOCK = T.let(T.unsafe(nil), Set) - -# These methods return a new array but only sometimes. They must be -# called with an argument. For example: -# -# [1,2].first # => 1 -# [1,2].first(1) # => [1] -# -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#30 -RuboCop::Cop::Performance::ChainArrayAllocation::RETURN_NEW_ARRAY_WHEN_ARGS = T.let(T.unsafe(nil), Set) - -# Identifies places where Array and Hash literals are used within loops. -# It is better to extract them into a local variable or constant -# to avoid unnecessary allocations on each iteration. -# -# You can set the minimum number of elements to consider -# an offense with `MinSize`. -# -# @example -# # bad -# users.select do |user| -# %i[superadmin admin].include?(user.role) -# end -# -# # good -# admin_roles = %i[superadmin admin] -# users.select do |user| -# admin_roles.include?(user.role) -# end -# -# # good -# ADMIN_ROLES = %i[superadmin admin] -# ... -# users.select do |user| -# ADMIN_ROLES.include?(user.role) -# end -# -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#34 -class RuboCop::Cop::Performance::CollectionLiteralInLoop < ::RuboCop::Cop::Base - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#74 - def enumerable_loop?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#68 - def kernel_loop?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#80 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#90 - def check_literal?(node, method); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#128 - def enumerable_method?(method_name); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#110 - def keyword_loop?(type); end - - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#120 - def literal_class(node); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#106 - def loop?(ancestor, node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#132 - def min_size; end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#114 - def node_within_enumerable_loop?(node, ancestor); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#97 - def nonmutable_method_of_array_or_hash?(node, method); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#102 - def parent_is_loop?(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#56 -RuboCop::Cop::Performance::CollectionLiteralInLoop::ARRAY_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#41 -RuboCop::Cop::Performance::CollectionLiteralInLoop::ENUMERABLE_METHOD_NAMES = T.let(T.unsafe(nil), Set) - -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#66 -RuboCop::Cop::Performance::CollectionLiteralInLoop::HASH_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#39 -RuboCop::Cop::Performance::CollectionLiteralInLoop::LOOP_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#35 -RuboCop::Cop::Performance::CollectionLiteralInLoop::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#42 -RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_ARRAY_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#58 -RuboCop::Cop::Performance::CollectionLiteralInLoop::NONMUTATING_HASH_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop-performance//lib/rubocop/cop/performance/collection_literal_in_loop.rb#38 -RuboCop::Cop::Performance::CollectionLiteralInLoop::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) - -# Identifies places where `sort { |a, b| a.foo <=> b.foo }` -# can be replaced by `sort_by(&:foo)`. -# This cop also checks `max` and `min` methods. -# -# @example -# # bad -# array.sort { |a, b| a.foo <=> b.foo } -# array.max { |a, b| a.foo <=> b.foo } -# array.min { |a, b| a.foo <=> b.foo } -# array.sort { |a, b| a[:foo] <=> b[:foo] } -# -# # good -# array.sort_by(&:foo) -# array.sort_by { |v| v.foo } -# array.sort_by do |var| -# var.foo -# end -# array.max_by(&:foo) -# array.min_by(&:foo) -# array.sort_by { |a| a[:foo] } -# -# source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#26 -class RuboCop::Cop::Performance::CompareWithBlock < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#34 - def compare?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#48 - def on_block(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#41 - def replaceable_body?(param0 = T.unsafe(nil), param1, param2); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#105 - def compare_range(send, node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#84 - def message(send, method, var_a, var_b, args); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#69 - def slow_compare?(method, args_a, args_b); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/compare_with_block.rb#30 -RuboCop::Cop::Performance::CompareWithBlock::MSG = T.let(T.unsafe(nil), String) - -# Identifies places where `Concurrent.monotonic_time` -# can be replaced by `Process.clock_gettime(Process::CLOCK_MONOTONIC)`. -# -# @example -# -# # bad -# Concurrent.monotonic_time -# -# # good -# Process.clock_gettime(Process::CLOCK_MONOTONIC) -# -# source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#17 -class RuboCop::Cop::Performance::ConcurrentMonotonicTime < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#23 - def concurrent_monotonic_time?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#28 - def on_send(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#20 -RuboCop::Cop::Performance::ConcurrentMonotonicTime::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/concurrent_monotonic_time.rb#21 -RuboCop::Cop::Performance::ConcurrentMonotonicTime::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Finds regular expressions with dynamic components that are all constants. -# -# Ruby allocates a new Regexp object every time it executes a code containing such -# a regular expression. It is more efficient to extract it into a constant, -# memoize it, or add an `/o` option to perform `#{}` interpolation only once and -# reuse that Regexp object. -# -# @example -# -# # bad -# def tokens(pattern) -# pattern.scan(TOKEN).reject { |token| token.match?(/\A#{SEPARATORS}\Z/) } -# end -# -# # good -# ALL_SEPARATORS = /\A#{SEPARATORS}\Z/ -# def tokens(pattern) -# pattern.scan(TOKEN).reject { |token| token.match?(ALL_SEPARATORS) } -# end -# -# # good -# def tokens(pattern) -# pattern.scan(TOKEN).reject { |token| token.match?(/\A#{SEPARATORS}\Z/o) } -# end -# -# # good -# def separators -# @separators ||= /\A#{SEPARATORS}\Z/ -# end -# -# source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#36 -class RuboCop::Cop::Performance::ConstantRegexp < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#41 - def on_regexp(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#55 - def regexp_escape?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#60 - def include_interpolated_const?(node); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#51 - def within_allowed_assignment?(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/constant_regexp.rb#39 -RuboCop::Cop::Performance::ConstantRegexp::MSG = T.let(T.unsafe(nil), String) - -# Identifies usages of `count` on an `Enumerable` that -# follow calls to `select`, `find_all`, `filter` or `reject`. Querying logic can instead be -# passed to the `count` call. -# -# @example -# # bad -# [1, 2, 3].select { |e| e > 2 }.size -# [1, 2, 3].reject { |e| e > 2 }.size -# [1, 2, 3].select { |e| e > 2 }.length -# [1, 2, 3].reject { |e| e > 2 }.length -# [1, 2, 3].select { |e| e > 2 }.count { |e| e.odd? } -# [1, 2, 3].reject { |e| e > 2 }.count { |e| e.even? } -# array.select(&:value).count -# -# # good -# [1, 2, 3].count { |e| e > 2 } -# [1, 2, 3].count { |e| e < 2 } -# [1, 2, 3].count { |e| e > 2 && e.odd? } -# [1, 2, 3].count { |e| e < 2 && e.even? } -# Model.select('field AS field_one').count -# Model.select(:value).count -# -# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#49 -class RuboCop::Cop::Performance::Count < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#56 - def count_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#63 - def on_send(node); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#79 - def autocorrect(corrector, node, selector_node, selector); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#89 - def eligible_node?(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#132 - def negate_block_pass_as_inline_block(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#111 - def negate_block_pass_reject(corrector, node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#118 - def negate_block_reject(corrector, node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#128 - def negate_expression(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#103 - def negate_reject(corrector, node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#93 - def source_starting_at(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#53 -RuboCop::Cop::Performance::Count::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#54 -RuboCop::Cop::Performance::Count::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# In Ruby 2.5, `String#delete_prefix` has been added. -# -# This cop identifies places where `gsub(/\Aprefix/, '')` and `sub(/\Aprefix/, '')` -# can be replaced by `delete_prefix('prefix')`. -# -# This cop has `SafeMultiline` configuration option that `true` by default because -# `^prefix` is unsafe as it will behave incompatible with `delete_prefix` -# for receiver is multiline string. -# -# The `delete_prefix('prefix')` method is faster than `gsub(/\Aprefix/, '')`. -# -# @example -# -# # bad -# str.gsub(/\Aprefix/, '') -# str.gsub!(/\Aprefix/, '') -# -# str.sub(/\Aprefix/, '') -# str.sub!(/\Aprefix/, '') -# -# # good -# str.delete_prefix('prefix') -# str.delete_prefix!('prefix') -# @example SafeMultiline: true (default) -# -# # good -# str.gsub(/^prefix/, '') -# str.gsub!(/^prefix/, '') -# str.sub(/^prefix/, '') -# str.sub!(/^prefix/, '') -# @example SafeMultiline: false -# -# # bad -# str.gsub(/^prefix/, '') -# str.gsub!(/^prefix/, '') -# str.sub(/^prefix/, '') -# str.sub!(/^prefix/, '') -# -# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#49 -class RuboCop::Cop::Performance::DeletePrefix < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RegexpMetacharacter - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#66 - def delete_prefix_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#70 - def on_send(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#56 -RuboCop::Cop::Performance::DeletePrefix::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#59 -RuboCop::Cop::Performance::DeletePrefix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) - -# source://rubocop-performance//lib/rubocop/cop/performance/delete_prefix.rb#57 -RuboCop::Cop::Performance::DeletePrefix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# In Ruby 2.5, `String#delete_suffix` has been added. -# -# This cop identifies places where `gsub(/suffix\z/, '')` and `sub(/suffix\z/, '')` -# can be replaced by `delete_suffix('suffix')`. -# -# This cop has `SafeMultiline` configuration option that `true` by default because -# `suffix$` is unsafe as it will behave incompatible with `delete_suffix?` -# for receiver is multiline string. -# -# The `delete_suffix('suffix')` method is faster than `gsub(/suffix\z/, '')`. -# -# @example -# -# # bad -# str.gsub(/suffix\z/, '') -# str.gsub!(/suffix\z/, '') -# -# str.sub(/suffix\z/, '') -# str.sub!(/suffix\z/, '') -# -# # good -# str.delete_suffix('suffix') -# str.delete_suffix!('suffix') -# @example SafeMultiline: true (default) -# -# # good -# str.gsub(/suffix$/, '') -# str.gsub!(/suffix$/, '') -# str.sub(/suffix$/, '') -# str.sub!(/suffix$/, '') -# @example SafeMultiline: false -# -# # bad -# str.gsub(/suffix$/, '') -# str.gsub!(/suffix$/, '') -# str.sub(/suffix$/, '') -# str.sub!(/suffix$/, '') -# -# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#49 -class RuboCop::Cop::Performance::DeleteSuffix < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RegexpMetacharacter - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#66 - def delete_suffix_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#70 - def on_send(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#56 -RuboCop::Cop::Performance::DeleteSuffix::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#59 -RuboCop::Cop::Performance::DeleteSuffix::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) - -# source://rubocop-performance//lib/rubocop/cop/performance/delete_suffix.rb#57 -RuboCop::Cop::Performance::DeleteSuffix::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies usages of `first`, `last`, `[0]` or `[-1]` -# chained to `select`, `find_all` or `filter` and change them to use -# `detect` instead. -# -# @example -# # bad -# [].select { |item| true }.first -# [].select { |item| true }.last -# [].find_all { |item| true }.first -# [].find_all { |item| true }.last -# [].filter { |item| true }.first -# [].filter { |item| true }.last -# [].filter { |item| true }[0] -# [].filter { |item| true }[-1] -# -# # good -# [].detect { |item| true } -# [].reverse.detect { |item| true } -# -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#30 -class RuboCop::Cop::Performance::Detect < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#41 - def detect_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#50 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#69 - def accept_first_call?(receiver, body); end - - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#101 - def autocorrect(corrector, node, replacement); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#127 - def lazy?(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#112 - def message_for_method(method, index); end - - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#123 - def preferred_method; end - - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#78 - def register_offense(node, receiver, second_method, index); end - - # source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#93 - def replacement(method, index); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#33 -RuboCop::Cop::Performance::Detect::CANDIDATE_METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#37 -RuboCop::Cop::Performance::Detect::INDEX_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#38 -RuboCop::Cop::Performance::Detect::INDEX_REVERSE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#35 -RuboCop::Cop::Performance::Detect::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#39 -RuboCop::Cop::Performance::Detect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-performance//lib/rubocop/cop/performance/detect.rb#36 -RuboCop::Cop::Performance::Detect::REVERSE_MSG = T.let(T.unsafe(nil), String) - -# Checks for double `#start_with?` or `#end_with?` calls -# separated by `||`. In some cases such calls can be replaced -# with an single `#start_with?`/`#end_with?` call. -# -# `IncludeActiveSupportAliases` configuration option is used to check for -# `starts_with?` and `ends_with?`. These methods are defined by Active Support. -# -# @example -# # bad -# str.start_with?("a") || str.start_with?(Some::CONST) -# str.start_with?("a", "b") || str.start_with?("c") -# str.end_with?(var1) || str.end_with?(var2) -# -# # good -# str.start_with?("a", Some::CONST) -# str.start_with?("a", "b", "c") -# str.end_with?(var1, var2) -# @example IncludeActiveSupportAliases: false (default) -# # good -# str.starts_with?("a", "b") || str.starts_with?("c") -# str.ends_with?(var1) || str.ends_with?(var2) -# -# str.starts_with?("a", "b", "c") -# str.ends_with?(var1, var2) -# @example IncludeActiveSupportAliases: true -# # bad -# str.starts_with?("a", "b") || str.starts_with?("c") -# str.ends_with?(var1) || str.ends_with?(var2) -# -# # good -# str.starts_with?("a", "b", "c") -# str.ends_with?(var1, var2) -# -# source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#41 -class RuboCop::Cop::Performance::DoubleStartEndWith < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#96 - def check_with_active_support_aliases(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#46 - def on_or(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#90 - def two_start_end_with_calls(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#60 - def autocorrect(corrector, first_call_args, second_call_args, combined_args); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#86 - def check_for_active_support_aliases?; end - - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#82 - def combine_args(first_call_args, second_call_args); end - - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#76 - def message(node, receiver, method, combined_args); end - - # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#68 - def process_source(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#44 -RuboCop::Cop::Performance::DoubleStartEndWith::MSG = T.let(T.unsafe(nil), String) - -# Identifies unnecessary use of a regex where `String#end_with?` would suffice. -# -# This cop has `SafeMultiline` configuration option that `true` by default because -# `end$` is unsafe as it will behave incompatible with `end_with?` -# for receiver is multiline string. -# -# @example -# # bad -# 'abc'.match?(/bc\Z/) -# /bc\Z/.match?('abc') -# 'abc' =~ /bc\Z/ -# /bc\Z/ =~ 'abc' -# 'abc'.match(/bc\Z/) -# /bc\Z/.match('abc') -# -# # good -# 'abc'.end_with?('bc') -# @example SafeMultiline: true (default) -# -# # good -# 'abc'.match?(/bc$/) -# /bc$/.match?('abc') -# 'abc' =~ /bc$/ -# /bc$/ =~ 'abc' -# 'abc'.match(/bc$/) -# /bc$/.match('abc') -# @example SafeMultiline: false -# -# # bad -# 'abc'.match?(/bc$/) -# /bc$/.match?('abc') -# 'abc' =~ /bc$/ -# /bc$/ =~ 'abc' -# 'abc'.match(/bc$/) -# /bc$/.match('abc') -# -# source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#49 -class RuboCop::Cop::Performance::EndWith < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RegexpMetacharacter - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#62 - def on_match_with_lvasgn(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#62 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#56 - def redundant_regex?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#53 -RuboCop::Cop::Performance::EndWith::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#54 -RuboCop::Cop::Performance::EndWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Do not compute the size of statically sized objects. -# -# @example -# # String methods -# # bad -# 'foo'.size -# %q[bar].count -# %(qux).length -# -# # Symbol methods -# # bad -# :fred.size -# :'baz'.length -# -# # Array methods -# # bad -# [1, 2, thud].count -# %W(1, 2, bar).size -# -# # Hash methods -# # bad -# { a: corge, b: grault }.length -# -# # good -# foo.size -# bar.count -# qux.length -# -# # good -# :"#{fred}".size -# CONST = :baz.length -# -# # good -# [1, 2, *thud].count -# garply = [1, 2, 3] -# garply.size -# -# # good -# { a: corge, **grault }.length -# waldo = { a: corge, b: grault } -# waldo.size -# -# source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#48 -class RuboCop::Cop::Performance::FixedSize < ::RuboCop::Cop::Base - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#52 - def counter(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#56 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#72 - def allowed_argument?(arg); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#76 - def allowed_parent?(node); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#68 - def allowed_variable?(var); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#86 - def contains_double_splat?(node); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#80 - def contains_splat?(node); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#92 - def non_string_argument?(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#49 -RuboCop::Cop::Performance::FixedSize::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#50 -RuboCop::Cop::Performance::FixedSize::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies usages of `map { ... }.flatten` and -# change them to use `flat_map { ... }` instead. -# -# @example -# # bad -# [1, 2, 3, 4].map { |e| [e, e] }.flatten(1) -# [1, 2, 3, 4].collect { |e| [e, e] }.flatten(1) -# -# # good -# [1, 2, 3, 4].flat_map { |e| [e, e] } -# [1, 2, 3, 4].map { |e| [e, e] }.flatten -# [1, 2, 3, 4].collect { |e| [e, e] }.flatten -# -# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#18 -class RuboCop::Cop::Performance::FlatMap < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#28 - def flat_map_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#39 - def on_send(node); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#72 - def autocorrect(corrector, node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#52 - def offense_for_levels(node, map_node, first_method, flatten); end - - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#58 - def offense_for_method(node, map_node, first_method, flatten); end - - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#62 - def register_offense(node, map_node, first_method, flatten, message); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#24 -RuboCop::Cop::Performance::FlatMap::FLATTEN_MULTIPLE_LEVELS = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#22 -RuboCop::Cop::Performance::FlatMap::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#23 -RuboCop::Cop::Performance::FlatMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for inefficient searching of keys and values within -# hashes. -# -# `Hash#keys.include?` is less efficient than `Hash#key?` because -# the former allocates a new array and then performs an O(n) search -# through that array, while `Hash#key?` does not allocate any array and -# performs a faster O(1) search for the key. -# -# `Hash#values.include?` is less efficient than `Hash#value?`. While they -# both perform an O(n) search through all of the values, calling `values` -# allocates a new array while using `value?` does not. -# -# @example -# # bad -# { a: 1, b: 2 }.keys.include?(:a) -# { a: 1, b: 2 }.keys.include?(:z) -# h = { a: 1, b: 2 }; h.keys.include?(100) -# -# # good -# { a: 1, b: 2 }.key?(:a) -# { a: 1, b: 2 }.has_key?(:z) -# h = { a: 1, b: 2 }; h.key?(100) -# -# # bad -# { a: 1, b: 2 }.values.include?(2) -# { a: 1, b: 2 }.values.include?('garbage') -# h = { a: 1, b: 2 }; h.values.include?(nil) -# -# # good -# { a: 1, b: 2 }.value?(2) -# { a: 1, b: 2 }.has_value?('garbage') -# h = { a: 1, b: 2 }; h.value?(nil) -# -# source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#42 -class RuboCop::Cop::Performance::InefficientHashSearch < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#47 - def inefficient_include?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#51 - def on_send(node); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#89 - def autocorrect_argument(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#93 - def autocorrect_hash_expression(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#73 - def autocorrect_method(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#80 - def current_method(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#69 - def message(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#84 - def use_long_method; end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/inefficient_hash_search.rb#45 -RuboCop::Cop::Performance::InefficientHashSearch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where inefficient `readlines` method -# can be replaced by `each_line` to avoid fully loading file content into memory. -# -# @example -# -# # bad -# File.readlines('testfile').each { |l| puts l } -# IO.readlines('testfile', chomp: true).each { |l| puts l } -# -# conn.readlines(10).map { |l| l.size } -# file.readlines.find { |l| l.start_with?('#') } -# file.readlines.each { |l| puts l } -# -# # good -# File.open('testfile', 'r').each_line { |l| puts l } -# IO.open('testfile').each_line(chomp: true) { |l| puts l } -# -# conn.each_line(10).map { |l| l.size } -# file.each_line.find { |l| l.start_with?('#') } -# file.each_line { |l| puts l } -# -# source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#27 -class RuboCop::Cop::Performance::IoReadlines < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#42 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#34 - def readlines_on_class?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#38 - def readlines_on_instance?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#58 - def autocorrect(corrector, enumerable_call, readlines_call, receiver); end - - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#90 - def build_bad_method(enumerable_call); end - - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#106 - def build_call_args(call_args_node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#82 - def build_good_method(enumerable_call); end - - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#94 - def correction_range(enumerable_call, readlines_call); end - - # source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#76 - def offense_range(enumerable_call, readlines_call); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#31 -RuboCop::Cop::Performance::IoReadlines::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/io_readlines.rb#32 -RuboCop::Cop::Performance::IoReadlines::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# In Ruby 2.7, `Enumerable#filter_map` has been added. -# -# This cop identifies places where `map { ... }.compact` can be replaced by `filter_map`. -# -# [source,ruby] -# ---- -# [true, false, nil].compact #=> [true, false] -# [true, false, nil].filter_map(&:itself) #=> [true] -# ---- -# -# @example -# # bad -# ary.map(&:foo).compact -# ary.collect(&:foo).compact -# -# # good -# ary.filter_map(&:foo) -# ary.map(&:foo).compact! -# ary.compact.map(&:foo) -# -# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#30 -class RuboCop::Cop::Performance::MapCompact < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#40 - def map_compact(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#53 - def on_send(node); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#93 - def compact_method_with_final_newline_range(compact_method_range); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#89 - def invoke_method_after_map_compact_on_same_line?(compact_node, chained_method); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#85 - def map_method_and_compact_method_on_same_line?(map_node, compact_node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#67 - def remove_compact_method(corrector, map_node, compact_node, chained_method); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#81 - def use_dot?(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#35 -RuboCop::Cop::Performance::MapCompact::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#36 -RuboCop::Cop::Performance::MapCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where methods are converted to blocks, with the -# use of `&method`, and passed as arguments to method calls. -# It is faster to replace those with explicit blocks, calling those methods inside. -# -# @example -# # bad -# array.map(&method(:do_something)) -# [1, 2, 3].each(&out.method(:puts)) -# -# # good -# array.map { |x| do_something(x) } -# [1, 2, 3].each { |x| out.puts(x) } -# -# source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#19 -class RuboCop::Cop::Performance::MethodObjectAsBlock < ::RuboCop::Cop::Base - # source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#22 - def method_object_as_argument?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#26 - def on_block_pass(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/method_object_as_block.rb#20 -RuboCop::Cop::Performance::MethodObjectAsBlock::MSG = T.let(T.unsafe(nil), String) - -# Checks for `OpenStruct.new` calls. -# Instantiation of an `OpenStruct` invalidates -# Ruby global method cache as it causes dynamic method -# definition during program runtime. -# This could have an effect on performance, -# especially in case of single-threaded -# applications with multiple `OpenStruct` instantiations. -# -# @example -# # bad -# class MyClass -# def my_method -# OpenStruct.new(my_key1: 'my_value1', my_key2: 'my_value2') -# end -# end -# -# # good -# class MyClass -# MyStruct = Struct.new(:my_key1, :my_key2) -# def my_method -# MyStruct.new('my_value1', 'my_value2') -# end -# end -# -# source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#34 -class RuboCop::Cop::Performance::OpenStruct < ::RuboCop::Cop::Base - # source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#42 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#38 - def open_struct(param0 = T.unsafe(nil)); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#35 -RuboCop::Cop::Performance::OpenStruct::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/open_struct.rb#36 -RuboCop::Cop::Performance::OpenStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies uses of `Range#include?` and `Range#member?`, which iterates over each -# item in a `Range` to see if a specified item is there. In contrast, -# `Range#cover?` simply compares the target item with the beginning and -# end points of the `Range`. In a great majority of cases, this is what -# is wanted. -# -# @example -# # bad -# ('a'..'z').include?('b') # => true -# ('a'..'z').member?('b') # => true -# -# # good -# ('a'..'z').cover?('b') # => true -# -# # Example of a case where `Range#cover?` may not provide -# # the desired result: -# -# ('a'..'z').cover?('yellow') # => true -# -# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#28 -class RuboCop::Cop::Performance::RangeInclude < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#43 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#39 - def range_include(param0 = T.unsafe(nil)); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#31 -RuboCop::Cop::Performance::RangeInclude::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#32 -RuboCop::Cop::Performance::RangeInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies the use of a `&block` parameter and `block.call` -# where `yield` would do just as well. -# -# @example -# # bad -# def method(&block) -# block.call -# end -# def another(&func) -# func.call 1, 2, 3 -# end -# -# # good -# def method -# yield -# end -# def another -# yield 1, 2, 3 -# end -# -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#25 -class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#43 - def blockarg_assigned?(param0, param1); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#39 - def blockarg_calls(param0, param1); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#34 - def blockarg_def(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#47 - def on_def(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#47 - def on_defs(node); end - - private - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#97 - def args_include_block_pass?(blockcall); end - - # offenses are registered on the `block.call` nodes - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#63 - def autocorrect(corrector, node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#81 - def calls_to_report(argname, body); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#91 - def shadowed_block_argument?(body, block_argument_of_method_signature); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#31 -RuboCop::Cop::Performance::RedundantBlockCall::CLOSE_PAREN = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#28 -RuboCop::Cop::Performance::RedundantBlockCall::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#30 -RuboCop::Cop::Performance::RedundantBlockCall::OPEN_PAREN = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#32 -RuboCop::Cop::Performance::RedundantBlockCall::SPACE = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#29 -RuboCop::Cop::Performance::RedundantBlockCall::YIELD = T.let(T.unsafe(nil), String) - -# Checks for uses `Enumerable#all?`, `Enumerable#any?`, `Enumerable#one?`, -# and `Enumerable#none?` are compared with `===` or similar methods in block. -# -# By default, `Object#===` behaves the same as `Object#==`, but this -# behavior is appropriately overridden in subclass. For example, -# `Range#===` returns `true` when argument is within the range. -# -# This cop has `AllowRegexpMatch` option and it is true by default because -# `regexp.match?('string')` often used in block changes to the opposite result: -# -# [source,ruby] -# ---- -# [/pattern/].all? { |regexp| regexp.match?('pattern') } # => true -# [/pattern/].all? { |regexp| regexp =~ 'pattern' } # => true -# [/pattern/].all?('pattern') # => false -# ---- -# -# @example -# # bad -# items.all? { |item| pattern === item } -# items.all? { |item| item == other } -# items.all? { |item| item.is_a?(Klass) } -# items.all? { |item| item.kind_of?(Klass) } -# -# # good -# items.all?(pattern) -# items.all?(Klass) -# @example AllowRegexpMatch: true (default) -# -# # good -# items.all? { |item| item =~ pattern } -# items.all? { |item| item.match?(pattern) } -# @example AllowRegexpMatch: false -# -# # bad -# items.all? { |item| item =~ pattern } -# items.all? { |item| item.match?(pattern) } -# -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#49 -class RuboCop::Cop::Performance::RedundantEqualityComparisonBlock < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#62 - def on_block(node); end - - private - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#131 - def allow_regexp_match?; end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#104 - def new_argument(block_argument, block_body); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#127 - def offense_range(node); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#82 - def one_block_argument?(block_arguments); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#94 - def same_block_argument_and_is_a_argument?(block_body, block_argument); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#118 - def use_block_argument_in_method_argument_of_operand?(block_argument, operand); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#86 - def use_equality_comparison_block?(block_body); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#58 -RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::COMPARISON_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#60 -RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::IS_A_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#55 -RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#59 -RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::REGEXP_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_equality_comparison_block.rb#57 -RuboCop::Cop::Performance::RedundantEqualityComparisonBlock::TARGET_METHODS = T.let(T.unsafe(nil), Array) - -# Identifies the use of `Regexp#match` or `String#match`, which -# returns `#<MatchData>`/`nil`. The return value of `=~` is an integral -# index/`nil` and is more performant. -# -# @example -# # bad -# do_something if str.match(/regex/) -# while regex.match('str') -# do_something -# end -# -# # good -# method(str =~ /regex/) -# return value unless regex =~ 'str' -# -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#20 -class RuboCop::Cop::Performance::RedundantMatch < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#28 - def match_call?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#37 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#33 - def only_truthiness_matters?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#49 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#55 - def autocorrectable?(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#23 -RuboCop::Cop::Performance::RedundantMatch::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_match.rb#24 -RuboCop::Cop::Performance::RedundantMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where `Hash#merge!` can be replaced by `Hash#[]=`. -# You can set the maximum number of key-value pairs to consider -# an offense with `MaxKeyValuePairs`. -# -# @example -# # bad -# hash.merge!(a: 1) -# hash.merge!({'key' => 'value'}) -# -# # good -# hash[:a] = 1 -# hash['key'] = 'value' -# @example MaxKeyValuePairs: 2 (default) -# # bad -# hash.merge!(a: 1, b: 2) -# -# # good -# hash[:a] = 1 -# hash[:b] = 2 -# -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#30 -class RuboCop::Cop::Performance::RedundantMerge < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#48 - def modifier_flow_control?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#52 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#44 - def redundant_merge_candidate(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#106 - def correct_multiple_elements(corrector, node, parent, new_source); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#118 - def correct_single_element(corrector, node, new_source); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#79 - def each_redundant_merge(node); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#98 - def kwsplat_used?(pairs); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#144 - def leading_spaces(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#148 - def max_key_value_pairs; end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#71 - def message(node); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#87 - def non_redundant_merge?(node, receiver, pairs); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#94 - def non_redundant_pairs?(receiver, pairs); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#102 - def non_redundant_value_used?(receiver, node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#132 - def rewrite_with_modifier(node, parent, new_source); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#122 - def to_assignments(receiver, pairs); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#34 -RuboCop::Cop::Performance::RedundantMerge::AREF_ASGN = T.let(T.unsafe(nil), String) - -# A utility class for checking the use of values within an -# `each_with_object` call. -# -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#154 -class RuboCop::Cop::Performance::RedundantMerge::EachWithObjectInspector - extend ::RuboCop::AST::NodePattern::Macros - - # @return [EachWithObjectInspector] a new instance of EachWithObjectInspector - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#157 - def initialize(node, receiver); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#188 - def each_with_object_node(param0 = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#162 - def value_used?; end - - private - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#172 - def eligible_receiver?; end - - # Returns the value of attribute node. - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#170 - def node; end - - # Returns the value of attribute receiver. - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#170 - def receiver; end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#176 - def second_argument; end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#183 - def unwind(receiver); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#35 -RuboCop::Cop::Performance::RedundantMerge::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#36 -RuboCop::Cop::Performance::RedundantMerge::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#38 -RuboCop::Cop::Performance::RedundantMerge::WITH_MODIFIER_CORRECTION = T.let(T.unsafe(nil), String) - -# Identifies places where `sort { |a, b| a <=> b }` can be replaced with `sort`. -# -# @example -# # bad -# array.sort { |a, b| a <=> b } -# -# # good -# array.sort -# -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#15 -class RuboCop::Cop::Performance::RedundantSortBlock < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SortBlock - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#21 - def on_block(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#29 - def on_numblock(node); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#40 - def register_offense(send, node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_sort_block.rb#19 -RuboCop::Cop::Performance::RedundantSortBlock::MSG = T.let(T.unsafe(nil), String) - -# Identifies places where `split` argument can be replaced from -# a deterministic regexp to a string. -# -# @example -# # bad -# 'a,b,c'.split(/,/) -# -# # good -# 'a,b,c'.split(',') -# -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#15 -class RuboCop::Cop::Performance::RedundantSplitRegexpArgument < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#27 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#23 - def split_call_with_regexp?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#41 - def determinist_regexp?(regexp_node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#45 - def replacement(regexp_node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#20 -RuboCop::Cop::Performance::RedundantSplitRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#18 -RuboCop::Cop::Performance::RedundantSplitRegexpArgument::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#19 -RuboCop::Cop::Performance::RedundantSplitRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_split_regexp_argument.rb#21 -RuboCop::Cop::Performance::RedundantSplitRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) - -# Checks for redundant `String#chars`. -# -# @example -# # bad -# str.chars[0..2] -# str.chars.slice(0..2) -# str.chars.last -# -# # good -# str[0..2].chars -# -# # bad -# str.chars.first -# str.chars.first(2) -# -# # good -# str[0] -# str[0...2].chars -# str[-1] -# -# # bad -# str.chars.take(2) -# str.chars.length -# str.chars.size -# str.chars.empty? -# -# # good -# str[0...2].chars -# str.length -# str.size -# str.empty? -# -# # For example, if the receiver is an empty string, it will be incompatible. -# # If a negative value is specified for the receiver, `nil` is returned. -# str.chars.last(2) # Incompatible with `str[-2..-1].chars`. -# str.chars.drop(2) # Incompatible with `str[2..-1].chars`. -# -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#43 -class RuboCop::Cop::Performance::RedundantStringChars < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#54 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#50 - def redundant_chars_call?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#112 - def build_bad_method(method, args); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#125 - def build_call_args(call_args_node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#85 - def build_good_method(method, args); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#100 - def build_good_method_for_brackets_or_first_method(method, args); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#79 - def build_message(method, args); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#75 - def correction_range(receiver, node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#71 - def offense_range(receiver, node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#47 -RuboCop::Cop::Performance::RedundantStringChars::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_string_chars.rb#48 -RuboCop::Cop::Performance::RedundantStringChars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# In Ruby 2.4, `String#match?`, `Regexp#match?`, and `Symbol#match?` -# have been added. The methods are faster than `match`. -# Because the methods avoid creating a `MatchData` object or saving -# backref. -# So, when `MatchData` is not used, use `match?` instead of `match`. -# -# @example -# # bad -# def foo -# if x =~ /re/ -# do_something -# end -# end -# -# # bad -# def foo -# if x !~ /re/ -# do_something -# end -# end -# -# # bad -# def foo -# if x.match(/re/) -# do_something -# end -# end -# -# # bad -# def foo -# if /re/ === x -# do_something -# end -# end -# -# # good -# def foo -# if x.match?(/re/) -# do_something -# end -# end -# -# # good -# def foo -# if !x.match?(/re/) -# do_something -# end -# end -# -# # good -# def foo -# if x =~ /re/ -# do_something(Regexp.last_match) -# end -# end -# -# # good -# def foo -# if x.match(/re/) -# do_something($~) -# end -# end -# -# # good -# def foo -# if /re/ === x -# do_something($~) -# end -# end -# -# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#75 -class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#125 - def last_matches(param0); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#86 - def match_method?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#122 - def match_node?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#97 - def match_operator?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#101 - def match_threequals?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#93 - def match_with_int_arg_method?(param0 = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#105 - def match_with_lvasgn?(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#138 - def on_case(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#134 - def on_if(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#123 - def search_match_nodes(param0); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#161 - def autocorrect(corrector, node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#150 - def check_condition(cond); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#246 - def correct_operator(corrector, recv, arg, oper = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#271 - def correction_range(recv, arg); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#217 - def find_last_match(body, range, scope_root); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#177 - def last_match_used?(match_node); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#242 - def match_gvar?(sym); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#173 - def message(node); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#213 - def modifier_form?(match_node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#199 - def next_match_pos(body, match_node_pos, scope_root); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#186 - def range_to_search_for_last_matches(match_node, body, scope_root); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#255 - def replace_with_match_predicate_method(corrector, recv, arg, op_range); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#224 - def scope_body(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#236 - def scope_root(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#266 - def swap_receiver_and_arg(corrector, recv, arg); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#112 -RuboCop::Cop::Performance::RegexpMatch::MATCH_NODE_PATTERN = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#84 -RuboCop::Cop::Performance::RegexpMatch::MSG = T.let(T.unsafe(nil), String) - -# Constants are included in this list because it is unlikely that -# someone will store `nil` as a constant and then use it for comparison -# -# source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#83 -RuboCop::Cop::Performance::RegexpMatch::TYPES_IMPLEMENTING_MATCH = T.let(T.unsafe(nil), Array) - -# Identifies usages of `reverse.each` and change them to use `reverse_each` instead. -# -# If the return value is used, it will not be detected because the result will be different. -# -# [source,ruby] -# ---- -# [1, 2, 3].reverse.each {} #=> [3, 2, 1] -# [1, 2, 3].reverse_each {} #=> [1, 2, 3] -# ---- -# -# @example -# # bad -# items.reverse.each -# -# # good -# items.reverse_each -# -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#22 -class RuboCop::Cop::Performance::ReverseEach < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#33 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#29 - def reverse_each?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#53 - def offense_range(node); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#47 - def use_return_value?(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#26 -RuboCop::Cop::Performance::ReverseEach::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_each.rb#27 -RuboCop::Cop::Performance::ReverseEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where `reverse.first(n)` and `reverse.first` -# can be replaced by `last(n).reverse` and `last`. -# -# @example -# -# # bad -# array.reverse.first(5) -# array.reverse.first -# -# # good -# array.last(5).reverse -# array.last -# -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#19 -class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#30 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#26 - def reverse_first_candidate?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#63 - def build_bad_method(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#55 - def build_good_method(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#49 - def build_message(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#45 - def correction_range(receiver, node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#23 -RuboCop::Cop::Performance::ReverseFirst::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#24 -RuboCop::Cop::Performance::ReverseFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# In Ruby 2.7, `Enumerable#filter_map` has been added. -# -# This cop identifies places where `select.map` can be replaced by `filter_map`. -# -# @example -# # bad -# ary.select(&:foo).map(&:bar) -# ary.filter(&:foo).map(&:bar) -# -# # good -# ary.filter_map { |o| o.bar if o.foo } -# -# source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#18 -class RuboCop::Cop::Performance::SelectMap < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#27 - def bad_method?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#31 - def on_send(node); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#44 - def map_method_candidate(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#54 - def offense_range(node, map_method); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#24 -RuboCop::Cop::Performance::SelectMap::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#25 -RuboCop::Cop::Performance::SelectMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies usages of `count` on an `Array` and `Hash` and change them to `size`. -# -# TODO: Add advanced detection of variables that could -# have been assigned to an array or a hash. -# -# @example -# # bad -# [1, 2, 3].count -# (1..3).to_a.count -# Array[*1..3].count -# Array(1..3).count -# -# # bad -# {a: 1, b: 2, c: 3}.count -# [[:foo, :bar], [1, 2]].to_h.count -# Hash[*('a'..'z')].count -# Hash(key: :value).count -# -# # good -# [1, 2, 3].size -# (1..3).to_a.size -# Array[*1..3].size -# Array(1..3).size -# -# # good -# {a: 1, b: 2, c: 3}.size -# [[:foo, :bar], [1, 2]].to_h.size -# Hash[*('a'..'z')].size -# Hash(key: :value).size -# -# # good -# [1, 2, 3].count { |e| e > 2 } -# -# source://rubocop-performance//lib/rubocop/cop/performance/size.rb#37 -class RuboCop::Cop::Performance::Size < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#43 - def array?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#61 - def count?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#52 - def hash?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#65 - def on_send(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/size.rb#40 -RuboCop::Cop::Performance::Size::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/size.rb#41 -RuboCop::Cop::Performance::Size::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where `sort { |a, b| b <=> a }` -# can be replaced by a faster `sort.reverse`. -# -# @example -# # bad -# array.sort { |a, b| b <=> a } -# -# # good -# array.sort.reverse -# -# source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#16 -class RuboCop::Cop::Performance::SortReverse < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::SortBlock - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#22 - def on_block(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#30 - def on_numblock(node); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#42 - def register_offense(send, node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/sort_reverse.rb#20 -RuboCop::Cop::Performance::SortReverse::MSG = T.let(T.unsafe(nil), String) - -# Identifies places where `gsub(/a+/, 'a')` and `gsub!(/a+/, 'a')` -# can be replaced by `squeeze('a')` and `squeeze!('a')`. -# -# The `squeeze('a')` method is faster than `gsub(/a+/, 'a')`. -# -# @example -# -# # bad -# str.gsub(/a+/, 'a') -# str.gsub!(/a+/, 'a') -# -# # good -# str.squeeze('a') -# str.squeeze!('a') -# -# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#21 -class RuboCop::Cop::Performance::Squeeze < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#38 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#29 - def squeeze_candidate?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#58 - def repeating_literal?(regex_str); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#24 -RuboCop::Cop::Performance::Squeeze::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#27 -RuboCop::Cop::Performance::Squeeze::PREFERRED_METHODS = T.let(T.unsafe(nil), Hash) - -# source://rubocop-performance//lib/rubocop/cop/performance/squeeze.rb#25 -RuboCop::Cop::Performance::Squeeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies unnecessary use of a regex where `String#start_with?` would suffice. -# -# This cop has `SafeMultiline` configuration option that `true` by default because -# `^start` is unsafe as it will behave incompatible with `start_with?` -# for receiver is multiline string. -# -# @example -# # bad -# 'abc'.match?(/\Aab/) -# /\Aab/.match?('abc') -# 'abc' =~ /\Aab/ -# /\Aab/ =~ 'abc' -# 'abc'.match(/\Aab/) -# /\Aab/.match('abc') -# -# # good -# 'abc'.start_with?('ab') -# @example SafeMultiline: true (default) -# -# # good -# 'abc'.match?(/^ab/) -# /^ab/.match?('abc') -# 'abc' =~ /^ab/ -# /^ab/ =~ 'abc' -# 'abc'.match(/^ab/) -# /^ab/.match('abc') -# @example SafeMultiline: false -# -# # bad -# 'abc'.match?(/^ab/) -# /^ab/.match?('abc') -# 'abc' =~ /^ab/ -# /^ab/ =~ 'abc' -# 'abc'.match(/^ab/) -# /^ab/.match('abc') -# -# source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#49 -class RuboCop::Cop::Performance::StartWith < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RegexpMetacharacter - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#62 - def on_match_with_lvasgn(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#62 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#56 - def redundant_regex?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#53 -RuboCop::Cop::Performance::StartWith::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#54 -RuboCop::Cop::Performance::StartWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where string identifier argument can be replaced -# by symbol identifier argument. -# It prevents the redundancy of the internal string-to-symbol conversion. -# -# This cop targets methods that take identifier (e.g. method name) argument -# and the following examples are parts of it. -# -# @example -# -# # bad -# send('do_something') -# attr_accessor 'do_something' -# instance_variable_get('@ivar') -# -# # good -# send(:do_something) -# attr_accessor :do_something -# instance_variable_get(:@ivar) -# -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#25 -class RuboCop::Cop::Performance::StringIdentifierArgument < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#48 - def on_send(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#30 -RuboCop::Cop::Performance::StringIdentifierArgument::COMMAND_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#28 -RuboCop::Cop::Performance::StringIdentifierArgument::MSG = T.let(T.unsafe(nil), String) - -# NOTE: `attr` method is not included in this list as it can cause false positives in Nokogiri API. -# And `attr` may not be used because `Style/Attr` registers an offense. -# https://github.com/rubocop/rubocop-performance/issues/278 -# -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#38 -RuboCop::Cop::Performance::StringIdentifierArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies unnecessary use of a regex where `String#include?` would suffice. -# -# @example -# # bad -# str.match?(/ab/) -# /ab/.match?(str) -# str =~ /ab/ -# /ab/ =~ str -# str.match(/ab/) -# /ab/.match(str) -# -# # good -# str.include?('ab') -# -# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#22 -class RuboCop::Cop::Performance::StringInclude < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#34 - def on_match_with_lvasgn(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#34 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#28 - def redundant_regex?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#53 - def literal?(regex_str); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#25 -RuboCop::Cop::Performance::StringInclude::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#26 -RuboCop::Cop::Performance::StringInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where `gsub` can be replaced by `tr` or `delete`. -# -# @example -# # bad -# 'abc'.gsub('b', 'd') -# 'abc'.gsub('a', '') -# 'abc'.gsub(/a/, 'd') -# 'abc'.gsub!('a', 'd') -# -# # good -# 'abc'.gsub(/.*/, 'a') -# 'abc'.gsub(/a+/, 'd') -# 'abc'.tr('b', 'd') -# 'a b c'.delete(' ') -# -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#20 -class RuboCop::Cop::Performance::StringReplacement < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#37 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#31 - def string_replacement?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#83 - def accept_first_param?(first_param); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#78 - def accept_second_param?(second_param); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#59 - def autocorrect(corrector, node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#99 - def first_source(first_param); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#142 - def message(node, first_source, second_source); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#148 - def method_suffix(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#48 - def offense(node, first_param, second_param); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#128 - def range(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#152 - def remove_second_param(corrector, node, first_param); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#69 - def replace_method(corrector, node, first_source, second_source, first_param); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#132 - def replacement_method(node, first_source, second_source); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#117 - def source_from_regex_constructor(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#110 - def source_from_regex_literal(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#29 -RuboCop::Cop::Performance::StringReplacement::BANG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#27 -RuboCop::Cop::Performance::StringReplacement::DELETE = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#26 -RuboCop::Cop::Performance::StringReplacement::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#24 -RuboCop::Cop::Performance::StringReplacement::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#25 -RuboCop::Cop::Performance::StringReplacement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-performance//lib/rubocop/cop/performance/string_replacement.rb#28 -RuboCop::Cop::Performance::StringReplacement::TR = T.let(T.unsafe(nil), String) - -# Identifies places where custom code finding the sum of elements -# in some Enumerable object can be replaced by `Enumerable#sum` method. -# -# @example OnlySumOrWithInitialValue: false (default) -# # bad -# [1, 2, 3].inject(:+) # Autocorrections for cases without initial value are unsafe -# [1, 2, 3].inject(&:+) # and will only be performed when using the `-A` option. -# [1, 2, 3].reduce { |acc, elem| acc + elem } # They can be prohibited completely using `SafeAutoCorrect: true`. -# [1, 2, 3].reduce(10, :+) -# [1, 2, 3].map { |elem| elem ** 2 }.sum -# [1, 2, 3].collect(&:count).sum(10) -# -# # good -# [1, 2, 3].sum -# [1, 2, 3].sum(10) -# [1, 2, 3].sum { |elem| elem ** 2 } -# [1, 2, 3].sum(10, &:count) -# @example OnlySumOrWithInitialValue: true -# # bad -# [1, 2, 3].reduce(10, :+) -# [1, 2, 3].map { |elem| elem ** 2 }.sum -# [1, 2, 3].collect(&:count).sum(10) -# -# # good -# [1, 2, 3].sum(10) -# [1, 2, 3].sum { |elem| elem ** 2 } -# [1, 2, 3].sum(10, &:count) -# -# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#70 -class RuboCop::Cop::Performance::Sum < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - extend ::RuboCop::Cop::TargetRubyVersion - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#102 - def acc_plus_elem?(param0 = T.unsafe(nil), param1, param2); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#102 - def elem_plus_acc?(param0 = T.unsafe(nil), param1, param2); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#114 - def on_block(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#107 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#82 - def sum_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#86 - def sum_map_candidate?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#95 - def sum_with_block_candidate?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#159 - def array_literal?(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#164 - def autocorrect(corrector, init, range); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#172 - def autocorrect_sum_map(corrector, sum, map, init); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#248 - def build_block_bad_method(method, init, var_acc, var_elem, body); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#215 - def build_block_message(send, init, var_acc, var_elem, body); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#221 - def build_good_method(init, block_pass = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#234 - def build_method_bad_method(init, method, operation); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#197 - def build_method_message(node, method, init, operation); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#208 - def build_sum_map_message(method, init); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#154 - def empty_array_literal?(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#129 - def handle_sum_candidate(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#142 - def handle_sum_map_candidate(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#259 - def method_call_with_args_range(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#193 - def sum_block_range(send, node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#189 - def sum_map_range(map, sum); end - - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#185 - def sum_method_range(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#77 -RuboCop::Cop::Performance::Sum::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#78 -RuboCop::Cop::Performance::Sum::MSG_IF_NO_INIT_VALUE = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#80 -RuboCop::Cop::Performance::Sum::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for .times.map calls. -# In most cases such calls can be replaced -# with an explicit array creation. -# -# @example -# # bad -# 9.times.map do |i| -# i.to_s -# end -# -# # good -# Array.new(9) do |i| -# i.to_s -# end -# -# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#32 -class RuboCop::Cop::Performance::TimesMap < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#43 - def on_block(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#43 - def on_numblock(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#39 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#69 - def times_map_call(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#50 - def check(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#60 - def message(map_or_collect, count); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#35 -RuboCop::Cop::Performance::TimesMap::MESSAGE = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#36 -RuboCop::Cop::Performance::TimesMap::MESSAGE_ONLY_IF = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#37 -RuboCop::Cop::Performance::TimesMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# In Ruby 2.3 or later, use unary plus operator to unfreeze a string -# literal instead of `String#dup` and `String.new`. -# Unary plus operator is faster than `String#dup`. -# -# @example -# # bad -# ''.dup -# "something".dup -# String.new -# String.new('') -# String.new('something') -# -# # good -# +'something' -# +'' -# -# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#27 -class RuboCop::Cop::Performance::UnfreezeString < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#33 - def dup_string?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#44 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#37 - def string_new?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#57 - def string_value(node); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#30 -RuboCop::Cop::Performance::UnfreezeString::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/unfreeze_string.rb#31 -RuboCop::Cop::Performance::UnfreezeString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Identifies places where `URI::Parser.new` can be replaced by `URI::DEFAULT_PARSER`. -# -# @example -# # bad -# URI::Parser.new -# -# # good -# URI::DEFAULT_PARSER -# -# source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#15 -class RuboCop::Cop::Performance::UriDefaultParser < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#27 - def on_send(node); end - - # source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#21 - def uri_parser_new?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#18 -RuboCop::Cop::Performance::UriDefaultParser::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-performance//lib/rubocop/cop/performance/uri_default_parser.rb#19 -RuboCop::Cop::Performance::UriDefaultParser::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Common functionality for handling regexp metacharacters. -# -# source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#6 -module RuboCop::Cop::RegexpMetacharacter - private - - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#63 - def drop_end_metacharacter(regexp_string); end - - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#55 - def drop_start_metacharacter(regexp_string); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#15 - def literal_at_end?(regexp); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#41 - def literal_at_end_with_backslash_z?(regex_str); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#48 - def literal_at_end_with_dollar?(regex_str); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#9 - def literal_at_start?(regexp); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#21 - def literal_at_start_with_backslash_a?(regex_str); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#31 - def literal_at_start_with_caret?(regex_str); end - - # @return [Boolean] - # - # source://rubocop-performance//lib/rubocop/cop/mixin/regexp_metacharacter.rb#71 - def safe_multiline?; end -end - -# Common functionality for cops checking `Enumerable#sort` blocks. -# -# source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#6 -module RuboCop::Cop::SortBlock - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#24 - def replaceable_body?(param0 = T.unsafe(nil), param1, param2); end - - # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#10 - def sort_with_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#17 - def sort_with_numblock?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-performance//lib/rubocop/cop/mixin/sort_block.rb#30 - def sort_range(send, node); end -end - -# RuboCop Performance project namespace -# -# source://rubocop-performance//lib/rubocop/performance.rb#5 -module RuboCop::Performance; end - -# source://rubocop-performance//lib/rubocop/performance.rb#8 -RuboCop::Performance::CONFIG = T.let(T.unsafe(nil), Hash) - -# source://rubocop-performance//lib/rubocop/performance.rb#7 -RuboCop::Performance::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) - -# Because RuboCop doesn't yet support plugins, we have to monkey patch in a -# bit of our configuration. -# -# source://rubocop-performance//lib/rubocop/performance/inject.rb#7 -module RuboCop::Performance::Inject - class << self - # source://rubocop-performance//lib/rubocop/performance/inject.rb#8 - def defaults!; end - end -end - -# source://rubocop-performance//lib/rubocop/performance.rb#6 -RuboCop::Performance::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) - -# This module holds the RuboCop Performance version information. -# -# source://rubocop-performance//lib/rubocop/performance/version.rb#6 -module RuboCop::Performance::Version - class << self - # source://rubocop-performance//lib/rubocop/performance/version.rb#9 - def document_version; end - end -end - -# source://rubocop-performance//lib/rubocop/performance/version.rb#7 -RuboCop::Performance::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi b/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi deleted file mode 100644 index 0799707a..00000000 --- a/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +++ /dev/null @@ -1,328 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-rake` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-rake`. - -# source://rubocop-rake//lib/rubocop/rake/version.rb#3 -module RuboCop; end - -# source://rubocop-rake//lib/rubocop/cop/rake/helper/class_definition.rb#4 -module RuboCop::Cop; end - -# source://rubocop-rake//lib/rubocop/cop/rake/helper/class_definition.rb#5 -module RuboCop::Cop::Rake; end - -# This cop detects class or module definition in a task or namespace, -# because it is defined to the top level. -# It is confusing because the scope looks in the task or namespace, -# but actually it is defined to the top level. -# -# @example -# # bad -# task :foo do -# class C -# end -# end -# -# # bad -# namespace :foo do -# module M -# end -# end -# -# # good - It is also defined to the top level, -# # but it looks expected behavior. -# class C -# end -# task :foo do -# end -# -# source://rubocop-rake//lib/rubocop/cop/rake/class_definition_in_task.rb#31 -class RuboCop::Cop::Rake::ClassDefinitionInTask < ::RuboCop::Cop::Base - # source://rubocop-rake//lib/rubocop/cop/rake/class_definition_in_task.rb#34 - def on_class(node); end - - # source://rubocop-rake//lib/rubocop/cop/rake/class_definition_in_task.rb#34 - def on_module(node); end -end - -# source://rubocop-rake//lib/rubocop/cop/rake/class_definition_in_task.rb#32 -RuboCop::Cop::Rake::ClassDefinitionInTask::MSG = T.let(T.unsafe(nil), String) - -# Rake task definition should have a description with `desc` method. -# It is useful as a documentation of task. And Rake does not display -# task that does not have `desc` by `rake -T`. -# -# Note: This cop does not require description for the default task, -# because the default task is executed with `rake` without command. -# -# @example -# # bad -# task :do_something -# -# # bad -# task :do_something do -# end -# -# # good -# desc 'Do something' -# task :do_something -# -# # good -# desc 'Do something' -# task :do_something do -# end -# -# source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#30 -class RuboCop::Cop::Rake::Desc < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Rake::Helper::OnTask - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#40 - def on_task(node); end - - # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#36 - def prerequisites(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#76 - def can_insert_desc_to?(parent); end - - # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#62 - def parent_and_task(task_node); end - - # @return [Boolean] - # - # source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#50 - def task_with_desc?(node); end -end - -# source://rubocop-rake//lib/rubocop/cop/rake/desc.rb#34 -RuboCop::Cop::Rake::Desc::MSG = T.let(T.unsafe(nil), String) - -# If namespaces are defined with the same name, Rake executes the both namespaces -# in definition order. -# It is redundant. You should squash them into one definition. -# This cop detects it. -# -# @example -# # bad -# namespace :foo do -# task :bar do -# end -# end -# namespace :foo do -# task :hoge do -# end -# end -# -# # good -# namespace :foo do -# task :bar do -# end -# task :hoge do -# end -# end -# -# source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#30 -class RuboCop::Cop::Rake::DuplicateNamespace < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Rake::Helper::OnNamespace - - # @return [DuplicateNamespace] a new instance of DuplicateNamespace - # - # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#35 - def initialize(*_arg0); end - - # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#67 - def message_for_dup(previous:, current:, namespace:); end - - # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#53 - def namespaces(node); end - - # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#40 - def on_namespace(node); end - - # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#76 - def source_location(node); end -end - -# source://rubocop-rake//lib/rubocop/cop/rake/duplicate_namespace.rb#33 -RuboCop::Cop::Rake::DuplicateNamespace::MSG = T.let(T.unsafe(nil), String) - -# If tasks are defined with the same name, Rake executes the both tasks -# in definition order. -# It is misleading sometimes. You should squash them into one definition. -# This cop detects it. -# -# @example -# # bad -# task :foo do -# p 'foo 1' -# end -# task :foo do -# p 'foo 2' -# end -# -# # good -# task :foo do -# p 'foo 1' -# p 'foo 2' -# end -# -# source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#26 -class RuboCop::Cop::Rake::DuplicateTask < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Rake::Helper::OnTask - - # @return [DuplicateTask] a new instance of DuplicateTask - # - # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#31 - def initialize(*_arg0); end - - # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#66 - def message_for_dup(previous:, current:, task_name:); end - - # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#52 - def namespaces(node); end - - # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#36 - def on_task(node); end - - # source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#75 - def source_location(node); end -end - -# source://rubocop-rake//lib/rubocop/cop/rake/duplicate_task.rb#29 -RuboCop::Cop::Rake::DuplicateTask::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rake//lib/rubocop/cop/rake/helper/class_definition.rb#6 -module RuboCop::Cop::Rake::Helper; end - -# source://rubocop-rake//lib/rubocop/cop/rake/helper/class_definition.rb#7 -module RuboCop::Cop::Rake::Helper::ClassDefinition - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::Cop::Rake::Helper::ClassDefinition - - # source://rubocop-rake//lib/rubocop/cop/rake/helper/class_definition.rb#11 - def class_definition?(param0 = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop-rake//lib/rubocop/cop/rake/helper/class_definition.rb#22 - def in_class_definition?(node); end -end - -# source://rubocop-rake//lib/rubocop/cop/rake/helper/on_namespace.rb#7 -module RuboCop::Cop::Rake::Helper::OnNamespace - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop-rake//lib/rubocop/cop/rake/helper/on_namespace.rb#10 - def namespace?(param0 = T.unsafe(nil)); end - - # source://rubocop-rake//lib/rubocop/cop/rake/helper/on_namespace.rb#14 - def on_send(node); end -end - -# source://rubocop-rake//lib/rubocop/cop/rake/helper/on_task.rb#7 -module RuboCop::Cop::Rake::Helper::OnTask - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop-rake//lib/rubocop/cop/rake/helper/on_task.rb#14 - def on_send(node); end - - # source://rubocop-rake//lib/rubocop/cop/rake/helper/on_task.rb#10 - def task?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-rake//lib/rubocop/cop/rake/helper/task_definition.rb#7 -module RuboCop::Cop::Rake::Helper::TaskDefinition - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::Cop::Rake::Helper::TaskDefinition - - # @return [Boolean] - # - # source://rubocop-rake//lib/rubocop/cop/rake/helper/task_definition.rb#19 - def in_task_or_namespace?(node); end - - # source://rubocop-rake//lib/rubocop/cop/rake/helper/task_definition.rb#11 - def task_or_namespace?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-rake//lib/rubocop/cop/rake/helper/task_name.rb#7 -module RuboCop::Cop::Rake::Helper::TaskName - extend ::RuboCop::Cop::Rake::Helper::TaskName - - # source://rubocop-rake//lib/rubocop/cop/rake/helper/task_name.rb#10 - def task_name(node); end -end - -# This cop detects method definition in a task or namespace, -# because it is defined to the top level. -# It is confusing because the scope looks in the task or namespace, -# but actually it is defined to the top level. -# -# @example -# # bad -# task :foo do -# def helper_method -# do_something -# end -# end -# -# # bad -# namespace :foo do -# def helper_method -# do_something -# end -# end -# -# # good - It is also defined to the top level, -# # but it looks expected behavior. -# def helper_method -# end -# task :foo do -# end -# -# source://rubocop-rake//lib/rubocop/cop/rake/method_definition_in_task.rb#33 -class RuboCop::Cop::Rake::MethodDefinitionInTask < ::RuboCop::Cop::Base - # source://rubocop-rake//lib/rubocop/cop/rake/method_definition_in_task.rb#36 - def on_def(node); end - - # source://rubocop-rake//lib/rubocop/cop/rake/method_definition_in_task.rb#36 - def on_defs(node); end -end - -# source://rubocop-rake//lib/rubocop/cop/rake/method_definition_in_task.rb#34 -RuboCop::Cop::Rake::MethodDefinitionInTask::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rake//lib/rubocop/rake/version.rb#4 -module RuboCop::Rake; end - -# source://rubocop-rake//lib/rubocop/rake.rb#12 -RuboCop::Rake::CONFIG = T.let(T.unsafe(nil), Hash) - -# source://rubocop-rake//lib/rubocop/rake.rb#11 -RuboCop::Rake::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) - -# source://rubocop-rake//lib/rubocop/rake.rb#8 -class RuboCop::Rake::Error < ::StandardError; end - -# Because RuboCop doesn't yet support plugins, we have to monkey patch in a -# bit of our configuration. -# -# source://rubocop-rake//lib/rubocop/rake/inject.rb#9 -module RuboCop::Rake::Inject - class << self - # source://rubocop-rake//lib/rubocop/rake/inject.rb#10 - def defaults!; end - end -end - -# source://rubocop-rake//lib/rubocop/rake.rb#10 -RuboCop::Rake::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) - -# source://rubocop-rake//lib/rubocop/rake/version.rb#5 -RuboCop::Rake::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop-rspec@2.19.0.rbi b/sorbet/rbi/gems/rubocop-rspec@2.19.0.rbi deleted file mode 100644 index 73140c18..00000000 --- a/sorbet/rbi/gems/rubocop-rspec@2.19.0.rbi +++ /dev/null @@ -1,7727 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-rspec` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-rspec`. - -# source://rubocop-rspec//lib/rubocop/rspec.rb#3 -module RuboCop; end - -class RuboCop::AST::Node < ::Parser::AST::Node - include ::RuboCop::RSpec::Node -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/final_end_location.rb#4 -module RuboCop::Cop; end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/final_end_location.rb#5 -module RuboCop::Cop::RSpec; end - -# Checks that left braces for adjacent single line lets are aligned. -# -# @example -# # bad -# let(:foobar) { blahblah } -# let(:baz) { bar } -# let(:a) { b } -# -# # good -# let(:foobar) { blahblah } -# let(:baz) { bar } -# let(:a) { b } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/align_left_let_brace.rb#19 -class RuboCop::Cop::RSpec::AlignLeftLetBrace < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/align_left_let_brace.rb#28 - def on_new_investigation; end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/align_left_let_brace.rb#43 - def token_aligner; end - - class << self - # source://rubocop-rspec//lib/rubocop/cop/rspec/align_left_let_brace.rb#24 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/align_left_let_brace.rb#22 -RuboCop::Cop::RSpec::AlignLeftLetBrace::MSG = T.let(T.unsafe(nil), String) - -# Checks that right braces for adjacent single line lets are aligned. -# -# @example -# # bad -# let(:foobar) { blahblah } -# let(:baz) { bar } -# let(:a) { b } -# -# # good -# let(:foobar) { blahblah } -# let(:baz) { bar } -# let(:a) { b } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/align_right_let_brace.rb#19 -class RuboCop::Cop::RSpec::AlignRightLetBrace < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/align_right_let_brace.rb#28 - def on_new_investigation; end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/align_right_let_brace.rb#43 - def token_aligner; end - - class << self - # source://rubocop-rspec//lib/rubocop/cop/rspec/align_right_let_brace.rb#24 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/align_right_let_brace.rb#22 -RuboCop::Cop::RSpec::AlignRightLetBrace::MSG = T.let(T.unsafe(nil), String) - -# Check that instances are not being stubbed globally. -# -# Prefer instance doubles over stubbing any instance of a class -# -# @example -# # bad -# describe MyClass do -# before { allow_any_instance_of(MyClass).to receive(:foo) } -# end -# -# # good -# describe MyClass do -# let(:my_instance) { instance_double(MyClass) } -# -# before do -# allow(MyClass).to receive(:new).and_return(my_instance) -# allow(my_instance).to receive(:foo) -# end -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/any_instance.rb#26 -class RuboCop::Cop::RSpec::AnyInstance < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/any_instance.rb#34 - def on_send(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/any_instance.rb#27 -RuboCop::Cop::RSpec::AnyInstance::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/any_instance.rb#28 -RuboCop::Cop::RSpec::AnyInstance::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks that around blocks actually run the test. -# -# @example -# # bad -# around do -# some_method -# end -# -# around do |test| -# some_method -# end -# -# # good -# around do |test| -# some_method -# test.call -# end -# -# around do |test| -# some_method -# test.run -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#29 -class RuboCop::Cop::RSpec::AroundBlock < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#45 - def find_arg_usage(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#35 - def hook_block(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#40 - def hook_numblock(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#49 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#59 - def on_numblock(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#67 - def add_no_arg_offense(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#84 - def check_for_numblock(block); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#71 - def check_for_unused_proxy(block, proxy); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#30 -RuboCop::Cop::RSpec::AroundBlock::MSG_NO_ARG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#31 -RuboCop::Cop::RSpec::AroundBlock::MSG_UNUSED_ARG = T.let(T.unsafe(nil), String) - -# @abstract parent class to RSpec cops -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/base.rb#7 -class RuboCop::Cop::RSpec::Base < ::RuboCop::Cop::Base - include ::RuboCop::RSpec::Language - extend ::RuboCop::RSpec::Language::NodePattern - - # Set the config for dynamic DSL configuration-aware helpers - # that have no other means of accessing the configuration. - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/base.rb#20 - def on_new_investigation; end - - class << self - # Invoke the original inherited hook so our cops are recognized - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/base.rb#14 - def inherited(subclass); end - end -end - -# Check for expectations where `be` is used without argument. -# -# The `be` matcher is too generic, as it pass on everything that is not -# nil or false. If that is the exact intend, use `be_truthy`. In all other -# cases it's better to specify what exactly is the expected value. -# -# @example -# # bad -# expect(foo).to be -# -# # good -# expect(foo).to be_truthy -# expect(foo).to be 1.0 -# expect(foo).to be(true) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/be.rb#21 -class RuboCop::Cop::RSpec::Be < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/be.rb#27 - def be_without_args(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/be.rb#31 - def on_send(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/be.rb#22 -RuboCop::Cop::RSpec::Be::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/be.rb#24 -RuboCop::Cop::RSpec::Be::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Check for expectations where `be(...)` can replace `eq(...)`. -# -# The `be` matcher compares by identity while the `eq` matcher compares -# using `==`. Booleans and nil can be compared by identity and therefore -# the `be` matcher is preferable as it is a more strict test. -# -# @example -# # bad -# expect(foo).to eq(true) -# expect(foo).to eq(false) -# expect(foo).to eq(nil) -# -# # good -# expect(foo).to be(true) -# expect(foo).to be(false) -# expect(foo).to be(nil) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/be_eq.rb#26 -class RuboCop::Cop::RSpec::BeEq < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/be_eq.rb#33 - def eq_type_with_identity?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/be_eq.rb#37 - def on_send(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/be_eq.rb#29 -RuboCop::Cop::RSpec::BeEq::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/be_eq.rb#30 -RuboCop::Cop::RSpec::BeEq::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Check for expectations where `be(...)` can replace `eql(...)`. -# -# The `be` matcher compares by identity while the `eql` matcher -# compares using `eql?`. Integers, floats, booleans, symbols, and nil -# can be compared by identity and therefore the `be` matcher is -# preferable as it is a more strict test. -# -# This cop only looks for instances of `expect(...).to eql(...)`. We -# do not check `to_not` or `not_to` since `!eql?` is more strict -# than `!equal?`. We also do not try to flag `eq` because if -# `a == b`, and `b` is comparable by identity, `a` is still not -# necessarily the same type as `b` since the `#==` operator can -# coerce objects for comparison. -# -# @example -# # bad -# expect(foo).to eql(1) -# expect(foo).to eql(1.0) -# expect(foo).to eql(true) -# expect(foo).to eql(false) -# expect(foo).to eql(:bar) -# expect(foo).to eql(nil) -# -# # good -# expect(foo).to be(1) -# expect(foo).to be(1.0) -# expect(foo).to be(true) -# expect(foo).to be(false) -# expect(foo).to be(:bar) -# expect(foo).to be(nil) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/be_eql.rb#40 -class RuboCop::Cop::RSpec::BeEql < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/be_eql.rb#47 - def eql_type_with_identity(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/be_eql.rb#51 - def on_send(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/be_eql.rb#43 -RuboCop::Cop::RSpec::BeEql::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/be_eql.rb#44 -RuboCop::Cop::RSpec::BeEql::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Ensures a consistent style is used when matching `nil`. -# -# You can either use the more specific `be_nil` matcher, or the more -# generic `be` matcher with a `nil` argument. -# -# This cop can be configured using the `EnforcedStyle` option -# -# @example `EnforcedStyle: be_nil` (default) -# # bad -# expect(foo).to be(nil) -# -# # good -# expect(foo).to be_nil -# @example `EnforcedStyle: be` -# # bad -# expect(foo).to be_nil -# -# # good -# expect(foo).to be(nil) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#27 -class RuboCop::Cop::RSpec::BeNil < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#36 - def be_nil_matcher?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#41 - def nil_value_expectation?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#45 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#64 - def check_be_nil_style(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#56 - def check_be_style(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#31 -RuboCop::Cop::RSpec::BeNil::BE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#32 -RuboCop::Cop::RSpec::BeNil::BE_NIL_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#33 -RuboCop::Cop::RSpec::BeNil::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Check that before/after(:all) isn't being used. -# -# @example -# # bad -# # -# # Faster but risk of state leaking between examples -# # -# describe MyClass do -# before(:all) { Widget.create } -# after(:all) { Widget.delete_all } -# end -# -# # good -# # -# # Slower but examples are properly isolated -# # -# describe MyClass do -# before(:each) { Widget.create } -# after(:each) { Widget.delete_all } -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#27 -class RuboCop::Cop::RSpec::BeforeAfterAll < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#36 - def before_or_after_all(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#40 - def on_send(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#28 -RuboCop::Cop::RSpec::BeforeAfterAll::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#33 -RuboCop::Cop::RSpec::BeforeAfterAll::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/current_path_expectation.rb#6 -module RuboCop::Cop::RSpec::Capybara; end - -# Checks that no expectations are set on Capybara's `current_path`. -# -# The -# https://www.rubydoc.info/github/teamcapybara/capybara/master/Capybara/RSpecMatchers#have_current_path-instance_method[`have_current_path` matcher] -# should be used on `page` to set expectations on Capybara's -# current path, since it uses -# https://github.com/teamcapybara/capybara/blob/master/README.md#asynchronous-javascript-ajax-and-friends[Capybara's waiting functionality] -# which ensures that preceding actions (like `click_link`) have -# completed. -# -# This cop does not support autocorrection in some cases. -# -# @example -# # bad -# expect(current_path).to eq('/callback') -# -# # good -# expect(page).to have_current_path('/callback') -# -# # bad (does not support autocorrection) -# expect(page.current_path).to match(variable) -# -# # good -# expect(page).to have_current_path('/callback') -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/current_path_expectation.rb#34 -RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation = RuboCop::Cop::Capybara::CurrentPathExpectation - -# Checks for consistent method usage in feature specs. -# -# By default, the cop disables all Capybara-specific methods that have -# the same native RSpec method (e.g. are just aliases). Some teams -# however may prefer using some of the Capybara methods (like `feature`) -# to make it obvious that the test uses Capybara, while still disable -# the rest of the methods, like `given` (alias for `let`), `background` -# (alias for `before`), etc. You can configure which of the methods to -# be enabled by using the EnabledMethods configuration option. -# -# @example -# # bad -# feature 'User logs in' do -# given(:user) { User.new } -# -# background do -# visit new_session_path -# end -# -# scenario 'with OAuth' do -# # ... -# end -# end -# -# # good -# describe 'User logs in' do -# let(:user) { User.new } -# -# before do -# visit new_session_path -# end -# -# it 'with OAuth' do -# # ... -# end -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#44 -class RuboCop::Cop::RSpec::Capybara::FeatureMethods < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::InsideExampleGroup - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#61 - def capybara_speak(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#66 - def feature_method(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#84 - def message(range); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#72 - def on_block(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#91 - def enabled?(method_name); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#95 - def enabled_methods; end -end - -# https://github.com/teamcapybara/capybara/blob/e283c1aeaa72441f5403963577e16333bf111a81/lib/capybara/rspec/features.rb#L31-L36 -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#51 -RuboCop::Cop::RSpec::Capybara::FeatureMethods::MAP = T.let(T.unsafe(nil), Hash) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#48 -RuboCop::Cop::RSpec::Capybara::FeatureMethods::MSG = T.let(T.unsafe(nil), String) - -# Checks for usage of deprecated style methods. -# -# @example when using `assert_style` -# # bad -# page.find(:css, '#first').assert_style(display: 'block') -# -# # good -# page.find(:css, '#first').assert_matches_style(display: 'block') -# @example when using `has_style?` -# # bad -# expect(page.find(:css, 'first') -# .has_style?(display: 'block')).to be true -# -# # good -# expect(page.find(:css, 'first') -# .matches_style?(display: 'block')).to be true -# @example when using `have_style` -# # bad -# expect(page).to have_style(display: 'block') -# -# # good -# expect(page).to match_style(display: 'block') -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/match_style.rb#34 -RuboCop::Cop::RSpec::Capybara::MatchStyle = RuboCop::Cop::Capybara::MatchStyle - -# Enforces use of `have_no_*` or `not_to` for negated expectations. -# -# @example EnforcedStyle: not_to (default) -# # bad -# expect(page).to have_no_selector -# expect(page).to have_no_css('a') -# -# # good -# expect(page).not_to have_selector -# expect(page).not_to have_css('a') -# @example EnforcedStyle: have_no -# # bad -# expect(page).not_to have_selector -# expect(page).not_to have_css('a') -# -# # good -# expect(page).to have_no_selector -# expect(page).to have_no_css('a') -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/negation_matcher.rb#29 -RuboCop::Cop::RSpec::Capybara::NegationMatcher = RuboCop::Cop::Capybara::NegationMatcher - -# Checks for there is a more specific actions offered by Capybara. -# -# @example -# -# # bad -# find('a').click -# find('button.cls').click -# find('a', exact_text: 'foo').click -# find('div button').click -# -# # good -# click_link -# click_button(class: 'cls') -# click_link(exact_text: 'foo') -# find('div').click_button -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/specific_actions.rb#25 -RuboCop::Cop::RSpec::Capybara::SpecificActions = RuboCop::Cop::Capybara::SpecificActions - -# Checks if there is a more specific finder offered by Capybara. -# -# @example -# # bad -# find('#some-id') -# find('[visible][id=some-id]') -# -# # good -# find_by_id('some-id') -# find_by_id('some-id', visible: true) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/specific_finders.rb#20 -RuboCop::Cop::RSpec::Capybara::SpecificFinders = RuboCop::Cop::Capybara::SpecificFinders - -# Checks for there is a more specific matcher offered by Capybara. -# -# @example -# -# # bad -# expect(page).to have_selector('button') -# expect(page).to have_no_selector('button.cls') -# expect(page).to have_css('button') -# expect(page).to have_no_css('a.cls', href: 'http://example.com') -# expect(page).to have_css('table.cls') -# expect(page).to have_css('select') -# expect(page).to have_css('input', exact_text: 'foo') -# -# # good -# expect(page).to have_button -# expect(page).to have_no_button(class: 'cls') -# expect(page).to have_button -# expect(page).to have_no_link('foo', class: 'cls', href: 'http://example.com') -# expect(page).to have_table(class: 'cls') -# expect(page).to have_select -# expect(page).to have_field('foo') -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/specific_matcher.rb#31 -RuboCop::Cop::RSpec::Capybara::SpecificMatcher = RuboCop::Cop::Capybara::SpecificMatcher - -# Checks for boolean visibility in Capybara finders. -# -# Capybara lets you find elements that match a certain visibility -# using the `:visible` option. `:visible` accepts both boolean and -# symbols as values, however using booleans can have unwanted -# effects. `visible: false` does not find just invisible elements, -# but both visible and invisible elements. For expressiveness and -# clarity, use one of the # symbol values, `:all`, `:hidden` or -# `:visible`. -# Read more in -# https://www.rubydoc.info/gems/capybara/Capybara%2FNode%2FFinders:all[the documentation]. -# -# @example -# # bad -# expect(page).to have_selector('.foo', visible: false) -# expect(page).to have_css('.foo', visible: true) -# expect(page).to have_link('my link', visible: false) -# -# # good -# expect(page).to have_selector('.foo', visible: :visible) -# expect(page).to have_css('.foo', visible: :all) -# expect(page).to have_link('my link', visible: :hidden) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/visibility_matcher.rb#32 -RuboCop::Cop::RSpec::Capybara::VisibilityMatcher = RuboCop::Cop::Capybara::VisibilityMatcher - -# Prefer negated matchers over `to change.by(0)`. -# -# In the case of composite expectations, cop suggest using the -# negation matchers of `RSpec::Matchers#change`. -# -# By default the cop does not support autocorrect of -# compound expectations, but if you set the -# negated matcher for `change`, e.g. `not_change` with -# the `NegatedMatcher` option, the cop will perform the autocorrection. -# -# @example NegatedMatcher: ~ (default) -# # bad -# expect { run }.to change(Foo, :bar).by(0) -# expect { run }.to change { Foo.bar }.by(0) -# -# # bad - compound expectations (does not support autocorrection) -# expect { run } -# .to change(Foo, :bar).by(0) -# .and change(Foo, :baz).by(0) -# expect { run } -# .to change { Foo.bar }.by(0) -# .and change { Foo.baz }.by(0) -# -# # good -# expect { run }.not_to change(Foo, :bar) -# expect { run }.not_to change { Foo.bar } -# -# # good - compound expectations -# define_negated_matcher :not_change, :change -# expect { run } -# .to not_change(Foo, :bar) -# .and not_change(Foo, :baz) -# expect { run } -# .to not_change { Foo.bar } -# .and not_change { Foo.baz } -# @example NegatedMatcher: not_change -# # bad (support autocorrection to good case) -# expect { run } -# .to change(Foo, :bar).by(0) -# .and change(Foo, :baz).by(0) -# expect { run } -# .to change { Foo.bar }.by(0) -# .and change { Foo.baz }.by(0) -# -# # good -# define_negated_matcher :not_change, :change -# expect { run } -# .to not_change(Foo, :bar) -# .and not_change(Foo, :baz) -# expect { run } -# .to not_change { Foo.bar } -# .and not_change { Foo.baz } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#60 -class RuboCop::Cop::RSpec::ChangeByZero < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#85 - def change_nodes(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#68 - def expect_change_with_arguments(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#75 - def expect_change_with_block(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#89 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#118 - def autocorrect(corrector, node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#124 - def autocorrect_compound(corrector, node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#101 - def check_offense(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#114 - def compound_expectations?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#138 - def message_compound; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#134 - def negated_matcher; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#142 - def preferred_method; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#62 -RuboCop::Cop::RSpec::ChangeByZero::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#63 -RuboCop::Cop::RSpec::ChangeByZero::MSG_COMPOUND = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#65 -RuboCop::Cop::RSpec::ChangeByZero::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces consistent use of `be_a` or `be_kind_of`. -# -# @example EnforcedStyle: be_a (default) -# # bad -# expect(object).to be_kind_of(String) -# expect(object).to be_a_kind_of(String) -# -# # good -# expect(object).to be_a(String) -# expect(object).to be_an(String) -# @example EnforcedStyle: be_kind_of -# # bad -# expect(object).to be_a(String) -# expect(object).to be_an(String) -# -# # good -# expect(object).to be_kind_of(String) -# expect(object).to be_a_kind_of(String) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#26 -class RuboCop::Cop::RSpec::ClassCheck < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#54 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#67 - def autocorrect(corrector, node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#71 - def format_message(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#79 - def offending?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#87 - def preferred_method_name; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#83 - def preferred_method_name?(method_name); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#91 - def preferred_method_names; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#32 -RuboCop::Cop::RSpec::ClassCheck::METHOD_NAMES_FOR_BE_A = T.let(T.unsafe(nil), Set) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#37 -RuboCop::Cop::RSpec::ClassCheck::METHOD_NAMES_FOR_KIND_OF = T.let(T.unsafe(nil), Set) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#30 -RuboCop::Cop::RSpec::ClassCheck::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#42 -RuboCop::Cop::RSpec::ClassCheck::PREFERRED_METHOD_NAME_BY_STYLE = T.let(T.unsafe(nil), Hash) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#47 -RuboCop::Cop::RSpec::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Help methods for working with nodes containing comments. -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/comments_help.rb#7 -module RuboCop::Cop::RSpec::CommentsHelp - include ::RuboCop::Cop::RSpec::FinalEndLocation - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/comments_help.rb#17 - def begin_pos_with_comment(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/comments_help.rb#32 - def buffer; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/comments_help.rb#27 - def end_line_position(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/comments_help.rb#10 - def source_range_with_comment(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/comments_help.rb#23 - def start_line_position(node); end -end - -# Prefer `match_array` when matching array values. -# -# @example -# # bad -# it { is_expected.to contain_exactly(*array1, *array2) } -# -# # good -# it { is_expected.to match_array(array1 + array2) } -# -# # good -# it { is_expected.to contain_exactly(content, *array) } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#17 -class RuboCop::Cop::RSpec::ContainExactly < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#23 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#33 - def autocorrect(node, corrector); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#20 -RuboCop::Cop::RSpec::ContainExactly::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#21 -RuboCop::Cop::RSpec::ContainExactly::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# `context` should not be used for specifying methods. -# -# @example -# # bad -# context '#foo_bar' do -# # ... -# end -# -# context '.foo_bar' do -# # ... -# end -# -# # good -# describe '#foo_bar' do -# # ... -# end -# -# describe '.foo_bar' do -# # ... -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/context_method.rb#27 -class RuboCop::Cop::RSpec::ContextMethod < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/context_method.rb#33 - def context_method(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/context_method.rb#41 - def on_block(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/context_method.rb#51 - def method_name?(description); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/context_method.rb#30 -RuboCop::Cop::RSpec::ContextMethod::MSG = T.let(T.unsafe(nil), String) - -# Checks that `context` docstring starts with an allowed prefix. -# -# The default list of prefixes is minimal. Users are encouraged to tailor -# the configuration to meet project needs. Other acceptable prefixes may -# include `if`, `unless`, `for`, `before`, `after`, or `during`. -# They may consist of multiple words if desired. -# -# This cop can be customized allowed context description pattern -# with `AllowedPatterns`. By default, there are no checking by pattern. -# -# @example `Prefixes` configuration -# # .rubocop.yml -# # RSpec/ContextWording: -# # Prefixes: -# # - when -# # - with -# # - without -# # - if -# # - unless -# # - for -# @example -# # bad -# context 'the display name not present' do -# # ... -# end -# -# # good -# context 'when the display name is not present' do -# # ... -# end -# @example `AllowedPatterns` configuration -# -# # .rubocop.yml -# # RSpec/ContextWording: -# # AllowedPatterns: -# # - とき$ -# @example -# # bad -# context '条件を満たす' do -# # ... -# end -# -# # good -# context '条件を満たすとき' do -# # ... -# end -# @see http://www.betterspecs.org/#contexts -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#58 -class RuboCop::Cop::RSpec::ContextWording < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::AllowedPattern - - # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#64 - def context_wording(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#68 - def on_block(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#79 - def allowed_patterns; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#87 - def bad_pattern?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#93 - def description(context); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#101 - def expect_patterns; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#83 - def prefix_regexes; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#111 - def prefixes; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#61 -RuboCop::Cop::RSpec::ContextWording::MSG = T.let(T.unsafe(nil), String) - -# Check that the first argument to the top-level describe is a constant. -# -# It can be configured to ignore strings when certain metadata is passed. -# -# Ignores Rails and Aruba `type` metadata by default. -# -# @example `IgnoredMetadata` configuration -# # .rubocop.yml -# # RSpec/DescribeClass: -# # IgnoredMetadata: -# # type: -# # - request -# # - controller -# @example -# # bad -# describe 'Do something' do -# end -# -# # good -# describe TestedClass do -# subject { described_class } -# end -# -# describe 'TestedClass::VERSION' do -# subject { Object.const_get(self.class.description) } -# end -# -# describe "A feature example", type: :feature do -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#37 -class RuboCop::Cop::RSpec::DescribeClass < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::TopLevelGroup - - # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#44 - def example_group_with_ignored_metadata?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#49 - def not_a_const_described(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#58 - def on_top_level_group(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#54 - def sym_pair(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#79 - def ignored_metadata; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#68 - def ignored_metadata?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#74 - def string_constant?(described); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#40 -RuboCop::Cop::RSpec::DescribeClass::MSG = T.let(T.unsafe(nil), String) - -# Checks that the second argument to `describe` specifies a method. -# -# @example -# # bad -# describe MyClass, 'do something' do -# end -# -# # good -# describe MyClass, '#my_instance_method' do -# end -# -# describe MyClass, '.my_class_method' do -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/describe_method.rb#20 -class RuboCop::Cop::RSpec::DescribeMethod < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::TopLevelGroup - - # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_method.rb#34 - def method_name?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_method.rb#38 - def on_top_level_group(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_method.rb#27 - def second_string_literal_argument(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_method.rb#46 - def method_name_prefix?(description); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/describe_method.rb#23 -RuboCop::Cop::RSpec::DescribeMethod::MSG = T.let(T.unsafe(nil), String) - -# Avoid describing symbols. -# -# @example -# # bad -# describe :my_method do -# # ... -# end -# -# # good -# describe '#my_method' do -# # ... -# end -# @see https://github.com/rspec/rspec-core/issues/1610 -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/describe_symbol.rb#20 -class RuboCop::Cop::RSpec::DescribeSymbol < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_symbol.rb#25 - def describe_symbol?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_symbol.rb#29 - def on_send(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/describe_symbol.rb#21 -RuboCop::Cop::RSpec::DescribeSymbol::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/describe_symbol.rb#22 -RuboCop::Cop::RSpec::DescribeSymbol::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks that tests use `described_class`. -# -# If the first argument of describe is a class, the class is exposed to -# each example via described_class. -# -# This cop can be configured using the `EnforcedStyle` and `SkipBlocks` -# options. -# -# There's a known caveat with rspec-rails's `controller` helper that -# runs its block in a different context, and `described_class` is not -# available to it. `SkipBlocks` option excludes detection in all -# non-RSpec related blocks. -# -# To narrow down this setting to only a specific directory, it is -# possible to use an overriding configuration file local to that -# directory. -# -# @example `EnforcedStyle: described_class` (default) -# # bad -# describe MyClass do -# subject { MyClass.do_something } -# end -# -# # good -# describe MyClass do -# subject { described_class.do_something } -# end -# @example `EnforcedStyle: explicit` -# # bad -# describe MyClass do -# subject { described_class.do_something } -# end -# -# # good -# describe MyClass do -# subject { MyClass.do_something } -# end -# @example `SkipBlocks: true` -# # spec/controllers/.rubocop.yml -# # RSpec/DescribedClass: -# # SkipBlocks: true -# -# # acceptable -# describe MyConcern do -# controller(ApplicationController) do -# include MyConcern -# end -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#57 -class RuboCop::Cop::RSpec::DescribedClass < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RSpec::Namespace - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#66 - def common_instance_exec_closure?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#83 - def contains_described_class?(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#78 - def described_constant(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#86 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#71 - def rspec_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#75 - def scope_changing_syntax?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#103 - def autocorrect(corrector, match); end - - # @example - # # nil represents base constant - # collapse_namespace([], [:C]) # => [:C] - # collapse_namespace([:A, :B], [:C]) # => [:A, :B, :C] - # collapse_namespace([:A, :B], [:B, :C]) # => [:A, :B, :C] - # collapse_namespace([:A, :B], [nil, :C]) # => [nil, :C] - # collapse_namespace([:A, :B], [nil, :B, :C]) # => [nil, :B, :C] - # @param namespace [Array<Symbol>] - # @param const [Array<Symbol>] - # @return [Array<Symbol>] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#179 - def collapse_namespace(namespace, const); end - - # @example - # const_name(s(:const, nil, :C)) # => [:C] - # const_name(s(:const, s(:const, nil, :M), :C)) # => [:M, :C] - # const_name(s(:const, s(:cbase), :C)) # => [nil, :C] - # @param node [RuboCop::AST::Node] - # @return [Array<Symbol>] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#196 - def const_name(node); end - - # @yield [node] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#113 - def find_usage(node, &block); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#164 - def full_const_name(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#123 - def message(offense); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#142 - def offensive?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#150 - def offensive_described_class?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#132 - def scope_change?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#138 - def skippable_block?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#62 -RuboCop::Cop::RSpec::DescribedClass::DESCRIBED_CLASS = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#63 -RuboCop::Cop::RSpec::DescribedClass::MSG = T.let(T.unsafe(nil), String) - -# Avoid opening modules and defining specs within them. -# -# @example -# # bad -# module MyModule -# RSpec.describe MyClass do -# # ... -# end -# end -# -# # good -# RSpec.describe MyModule::MyClass do -# # ... -# end -# @see https://github.com/rubocop/rubocop-rspec/issues/735 -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class_module_wrapping.rb#22 -class RuboCop::Cop::RSpec::DescribedClassModuleWrapping < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class_module_wrapping.rb#26 - def find_rspec_blocks(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class_module_wrapping.rb#30 - def on_module(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class_module_wrapping.rb#23 -RuboCop::Cop::RSpec::DescribedClassModuleWrapping::MSG = T.let(T.unsafe(nil), String) - -# Enforces custom RSpec dialects. -# -# A dialect can be based on the following RSpec methods: -# -# - describe, context, feature, example_group -# - xdescribe, xcontext, xfeature -# - fdescribe, fcontext, ffeature -# - shared_examples, shared_examples_for, shared_context -# - it, specify, example, scenario, its -# - fit, fspecify, fexample, fscenario, focus -# - xit, xspecify, xexample, xscenario, skip -# - pending -# - prepend_before, before, append_before, -# - around -# - prepend_after, after, append_after -# - let, let! -# - subject, subject! -# - expect, is_expected, expect_any_instance_of -# -# By default all of the RSpec methods and aliases are allowed. By setting -# a config like: -# -# RSpec/Dialect: -# PreferredMethods: -# context: describe -# -# You can expect the following behavior: -# -# @example -# # bad -# context 'display name presence' do -# # ... -# end -# -# # good -# describe 'display name presence' do -# # ... -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#45 -class RuboCop::Cop::RSpec::Dialect < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::MethodPreference - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#54 - def on_send(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#52 - def rspec_method?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#49 -RuboCop::Cop::RSpec::Dialect::MSG = T.let(T.unsafe(nil), String) - -# Avoid duplicated metadata. -# -# @example -# # bad -# describe 'Something', :a, :a -# -# # good -# describe 'Something', :a -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/duplicated_metadata.rb#14 -class RuboCop::Cop::RSpec::DuplicatedMetadata < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::Metadata - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/duplicated_metadata.rb#22 - def on_metadata(symbols, _pairs); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/duplicated_metadata.rb#38 - def autocorrect(corrector, node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/duplicated_metadata.rb#50 - def duplicated?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/duplicated_metadata.rb#30 - def on_metadata_symbol(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/duplicated_metadata.rb#20 -RuboCop::Cop::RSpec::DuplicatedMetadata::MSG = T.let(T.unsafe(nil), String) - -# Checks if an example group does not include any tests. -# -# @example usage -# # bad -# describe Bacon do -# let(:bacon) { Bacon.new(chunkiness) } -# let(:chunkiness) { false } -# -# context 'extra chunky' do # flagged by rubocop -# let(:chunkiness) { true } -# end -# -# it 'is chunky' do -# expect(bacon.chunky?).to be_truthy -# end -# end -# -# # good -# describe Bacon do -# let(:bacon) { Bacon.new(chunkiness) } -# let(:chunkiness) { false } -# -# it 'is chunky' do -# expect(bacon.chunky?).to be_truthy -# end -# end -# -# # good -# describe Bacon do -# pending 'will add tests later' -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#38 -class RuboCop::Cop::RSpec::EmptyExampleGroup < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # Match example group blocks and yield their body - # - # @example source that matches - # describe 'example group' do - # it { is_expected.to be } - # end - # @param node [RuboCop::AST::Node] - # @yield [RuboCop::AST::Node] example group body - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#55 - def example_group_body(param0 = T.unsafe(nil)); end - - # Match examples, example groups and includes - # - # @example source that matches - # it { is_expected.to fly } - # describe('non-empty example groups too') { } - # it_behaves_like 'an animal' - # it_behaves_like('a cat') { let(:food) { 'milk' } } - # it_has_root_access - # skip - # it 'will be implemented later' - # @param node [RuboCop::AST::Node] - # @return [Array<RuboCop::AST::Node>] matching nodes - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#73 - def example_or_group_or_include?(param0 = T.unsafe(nil)); end - - # Matches examples defined in scopes where they could run - # - # @example source that matches - # it { expect(myself).to be_run } - # describe { it { i_run_as_well } } - # @example source that does not match - # before { it { whatever here won't run anyway } } - # @param node [RuboCop::AST::Node] - # @return [Array<RuboCop::AST::Node>] matching nodes - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#130 - def examples?(param0 = T.unsafe(nil)); end - - # Match examples or examples inside blocks - # - # @example source that matches - # it { expect(drink).to be_cold } - # context('when winter') { it { expect(drink).to be_hot } } - # (1..5).each { |divisor| it { is_expected.to divide_by(divisor) } } - # @param node [RuboCop::AST::Node] - # @return [Array<RuboCop::AST::Node>] matching nodes - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#111 - def examples_directly_or_in_block?(param0 = T.unsafe(nil)); end - - # Match examples defined inside a block which is not a hook - # - # @example source that matches - # %w(r g b).each do |color| - # it { is_expected.to have_color(color) } - # end - # @example source that does not match - # before do - # it { is_expected.to fall_into_oblivion } - # end - # @param node [RuboCop::AST::Node] - # @return [Array<RuboCop::AST::Node>] matching nodes - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#97 - def examples_inside_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#137 - def on_block(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#163 - def conditionals_with_examples?(body); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#171 - def examples_in_branches?(condition_node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#152 - def offensive?(body); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#175 - def removed_range(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#43 -RuboCop::Cop::RSpec::EmptyExampleGroup::MSG = T.let(T.unsafe(nil), String) - -# Checks for empty before and after hooks. -# -# @example -# # bad -# before {} -# after do; end -# before(:all) do -# end -# after(:all) { } -# -# # good -# before { create_users } -# after do -# cleanup_users -# end -# before(:all) do -# create_feed -# end -# after(:all) { cleanup_feed } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_hook.rb#26 -class RuboCop::Cop::RSpec::EmptyHook < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_hook.rb#33 - def empty_hook?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_hook.rb#37 - def on_block(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_hook.rb#30 -RuboCop::Cop::RSpec::EmptyHook::MSG = T.let(T.unsafe(nil), String) - -# Checks if there is an empty line after example blocks. -# -# @example -# # bad -# RSpec.describe Foo do -# it 'does this' do -# end -# it 'does that' do -# end -# end -# -# # good -# RSpec.describe Foo do -# it 'does this' do -# end -# -# it 'does that' do -# end -# end -# -# # fair - it's ok to have non-separated one-liners -# RSpec.describe Foo do -# it { one } -# it { two } -# end -# @example with AllowConsecutiveOneLiners configuration -# # rubocop.yml -# # RSpec/EmptyLineAfterExample: -# # AllowConsecutiveOneLiners: false -# -# # bad -# RSpec.describe Foo do -# it { one } -# it { two } -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example.rb#43 -class RuboCop::Cop::RSpec::EmptyLineAfterExample < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::FinalEndLocation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RSpec::EmptyLineSeparation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example.rb#49 - def on_block(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example.rb#64 - def allow_consecutive_one_liners?; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example.rb#60 - def allowed_one_liner?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example.rb#68 - def consecutive_one_liner?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example.rb#72 - def next_one_line_example?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example.rb#47 -RuboCop::Cop::RSpec::EmptyLineAfterExample::MSG = T.let(T.unsafe(nil), String) - -# Checks if there is an empty line after example group blocks. -# -# @example -# # bad -# RSpec.describe Foo do -# describe '#bar' do -# end -# describe '#baz' do -# end -# end -# -# # good -# RSpec.describe Foo do -# describe '#bar' do -# end -# -# describe '#baz' do -# end -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example_group.rb#26 -class RuboCop::Cop::RSpec::EmptyLineAfterExampleGroup < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::FinalEndLocation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RSpec::EmptyLineSeparation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example_group.rb#32 - def on_block(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example_group.rb#30 -RuboCop::Cop::RSpec::EmptyLineAfterExampleGroup::MSG = T.let(T.unsafe(nil), String) - -# Checks if there is an empty line after the last let block. -# -# @example -# # bad -# let(:foo) { bar } -# let(:something) { other } -# it { does_something } -# -# # good -# let(:foo) { bar } -# let(:something) { other } -# -# it { does_something } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_final_let.rb#20 -class RuboCop::Cop::RSpec::EmptyLineAfterFinalLet < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::FinalEndLocation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RSpec::EmptyLineSeparation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_final_let.rb#26 - def on_block(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_final_let.rb#24 -RuboCop::Cop::RSpec::EmptyLineAfterFinalLet::MSG = T.let(T.unsafe(nil), String) - -# Checks if there is an empty line after hook blocks. -# -# `AllowConsecutiveOneLiners` configures whether adjacent -# one-line definitions are considered an offense. -# -# @example -# # bad -# before { do_something } -# it { does_something } -# -# # bad -# after { do_something } -# it { does_something } -# -# # bad -# around { |test| test.run } -# it { does_something } -# -# # good -# after { do_something } -# -# it { does_something } -# -# # fair - it's ok to have non-separated one-liners hooks -# around { |test| test.run } -# after { do_something } -# -# it { does_something } -# @example with AllowConsecutiveOneLiners configuration -# # rubocop.yml -# # RSpec/EmptyLineAfterHook: -# # AllowConsecutiveOneLiners: false -# -# # bad -# around { |test| test.run } -# after { do_something } -# -# it { does_something } -# -# # good -# around { |test| test.run } -# -# after { do_something } -# -# it { does_something } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_hook.rb#53 -class RuboCop::Cop::RSpec::EmptyLineAfterHook < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RSpec::FinalEndLocation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RSpec::EmptyLineSeparation - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_hook.rb#60 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_hook.rb#60 - def on_numblock(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_hook.rb#74 - def chained_single_line_hooks?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_hook.rb#58 -RuboCop::Cop::RSpec::EmptyLineAfterHook::MSG = T.let(T.unsafe(nil), String) - -# Checks if there is an empty line after subject block. -# -# @example -# # bad -# subject(:obj) { described_class } -# let(:foo) { bar } -# -# # good -# subject(:obj) { described_class } -# -# let(:foo) { bar } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_subject.rb#18 -class RuboCop::Cop::RSpec::EmptyLineAfterSubject < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::FinalEndLocation - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RSpec::EmptyLineSeparation - include ::RuboCop::Cop::RSpec::InsideExampleGroup - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_subject.rb#25 - def on_block(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_subject.rb#23 -RuboCop::Cop::RSpec::EmptyLineAfterSubject::MSG = T.let(T.unsafe(nil), String) - -# Helps determine the offending location if there is not an empty line -# following the node. Allows comments to follow directly after -# in the following cases. -# - followed by empty line(s) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/empty_line_separation.rb#11 -module RuboCop::Cop::RSpec::EmptyLineSeparation - include ::RuboCop::Cop::RSpec::FinalEndLocation - include ::RuboCop::Cop::RangeHelp - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/empty_line_separation.rb#51 - def last_child?(node); end - - # @yield [offending_loc(enable_directive_line || final_end_line)] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/empty_line_separation.rb#26 - def missing_separating_line(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/empty_line_separation.rb#15 - def missing_separating_line_offense(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/empty_line_separation.rb#41 - def offending_loc(last_line); end -end - -# Checks for long examples. -# -# A long example is usually more difficult to understand. Consider -# extracting out some behavior, e.g. with a `let` block, or a helper -# method. -# -# You can set literals you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', and 'heredoc'. Each literal -# will be counted as one line regardless of its actual size. -# -# @example -# # bad -# it do -# service = described_class.new -# more_setup -# more_setup -# result = service.call -# expect(result).to be(true) -# end -# -# # good -# it do -# service = described_class.new -# result = service.call -# expect(result).to be(true) -# end -# @example CountAsOne: ['array', 'heredoc'] -# -# it do -# array = [ # +1 -# 1, -# 2 -# ] -# -# hash = { # +3 -# key: 'value' -# } -# -# msg = <<~HEREDOC # +1 -# Heredoc -# content. -# HEREDOC -# end # 5 points -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#51 -class RuboCop::Cop::RSpec::ExampleLength < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::CodeLength - - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#56 - def on_block(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#64 - def cop_label; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#54 -RuboCop::Cop::RSpec::ExampleLength::LABEL = T.let(T.unsafe(nil), String) - -# Checks for examples without a description. -# -# RSpec allows for auto-generated example descriptions when there is no -# description provided or the description is an empty one. -# -# This cop removes empty descriptions. -# It also defines whether auto-generated description is allowed, based -# on the configured style. -# -# This cop can be configured using the `EnforcedStyle` option -# -# @example `EnforcedStyle: always_allow` (default) -# # bad -# it('') { is_expected.to be_good } -# it '' do -# result = service.call -# expect(result).to be(true) -# end -# -# # good -# it { is_expected.to be_good } -# it do -# result = service.call -# expect(result).to be(true) -# end -# @example `EnforcedStyle: single_line_only` -# # bad -# it('') { is_expected.to be_good } -# it do -# result = service.call -# expect(result).to be(true) -# end -# -# # good -# it { is_expected.to be_good } -# @example `EnforcedStyle: disallow` -# # bad -# it { is_expected.to be_good } -# it do -# result = service.call -# expect(result).to be(true) -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#51 -class RuboCop::Cop::RSpec::ExampleWithoutDescription < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#59 - def example_description(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#61 - def on_block(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#75 - def check_example_without_description(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#82 - def disallow_empty_description?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#56 -RuboCop::Cop::RSpec::ExampleWithoutDescription::MSG_ADD_DESCRIPTION = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#54 -RuboCop::Cop::RSpec::ExampleWithoutDescription::MSG_DEFAULT_ARGUMENT = T.let(T.unsafe(nil), String) - -# Checks for common mistakes in example descriptions. -# -# This cop will correct docstrings that begin with 'should' and 'it'. -# This cop will also look for insufficient examples and call them out. -# -# The autocorrect is experimental - use with care! It can be configured -# with CustomTransform (e.g. have => has) and IgnoredWords (e.g. only). -# -# Use the DisallowedExamples setting to prevent unclear or insufficient -# descriptions. Please note that this config will not be treated as -# case sensitive. -# -# @example -# # bad -# it 'should find nothing' do -# end -# -# # good -# it 'finds nothing' do -# end -# @example -# # bad -# it 'it does things' do -# end -# -# # good -# it 'does things' do -# end -# @example `DisallowedExamples: ['works']` (default) -# # bad -# it 'works' do -# end -# -# # good -# it 'marks the task as done' do -# end -# @see http://betterspecs.org/#should -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#46 -class RuboCop::Cop::RSpec::ExampleWording < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#58 - def it_description(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#65 - def on_block(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#80 - def add_wording_offense(node, message); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#127 - def custom_transform; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#90 - def docstring(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#131 - def ignored_words; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#135 - def insufficient_docstring?(description_node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#139 - def insufficient_examples; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#144 - def preprocess(message); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#100 - def replacement_text(node); end - - # Recursive processing is required to process nested dstr nodes - # that is the case for \-separated multiline strings with interpolation. - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#116 - def text(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#55 -RuboCop::Cop::RSpec::ExampleWording::IT_PREFIX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#51 -RuboCop::Cop::RSpec::ExampleWording::MSG_INSUFFICIENT_DESCRIPTION = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#50 -RuboCop::Cop::RSpec::ExampleWording::MSG_IT = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#49 -RuboCop::Cop::RSpec::ExampleWording::MSG_SHOULD = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#54 -RuboCop::Cop::RSpec::ExampleWording::SHOULD_PREFIX = T.let(T.unsafe(nil), Regexp) - -# Checks for excessive whitespace in example descriptions. -# -# @example -# # bad -# it ' has excessive spacing ' do -# end -# -# # good -# it 'has excessive spacing' do -# end -# @example -# # bad -# context ' when a condition is met ' do -# end -# -# # good -# context 'when a condition is met' do -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#26 -class RuboCop::Cop::RSpec::ExcessiveDocstringSpacing < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#32 - def example_description(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#39 - def on_send(node); end - - private - - # @param node [RuboCop::AST::Node] - # @param text [String] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#67 - def add_whitespace_offense(node, text); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#76 - def docstring(node); end - - # @param text [String] - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#54 - def excessive_whitespace?(text); end - - # @param text [String] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#61 - def strip_excessive_whitespace(text); end - - # Recursive processing is required to process nested dstr nodes - # that is the case for \-separated multiline strings with interpolation. - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#88 - def text(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#29 -RuboCop::Cop::RSpec::ExcessiveDocstringSpacing::MSG = T.let(T.unsafe(nil), String) - -# Checks for `expect(...)` calls containing literal values. -# -# Autocorrection is performed when the expected is not a literal. -# -# @example -# # bad -# expect(5).to eq(price) -# expect(/foo/).to eq(pattern) -# expect("John").to eq(name) -# -# # good -# expect(price).to eq(5) -# expect(pattern).to eq(/foo/) -# expect(name).to eq("John") -# -# # bad (not supported autocorrection) -# expect(false).to eq(true) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#24 -class RuboCop::Cop::RSpec::ExpectActual < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#56 - def expect_literal(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#67 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#90 - def complex_literal?(node); end - - # This is not implement using a NodePattern because it seems - # to not be able to match against an explicit (nil) sexp - # - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#82 - def literal?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#86 - def simple_literal?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#95 - def swap(corrector, actual, expected); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#44 -RuboCop::Cop::RSpec::ExpectActual::COMPLEX_LITERALS = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#27 -RuboCop::Cop::RSpec::ExpectActual::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#29 -RuboCop::Cop::RSpec::ExpectActual::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#31 -RuboCop::Cop::RSpec::ExpectActual::SIMPLE_LITERALS = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#53 -RuboCop::Cop::RSpec::ExpectActual::SUPPORTED_MATCHERS = T.let(T.unsafe(nil), Array) - -# Checks for consistent style of change matcher. -# -# Enforces either passing object and attribute as arguments to the matcher -# or passing a block that reads the attribute value. -# -# This cop can be configured using the `EnforcedStyle` option. -# -# @example `EnforcedStyle: method_call` (default) -# # bad -# expect { run }.to change { Foo.bar } -# expect { run }.to change { foo.baz } -# -# # good -# expect { run }.to change(Foo, :bar) -# expect { run }.to change(foo, :baz) -# # also good when there are arguments or chained method calls -# expect { run }.to change { Foo.bar(:count) } -# expect { run }.to change { user.reload.name } -# @example `EnforcedStyle: block` -# # bad -# expect { run }.to change(Foo, :bar) -# -# # good -# expect { run }.to change { Foo.bar } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#32 -class RuboCop::Cop::RSpec::ExpectChange < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#41 - def expect_change_with_arguments(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#46 - def expect_change_with_block(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#72 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#60 - def on_send(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#36 -RuboCop::Cop::RSpec::ExpectChange::MSG_BLOCK = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#37 -RuboCop::Cop::RSpec::ExpectChange::MSG_CALL = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#38 -RuboCop::Cop::RSpec::ExpectChange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Do not use `expect` in hooks such as `before`. -# -# @example -# # bad -# before do -# expect(something).to eq 'foo' -# end -# -# # bad -# after do -# expect_any_instance_of(Something).to receive(:foo) -# end -# -# # good -# it do -# expect(something).to eq 'foo' -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_hook.rb#24 -class RuboCop::Cop::RSpec::ExpectInHook < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_hook.rb#28 - def expectation(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_hook.rb#30 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_hook.rb#30 - def on_numblock(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_hook.rb#44 - def message(expect, hook); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_hook.rb#25 -RuboCop::Cop::RSpec::ExpectInHook::MSG = T.let(T.unsafe(nil), String) - -# Checks for opportunities to use `expect { ... }.to output`. -# -# @example -# # bad -# $stdout = StringIO.new -# my_app.print_report -# $stdout = STDOUT -# expect($stdout.string).to eq('Hello World') -# -# # good -# expect { my_app.print_report }.to output('Hello World').to_stdout -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_output.rb#18 -class RuboCop::Cop::RSpec::ExpectOutput < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_output.rb#22 - def on_gvasgn(node); end - - private - - # Detect if we are inside the scope of a single example - # - # We want to encourage using `expect { ... }.to output` so - # we only care about situations where you would replace with - # an expectation. Therefore, assignments to stderr or stdout - # within a `before(:all)` or otherwise outside of an example - # don't matter. - # - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_output.rb#43 - def inside_example_scope?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_output.rb#19 -RuboCop::Cop::RSpec::ExpectOutput::MSG = T.let(T.unsafe(nil), String) - -# A helper for `explicit` style -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#121 -module RuboCop::Cop::RSpec::ExplicitHelper - include ::RuboCop::RSpec::Language - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#182 - def predicate_matcher?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#191 - def predicate_matcher_block?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#135 - def allowed_explicit_matchers; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#139 - def check_explicit(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#215 - def corrector_explicit(corrector, to_node, actual, matcher, block_child); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#175 - def heredoc_argument?(matcher); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#209 - def message_explicit(matcher); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#222 - def move_predicate(corrector, actual, matcher, block_child); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#200 - def predicate_matcher_name?(name); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#162 - def replaceable_matcher?(matcher); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#252 - def replacement_matcher(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#234 - def to_predicate_method(matcher); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#171 - def uncorrectable_matcher?(node, matcher); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#127 -RuboCop::Cop::RSpec::ExplicitHelper::BUILT_IN_MATCHERS = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#125 -RuboCop::Cop::RSpec::ExplicitHelper::MSG_EXPLICIT = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#6 -module RuboCop::Cop::RSpec::FactoryBot; end - -# Always declare attribute values as blocks. -# -# @example -# # bad -# kind [:active, :rejected].sample -# -# # good -# kind { [:active, :rejected].sample } -# -# # bad -# closed_at 1.day.from_now -# -# # good -# closed_at { 1.day.from_now } -# -# # bad -# count 1 -# -# # good -# count { 1 } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#28 -class RuboCop::Cop::RSpec::FactoryBot::AttributeDefinedStatically < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#86 - def association?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#39 - def factory_attributes(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#43 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#34 - def value_matcher(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#120 - def attribute_defining_method?(method_name); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#59 - def autocorrect(corrector, node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#88 - def autocorrect_replacing_parens(corrector, node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#95 - def autocorrect_without_parens(corrector, node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#104 - def braces(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#67 - def offensive_receiver?(receiver, node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#81 - def proc?(attribute); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#73 - def receiver_matches_first_block_argument?(receiver, node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#116 - def reserved_method?(method_name); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#112 - def value_hash_without_braces?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#31 -RuboCop::Cop::RSpec::FactoryBot::AttributeDefinedStatically::MSG = T.let(T.unsafe(nil), String) - -# Use a consistent style for parentheses in factory bot calls. -# -# @example -# -# # bad -# create :user -# build(:user) -# create(:login) -# create :login -# @example `EnforcedStyle: require_parentheses` (default) -# -# # good -# create(:user) -# create(:user) -# create(:login) -# build(:login) -# @example `EnforcedStyle: omit_parentheses` -# -# # good -# create :user -# build :user -# create :login -# create :login -# -# # also good -# # when method name and first argument are not on same line -# create( -# :user -# ) -# build( -# :user, -# name: 'foo' -# ) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb#43 -class RuboCop::Cop::RSpec::FactoryBot::ConsistentParenthesesStyle < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::RSpec::FactoryBot::Language - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb#61 - def factory_call(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb#68 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb#103 - def ambiguous_without_parentheses?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb#84 - def process_with_parentheses(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb#94 - def process_without_parentheses(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb#109 - def remove_parentheses(corrector, node); end - - class << self - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb#49 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb#56 -RuboCop::Cop::RSpec::FactoryBot::ConsistentParenthesesStyle::FACTORY_CALLS = T.let(T.unsafe(nil), Set) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb#54 -RuboCop::Cop::RSpec::FactoryBot::ConsistentParenthesesStyle::MSG_OMIT_PARENS = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb#53 -RuboCop::Cop::RSpec::FactoryBot::ConsistentParenthesesStyle::MSG_REQUIRE_PARENS = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb#58 -RuboCop::Cop::RSpec::FactoryBot::ConsistentParenthesesStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# Checks for create_list usage. -# -# This cop can be configured using the `EnforcedStyle` option -# -# @example `EnforcedStyle: create_list` (default) -# # bad -# 3.times { create :user } -# -# # good -# create_list :user, 3 -# -# # bad -# 3.times { create :user, age: 18 } -# -# # good - index is used to alter the created models attributes -# 3.times { |n| create :user, age: n } -# -# # good - contains a method call, may return different values -# 3.times { create :user, age: rand } -# @example `EnforcedStyle: n_times` -# # bad -# create_list :user, 3 -# -# # good -# 3.times { create :user } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#34 -class RuboCop::Cop::RSpec::FactoryBot::CreateList < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::RSpec::FactoryBot::Language - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#64 - def arguments_include_method_call?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#44 - def array_new_or_n_times_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#55 - def block_with_arg_and_used?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#69 - def factory_call(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#74 - def factory_list_call(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#78 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#92 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#105 - def contains_only_factory?(node); end -end - -# :nodoc -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#114 -module RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#117 - def build_options_string(options); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#121 - def format_method_call(node, method, arguments); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#129 - def format_receiver(receiver); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#174 -class RuboCop::Cop::RSpec::FactoryBot::CreateList::CreateListCorrector - include ::RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector - - # @return [CreateListCorrector] a new instance of CreateListCorrector - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#177 - def initialize(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#181 - def call(corrector); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#204 - def build_arguments(node, count); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#213 - def call_replacement(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#195 - def call_with_block_replacement(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#226 - def count_from(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#236 - def format_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#244 - def format_multiline_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#252 - def format_singleline_block(node); end - - # Returns the value of attribute node. - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#193 - def node; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#39 -RuboCop::Cop::RSpec::FactoryBot::CreateList::MSG_CREATE_LIST = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#40 -RuboCop::Cop::RSpec::FactoryBot::CreateList::MSG_N_TIMES = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#41 -RuboCop::Cop::RSpec::FactoryBot::CreateList::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# :nodoc -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#137 -class RuboCop::Cop::RSpec::FactoryBot::CreateList::TimesCorrector - include ::RuboCop::Cop::RSpec::FactoryBot::CreateList::Corrector - - # @return [TimesCorrector] a new instance of TimesCorrector - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#140 - def initialize(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#144 - def call(corrector); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#166 - def factory_call_block_source; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#153 - def generate_n_times_block(node); end - - # Returns the value of attribute node. - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#151 - def node; end -end - -# Use string value when setting the class attribute explicitly. -# -# This cop would promote faster tests by lazy-loading of -# application files. Also, this could help you suppress potential bugs -# in combination with external libraries by avoiding a preload of -# application files from the factory files. -# -# @example -# # bad -# factory :foo, class: Foo do -# end -# -# # good -# factory :foo, class: 'Foo' do -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb#23 -class RuboCop::Cop::RSpec::FactoryBot::FactoryClassName < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb#32 - def class_name(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb#36 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb#49 - def allowed?(const_name); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb#28 -RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::ALLOWED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb#26 -RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb#29 -RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for name style for argument of FactoryBot::Syntax::Methods. -# -# @example EnforcedStyle: symbol (default) -# # bad -# create('user') -# build "user", username: "NAME" -# -# # good -# create(:user) -# build :user, username: "NAME" -# @example EnforcedStyle: string -# # bad -# create(:user) -# build :user, username: "NAME" -# -# # good -# create('user') -# build "user", username: "NAME" -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb#27 -class RuboCop::Cop::RSpec::FactoryBot::FactoryNameStyle < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::RSpec::FactoryBot::Language - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb#37 - def factory_call(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb#44 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb#60 - def offense_for_string_style?(name); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb#56 - def offense_for_symbol_style?(name); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb#64 - def register_offense(name, prefer); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb#33 -RuboCop::Cop::RSpec::FactoryBot::FactoryNameStyle::FACTORY_CALLS = T.let(T.unsafe(nil), Set) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb#32 -RuboCop::Cop::RSpec::FactoryBot::FactoryNameStyle::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb#34 -RuboCop::Cop::RSpec::FactoryBot::FactoryNameStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# Use shorthands from `FactoryBot::Syntax::Methods` in your specs. -# -# @example -# # bad -# FactoryBot.create(:bar) -# FactoryBot.build(:bar) -# FactoryBot.attributes_for(:bar) -# -# # good -# create(:bar) -# build(:bar) -# attributes_for(:bar) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb#49 -class RuboCop::Cop::RSpec::FactoryBot::SyntaxMethods < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::InsideExampleGroup - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::RSpec::FactoryBot::Language - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb#59 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb#72 - def crime_scene(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb#79 - def offense(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb#55 -RuboCop::Cop::RSpec::FactoryBot::SyntaxMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb#57 -RuboCop::Cop::RSpec::FactoryBot::SyntaxMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# Checks that spec file paths are consistent and well-formed. -# -# By default, this checks that spec file paths are consistent with the -# test subject and and enforces that it reflects the described -# class/module and its optionally called out method. -# -# With the configuration option `IgnoreMethods` the called out method will -# be ignored when determining the enforced path. -# -# With the configuration option `CustomTransform` modules or classes can -# be specified that should not as usual be transformed from CamelCase to -# snake_case (e.g. 'RuboCop' => 'rubocop' ). -# -# With the configuration option `SpecSuffixOnly` test files will only -# be checked to ensure they end in '_spec.rb'. This option disables -# checking for consistency in the test subject or test methods. -# -# @example -# # bad -# whatever_spec.rb # describe MyClass -# -# # bad -# my_class_spec.rb # describe MyClass, '#method' -# -# # good -# my_class_spec.rb # describe MyClass -# -# # good -# my_class_method_spec.rb # describe MyClass, '#method' -# -# # good -# my_class/method_spec.rb # describe MyClass, '#method' -# @example when configuration is `IgnoreMethods: true` -# # bad -# whatever_spec.rb # describe MyClass -# -# # good -# my_class_spec.rb # describe MyClass -# -# # good -# my_class_spec.rb # describe MyClass, '#method' -# @example when configuration is `SpecSuffixOnly: true` -# # good -# whatever_spec.rb # describe MyClass -# -# # good -# my_class_spec.rb # describe MyClass -# -# # good -# my_class_spec.rb # describe MyClass, '#method' -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#59 -class RuboCop::Cop::RSpec::FilePath < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::TopLevelGroup - include ::RuboCop::Cop::RSpec::Namespace - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#66 - def example_group(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#75 - def on_top_level_example_group(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#73 - def routing_metadata?(param0); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#136 - def camel_to_snake_case(string); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#143 - def custom_transform; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#85 - def ensure_correct_file_path(send_node, example_group, arguments); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#167 - def expanded_file_path; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#126 - def expected_path(constant); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#151 - def filename_ends_with?(pattern); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#147 - def ignore_methods?; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#119 - def name_pattern(method_name); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#101 - def pattern_for(example_group, arguments); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#115 - def pattern_for_spec_suffix_only; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#155 - def relevant_rubocop_rspec_file?(_file); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#97 - def routing_spec?(args); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#163 - def routing_spec_path?; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#159 - def spec_suffix_only?; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#63 -RuboCop::Cop::RSpec::FilePath::MSG = T.let(T.unsafe(nil), String) - -# Helps find the true end location of nodes which might contain heredocs. -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/final_end_location.rb#7 -module RuboCop::Cop::RSpec::FinalEndLocation - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/final_end_location.rb#8 - def final_end_location(start_node); end -end - -# Checks if examples are focused. -# -# This cop does not support autocorrection in some cases. -# -# @example -# # bad -# describe MyClass, focus: true do -# end -# -# describe MyClass, :focus do -# end -# -# fdescribe MyClass do -# end -# -# # good -# describe MyClass do -# end -# -# # bad -# fdescribe 'test' do; end -# -# # good -# describe 'test' do; end -# -# # bad -# fdescribe 'test' do; end -# -# # good -# describe 'test' do; end -# -# # bad (does not support autocorrection) -# focus 'test' do; end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#40 -class RuboCop::Cop::RSpec::Focus < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#47 - def focusable_selector?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#64 - def focused_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#58 - def metadata(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#68 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#95 - def correct_send(corrector, focus); end - - # @yield [node] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#82 - def focus_metadata(node, &block); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#88 - def with_surrounding(focus); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#44 -RuboCop::Cop::RSpec::Focus::MSG = T.let(T.unsafe(nil), String) - -# Checks the arguments passed to `before`, `around`, and `after`. -# -# This cop checks for consistent style when specifying RSpec -# hooks which run for each example. There are three supported -# styles: "implicit", "each", and "example." All styles have -# the same behavior. -# -# @example `EnforcedStyle: implicit` (default) -# # bad -# before(:each) do -# # ... -# end -# -# # bad -# before(:example) do -# # ... -# end -# -# # good -# before do -# # ... -# end -# @example `EnforcedStyle: each` -# # bad -# before(:example) do -# # ... -# end -# -# # bad -# before do -# # ... -# end -# -# # good -# before(:each) do -# # ... -# end -# @example `EnforcedStyle: example` -# # bad -# before(:each) do -# # ... -# end -# -# # bad -# before do -# # ... -# end -# -# # good -# before(:example) do -# # ... -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#61 -class RuboCop::Cop::RSpec::HookArgument < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#78 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#78 - def on_numblock(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#69 - def scoped_hook(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#74 - def unscoped_hook(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#95 - def autocorrect(corrector, _node, method_send); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#102 - def check_implicit(method_send); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#116 - def explicit_message(scope); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#128 - def hook(node, &block); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#124 - def implicit_style?; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#66 -RuboCop::Cop::RSpec::HookArgument::EXPLICIT_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#65 -RuboCop::Cop::RSpec::HookArgument::IMPLICIT_MSG = T.let(T.unsafe(nil), String) - -# Checks for before/around/after hooks that come after an example. -# -# @example -# # bad -# it 'checks what foo does' do -# expect(foo).to be -# end -# -# before { prepare } -# after { clean_up } -# -# # good -# before { prepare } -# after { clean_up } -# -# it 'checks what foo does' do -# expect(foo).to be -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#25 -class RuboCop::Cop::RSpec::HooksBeforeExamples < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#31 - def example_or_group?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#41 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#41 - def on_numblock(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#73 - def autocorrect(corrector, node, first_example); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#55 - def check_hooks(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#69 - def find_first_example(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#51 - def multiline_block?(block); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#28 -RuboCop::Cop::RSpec::HooksBeforeExamples::MSG = T.let(T.unsafe(nil), String) - -# Checks for equality assertions with identical expressions on both sides. -# -# @example -# # bad -# expect(foo.bar).to eq(foo.bar) -# expect(foo.bar).to eql(foo.bar) -# -# # good -# expect(foo.bar).to eq(2) -# expect(foo.bar).to eql(2) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/identical_equality_assertion.rb#17 -class RuboCop::Cop::RSpec::IdenticalEqualityAssertion < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/identical_equality_assertion.rb#23 - def equality_check?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/identical_equality_assertion.rb#29 - def on_send(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/identical_equality_assertion.rb#18 -RuboCop::Cop::RSpec::IdenticalEqualityAssertion::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/identical_equality_assertion.rb#20 -RuboCop::Cop::RSpec::IdenticalEqualityAssertion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Check that implicit block expectation syntax is not used. -# -# Prefer using explicit block expectations. -# -# @example -# # bad -# subject { -> { do_something } } -# it { is_expected.to change(something).to(new_value) } -# -# # good -# it 'changes something to a new value' do -# expect { do_something }.to change(something).to(new_value) -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#20 -class RuboCop::Cop::RSpec::ImplicitBlockExpectation < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#36 - def implicit_expect(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#25 - def lambda?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#33 - def lambda_subject?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#40 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#62 - def find_subject(block_node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#58 - def multi_statement_example_group?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#49 - def nearest_subject(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#21 -RuboCop::Cop::RSpec::ImplicitBlockExpectation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#22 -RuboCop::Cop::RSpec::ImplicitBlockExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Check that a consistent implicit expectation style is used. -# -# This cop can be configured using the `EnforcedStyle` option -# and supports the `--auto-gen-config` flag. -# -# @example `EnforcedStyle: is_expected` (default) -# # bad -# it { should be_truthy } -# -# # good -# it { is_expected.to be_truthy } -# @example `EnforcedStyle: should` -# # bad -# it { is_expected.to be_truthy } -# -# # good -# it { should be_truthy } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#25 -class RuboCop::Cop::RSpec::ImplicitExpect < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#34 - def implicit_expect(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#49 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#78 - def is_expected_range(source_map); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#69 - def offending_expect(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#86 - def offense_message(offending_source); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#94 - def replacement_source(offending_source); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#47 -RuboCop::Cop::RSpec::ImplicitExpect::ENFORCED_REPLACEMENTS = T.let(T.unsafe(nil), Hash) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#29 -RuboCop::Cop::RSpec::ImplicitExpect::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#31 -RuboCop::Cop::RSpec::ImplicitExpect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for usage of implicit subject (`is_expected` / `should`). -# -# This cop can be configured using the `EnforcedStyle` option -# -# @example `EnforcedStyle: single_line_only` (default) -# # bad -# it do -# is_expected.to be_truthy -# end -# -# # good -# it { is_expected.to be_truthy } -# it do -# expect(subject).to be_truthy -# end -# @example `EnforcedStyle: single_statement_only` -# # bad -# it do -# foo = 1 -# is_expected.to be_truthy -# end -# -# # good -# it do -# foo = 1 -# expect(subject).to be_truthy -# end -# it do -# is_expected.to be_truthy -# end -# @example `EnforcedStyle: disallow` -# # bad -# it { is_expected.to be_truthy } -# -# # good -# it { expect(subject).to be_truthy } -# @example `EnforcedStyle: require_implicit` -# # bad -# it { expect(subject).to be_truthy } -# -# # good -# it { is_expected.to be_truthy } -# -# # bad -# it do -# expect(subject).to be_truthy -# end -# -# # good -# it do -# is_expected.to be_truthy -# end -# -# # good -# it { expect(named_subject).to be_truthy } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#65 -class RuboCop::Cop::RSpec::ImplicitSubject < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#81 - def explicit_unnamed_subject?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#86 - def implicit_subject?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#90 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#100 - def autocorrect(corrector, node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#159 - def example_of(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#135 - def implicit_subject_in_non_its?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#139 - def implicit_subject_in_non_its_and_non_single_line?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#143 - def implicit_subject_in_non_its_and_non_single_statement?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#122 - def invalid?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#147 - def its?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#113 - def message(_node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#151 - def single_line?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#155 - def single_statement?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#69 -RuboCop::Cop::RSpec::ImplicitSubject::MSG_REQUIRE_EXPLICIT = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#71 -RuboCop::Cop::RSpec::ImplicitSubject::MSG_REQUIRE_IMPLICIT = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#73 -RuboCop::Cop::RSpec::ImplicitSubject::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# A helper for `inflected` style -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#7 -module RuboCop::Cop::RSpec::InflectedHelper - include ::RuboCop::RSpec::Language - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#39 - def be_bool?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#44 - def be_boolthy?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#29 - def predicate_in_actual?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#48 - def boolean_matcher?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#16 - def check_inflected(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#60 - def message_inflected(predicate); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#56 - def predicate?(sym); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#85 - def remove_predicate(corrector, predicate); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#96 - def rewrite_matcher(corrector, predicate, matcher); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#67 - def to_predicate_matcher(name); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#107 - def true?(to_symbol, matcher); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#11 -RuboCop::Cop::RSpec::InflectedHelper::MSG_INFLECTED = T.let(T.unsafe(nil), String) - -# Helps you identify whether a given node -# is within an example group or not. -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/inside_example_group.rb#8 -module RuboCop::Cop::RSpec::InsideExampleGroup - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/inside_example_group.rb#19 - def example_group_root?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/inside_example_group.rb#23 - def example_group_root_with_siblings?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/inside_example_group.rb#11 - def inside_example_group?(node); end -end - -# Checks for `instance_double` used with `have_received`. -# -# @example -# # bad -# it do -# foo = instance_double(Foo).as_null_object -# expect(foo).to have_received(:bar) -# end -# -# # good -# it do -# foo = instance_spy(Foo) -# expect(foo).to have_received(:bar) -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/instance_spy.rb#21 -class RuboCop::Cop::RSpec::InstanceSpy < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_spy.rb#36 - def have_received_usage(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_spy.rb#28 - def null_double(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_spy.rb#45 - def on_block(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_spy.rb#61 - def autocorrect(corrector, node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/instance_spy.rb#24 -RuboCop::Cop::RSpec::InstanceSpy::MSG = T.let(T.unsafe(nil), String) - -# Checks for instance variable usage in specs. -# -# This cop can be configured with the option `AssignmentOnly` which -# will configure the cop to only register offenses on instance -# variable usage if the instance variable is also assigned within -# the spec -# -# @example -# # bad -# describe MyClass do -# before { @foo = [] } -# it { expect(@foo).to be_empty } -# end -# -# # good -# describe MyClass do -# let(:foo) { [] } -# it { expect(foo).to be_empty } -# end -# @example with AssignmentOnly configuration -# # rubocop.yml -# # RSpec/InstanceVariable: -# # AssignmentOnly: false -# -# # bad -# describe MyClass do -# before { @foo = [] } -# it { expect(@foo).to be_empty } -# end -# -# # allowed -# describe MyClass do -# it { expect(@foo).to be_empty } -# end -# -# # good -# describe MyClass do -# let(:foo) { [] } -# it { expect(foo).to be_empty } -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#48 -class RuboCop::Cop::RSpec::InstanceVariable < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::TopLevelGroup - - # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#60 - def custom_matcher?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#55 - def dynamic_class?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#71 - def ivar_assigned?(param0, param1); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#68 - def ivar_usage(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#73 - def on_top_level_group(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#90 - def assignment_only?; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#84 - def valid_usage?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#51 -RuboCop::Cop::RSpec::InstanceVariable::MSG = T.let(T.unsafe(nil), String) - -# Checks that only one `it_behaves_like` style is used. -# -# @example `EnforcedStyle: it_behaves_like` (default) -# # bad -# it_should_behave_like 'a foo' -# -# # good -# it_behaves_like 'a foo' -# @example `EnforcedStyle: it_should_behave_like` -# # bad -# it_behaves_like 'a foo' -# -# # good -# it_should_behave_like 'a foo' -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/it_behaves_like.rb#22 -class RuboCop::Cop::RSpec::ItBehavesLike < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/it_behaves_like.rb#31 - def example_inclusion_offense(param0 = T.unsafe(nil), param1); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/it_behaves_like.rb#33 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/it_behaves_like.rb#43 - def message(_node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/it_behaves_like.rb#26 -RuboCop::Cop::RSpec::ItBehavesLike::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/it_behaves_like.rb#28 -RuboCop::Cop::RSpec::ItBehavesLike::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Check that `all` matcher is used instead of iterating over an array. -# -# @example -# # bad -# it 'validates users' do -# [user1, user2, user3].each { |user| expect(user).to be_valid } -# end -# -# # good -# it 'validates users' do -# expect([user1, user2, user3]).to all(be_valid) -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#19 -class RuboCop::Cop::RSpec::IteratedExpectation < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#24 - def each?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#33 - def each_numblock?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#40 - def expectation?(param0 = T.unsafe(nil), param1); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#44 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#52 - def on_numblock(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#66 - def only_expectations?(body, arg); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#62 - def single_expectation?(body, arg); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#20 -RuboCop::Cop::RSpec::IteratedExpectation::MSG = T.let(T.unsafe(nil), String) - -# Enforce that subject is the first definition in the test. -# -# @example -# # bad -# let(:params) { blah } -# subject { described_class.new(params) } -# -# before { do_something } -# subject { described_class.new(params) } -# -# it { expect_something } -# subject { described_class.new(params) } -# it { expect_something_else } -# -# # good -# subject { described_class.new(params) } -# let(:params) { blah } -# -# # good -# subject { described_class.new(params) } -# before { do_something } -# -# # good -# subject { described_class.new(params) } -# it { expect_something } -# it { expect_something_else } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#34 -class RuboCop::Cop::RSpec::LeadingSubject < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::InsideExampleGroup - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#40 - def on_block(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#70 - def autocorrect(corrector, node, sibling); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#49 - def check_previous_nodes(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#76 - def offending?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#58 - def offending_node(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#66 - def parent(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#38 -RuboCop::Cop::RSpec::LeadingSubject::MSG = T.let(T.unsafe(nil), String) - -# Checks that no class, module, or constant is declared. -# -# Constants, including classes and modules, when declared in a block -# scope, are defined in global namespace, and leak between examples. -# -# If several examples may define a `DummyClass`, instead of being a -# blank slate class as it will be in the first example, subsequent -# examples will be reopening it and modifying its behavior in -# unpredictable ways. -# Even worse when a class that exists in the codebase is reopened. -# -# Anonymous classes are fine, since they don't result in global -# namespace name clashes. -# -# @example Constants leak between examples -# # bad -# describe SomeClass do -# OtherClass = Struct.new -# CONSTANT_HERE = 'I leak into global namespace' -# end -# -# # good -# describe SomeClass do -# before do -# stub_const('OtherClass', Struct.new) -# stub_const('CONSTANT_HERE', 'I only exist during this example') -# end -# end -# @example -# # bad -# describe SomeClass do -# class FooClass < described_class -# def double_that -# some_base_method * 2 -# end -# end -# -# it { expect(FooClass.new.double_that).to eq(4) } -# end -# -# # good - anonymous class, no constant needs to be defined -# describe SomeClass do -# let(:foo_class) do -# Class.new(described_class) do -# def double_that -# some_base_method * 2 -# end -# end -# end -# -# it { expect(foo_class.new.double_that).to eq(4) } -# end -# -# # good - constant is stubbed -# describe SomeClass do -# before do -# foo_class = Class.new(described_class) do -# def do_something -# end -# end -# stub_const('FooClass', foo_class) -# end -# -# it { expect(FooClass.new.double_that).to eq(4) } -# end -# @example -# # bad -# describe SomeClass do -# module SomeModule -# class SomeClass -# def do_something -# end -# end -# end -# end -# -# # good -# describe SomeClass do -# before do -# foo_class = Class.new(described_class) do -# def do_something -# end -# end -# stub_const('SomeModule::SomeClass', foo_class) -# end -# end -# @see https://relishapp.com/rspec/rspec-mocks/docs/mutating-constants -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#96 -class RuboCop::Cop::RSpec::LeakyConstantDeclaration < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#101 - def on_casgn(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#107 - def on_class(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#113 - def on_module(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#121 - def inside_describe_block?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#98 -RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_CLASS = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#97 -RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_CONST = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#99 -RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_MODULE = T.let(T.unsafe(nil), String) - -# Checks for `let` definitions that come after an example. -# -# @example -# # bad -# let(:foo) { bar } -# -# it 'checks what foo does' do -# expect(foo).to be -# end -# -# let(:some) { other } -# -# it 'checks what some does' do -# expect(some).to be -# end -# -# # good -# let(:foo) { bar } -# let(:some) { other } -# -# it 'checks what foo does' do -# expect(foo).to be -# end -# -# it 'checks what some does' do -# expect(some).to be -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#33 -class RuboCop::Cop::RSpec::LetBeforeExamples < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#39 - def example_or_group?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#47 - def include_examples?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#54 - def on_block(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#89 - def autocorrect(corrector, node, first_example); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#70 - def check_let_declarations(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#62 - def example_group_with_include_examples?(body); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#85 - def find_first_example(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#66 - def multiline_block?(block); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#36 -RuboCop::Cop::RSpec::LetBeforeExamples::MSG = T.let(T.unsafe(nil), String) - -# Checks unreferenced `let!` calls being used for test setup. -# -# @example -# # bad -# let!(:my_widget) { create(:widget) } -# -# it 'counts widgets' do -# expect(Widget.count).to eq(1) -# end -# -# # good -# it 'counts widgets' do -# create(:widget) -# expect(Widget.count).to eq(1) -# end -# -# # good -# before { create(:widget) } -# -# it 'counts widgets' do -# expect(Widget.count).to eq(1) -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#28 -class RuboCop::Cop::RSpec::LetSetup < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#32 - def example_or_shared_group_or_including?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#40 - def let_bang(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#48 - def method_called?(param0, param1); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#50 - def on_block(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#66 - def child_let_bang(node, &block); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#60 - def unused_let_bang(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#29 -RuboCop::Cop::RSpec::LetSetup::MSG = T.let(T.unsafe(nil), String) - -# Helper methods to location. -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/location_help.rb#7 -module RuboCop::Cop::RSpec::LocationHelp - private - - # @example - # foo 1, 2 - # ^^^^^ - # @param node [RuboCop::AST::SendNode] - # @return [Parser::Source::Range] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/location_help.rb#15 - def arguments_with_whitespace(node); end - - # @example - # foo { bar } - # ^^^^^^^^ - # @param node [RuboCop::AST::SendNode] - # @return [Parser::Source::Range] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/location_help.rb#26 - def block_with_whitespace(node); end - - class << self - # @example - # foo 1, 2 - # ^^^^^ - # @param node [RuboCop::AST::SendNode] - # @return [Parser::Source::Range] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/location_help.rb#15 - def arguments_with_whitespace(node); end - - # @example - # foo { bar } - # ^^^^^^^^ - # @param node [RuboCop::AST::SendNode] - # @return [Parser::Source::Range] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/location_help.rb#26 - def block_with_whitespace(node); end - end -end - -# Prefer `contain_exactly` when matching an array literal. -# -# @example -# # bad -# it { is_expected.to match_array([content1, content2]) } -# -# # good -# it { is_expected.to contain_exactly(content1, content2) } -# -# # good -# it { is_expected.to match_array([content] + array) } -# -# # good -# it { is_expected.to match_array(%w(tremble in fear foolish mortals)) } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#20 -class RuboCop::Cop::RSpec::MatchArray < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#26 - def on_send(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#23 -RuboCop::Cop::RSpec::MatchArray::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#24 -RuboCop::Cop::RSpec::MatchArray::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Check that chains of messages are not being stubbed. -# -# @example -# # bad -# allow(foo).to receive_message_chain(:bar, :baz).and_return(42) -# -# # good -# thing = Thing.new(baz: 42) -# allow(foo).to receive(:bar).and_return(thing) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/message_chain.rb#16 -class RuboCop::Cop::RSpec::MessageChain < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_chain.rb#20 - def on_send(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/message_chain.rb#17 -RuboCop::Cop::RSpec::MessageChain::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/message_chain.rb#18 -RuboCop::Cop::RSpec::MessageChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for consistent message expectation style. -# -# This cop can be configured in your configuration using the -# `EnforcedStyle` option and supports `--auto-gen-config`. -# -# @example `EnforcedStyle: allow` (default) -# -# # bad -# expect(foo).to receive(:bar) -# -# # good -# allow(foo).to receive(:bar) -# @example `EnforcedStyle: expect` -# -# # bad -# allow(foo).to receive(:bar) -# -# # good -# expect(foo).to receive(:bar) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#27 -class RuboCop::Cop::RSpec::MessageExpectation < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#36 - def message_expectation(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#43 - def on_send(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#41 - def receive_message?(param0); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#56 - def preferred_style?(expectation); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#30 -RuboCop::Cop::RSpec::MessageExpectation::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#33 -RuboCop::Cop::RSpec::MessageExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#32 -RuboCop::Cop::RSpec::MessageExpectation::SUPPORTED_STYLES = T.let(T.unsafe(nil), Array) - -# Checks that message expectations are set using spies. -# -# This cop can be configured in your configuration using the -# `EnforcedStyle` option and supports `--auto-gen-config`. -# -# @example `EnforcedStyle: have_received` (default) -# -# # bad -# expect(foo).to receive(:bar) -# do_something -# -# # good -# allow(foo).to receive(:bar) # or use instance_spy -# do_something -# expect(foo).to have_received(:bar) -# @example `EnforcedStyle: receive` -# -# # bad -# allow(foo).to receive(:bar) -# do_something -# expect(foo).to have_received(:bar) -# -# # good -# expect(foo).to receive(:bar) -# do_something -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#33 -class RuboCop::Cop::RSpec::MessageSpies < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#47 - def message_expectation(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#56 - def on_send(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#52 - def receive_message(param0); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#79 - def error_message(receiver); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#75 - def preferred_style?(expectation); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#69 - def receive_message_matcher(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#38 -RuboCop::Cop::RSpec::MessageSpies::MSG_HAVE_RECEIVED = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#36 -RuboCop::Cop::RSpec::MessageSpies::MSG_RECEIVE = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#44 -RuboCop::Cop::RSpec::MessageSpies::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#42 -RuboCop::Cop::RSpec::MessageSpies::SUPPORTED_STYLES = T.let(T.unsafe(nil), Array) - -# Helper methods to find RSpec metadata. -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#7 -module RuboCop::Cop::RSpec::Metadata - include ::RuboCop::RSpec::Language - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#26 - def metadata_in_block(param0, param1); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#30 - def on_block(node); end - - # @raise [::NotImplementedError] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#43 - def on_metadata(_symbols, _pairs); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#30 - def on_numblock(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#21 - def rspec_configure(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#13 - def rspec_metadata(param0 = T.unsafe(nil)); end -end - -# Checks that the first argument to an example group is not empty. -# -# @example -# # bad -# describe do -# end -# -# RSpec.describe do -# end -# -# # good -# describe TestedClass do -# end -# -# describe "A feature example" do -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/missing_example_group_argument.rb#23 -class RuboCop::Cop::RSpec::MissingExampleGroupArgument < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/missing_example_group_argument.rb#26 - def on_block(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/missing_example_group_argument.rb#24 -RuboCop::Cop::RSpec::MissingExampleGroupArgument::MSG = T.let(T.unsafe(nil), String) - -# Checks for multiple top-level example groups. -# -# Multiple descriptions for the same class or module should either -# be nested or separated into different test files. -# -# @example -# # bad -# describe MyClass, '.do_something' do -# end -# describe MyClass, '.do_something_else' do -# end -# -# # good -# describe MyClass do -# describe '.do_something' do -# end -# describe '.do_something_else' do -# end -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_describes.rb#26 -class RuboCop::Cop::RSpec::MultipleDescribes < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::TopLevelGroup - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_describes.rb#31 - def on_top_level_group(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_describes.rb#29 -RuboCop::Cop::RSpec::MultipleDescribes::MSG = T.let(T.unsafe(nil), String) - -# Checks if examples contain too many `expect` calls. -# -# This cop is configurable using the `Max` option -# and works with `--auto-gen-config`. -# -# @example -# # bad -# describe UserCreator do -# it 'builds a user' do -# expect(user.name).to eq("John") -# expect(user.age).to eq(22) -# end -# end -# -# # good -# describe UserCreator do -# it 'sets the users name' do -# expect(user.name).to eq("John") -# end -# -# it 'sets the users age' do -# expect(user.age).to eq(22) -# end -# end -# @example `aggregate_failures: true` (default) -# # good - the cop ignores when RSpec aggregates failures -# describe UserCreator do -# it 'builds a user', :aggregate_failures do -# expect(user.name).to eq("John") -# expect(user.age).to eq(22) -# end -# end -# @example `aggregate_failures: false` -# # Detected as an offense -# describe UserCreator do -# it 'builds a user', aggregate_failures: false do -# expect(user.name).to eq("John") -# expect(user.age).to eq(22) -# end -# end -# @example configuration -# # .rubocop.yml -# # RSpec/MultipleExpectations: -# # Max: 2 -# -# # not flagged by rubocop -# describe UserCreator do -# it 'builds a user' do -# expect(user.name).to eq("John") -# expect(user.age).to eq(22) -# end -# end -# @see http://betterspecs.org/#single Single expectation test -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#64 -class RuboCop::Cop::RSpec::MultipleExpectations < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableMax - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#73 - def aggregate_failures?(param0 = T.unsafe(nil), param1); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#84 - def aggregate_failures_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#81 - def expect?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#88 - def on_block(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#104 - def example_with_aggregate_failures?(example_node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#111 - def find_aggregate_failures(example_node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#116 - def find_expectation(node, &block); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#127 - def flag_example(node, expectation_count:); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#138 - def max_expectations; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#69 -RuboCop::Cop::RSpec::MultipleExpectations::ANYTHING = T.let(T.unsafe(nil), Proc) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#67 -RuboCop::Cop::RSpec::MultipleExpectations::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#70 -RuboCop::Cop::RSpec::MultipleExpectations::TRUE = T.let(T.unsafe(nil), Proc) - -# Checks if example groups contain too many `let` and `subject` calls. -# -# This cop is configurable using the `Max` option and the `AllowSubject` -# which will configure the cop to only register offenses on calls to -# `let` and not calls to `subject`. -# -# @example -# # bad -# describe MyClass do -# let(:foo) { [] } -# let(:bar) { [] } -# let!(:baz) { [] } -# let(:qux) { [] } -# let(:quux) { [] } -# let(:quuz) { {} } -# end -# -# describe MyClass do -# let(:foo) { [] } -# let(:bar) { [] } -# let!(:baz) { [] } -# -# context 'when stuff' do -# let(:qux) { [] } -# let(:quux) { [] } -# let(:quuz) { {} } -# end -# end -# -# # good -# describe MyClass do -# let(:bar) { [] } -# let!(:baz) { [] } -# let(:qux) { [] } -# let(:quux) { [] } -# let(:quuz) { {} } -# end -# -# describe MyClass do -# context 'when stuff' do -# let(:foo) { [] } -# let(:bar) { [] } -# let!(:booger) { [] } -# end -# -# context 'when other stuff' do -# let(:qux) { [] } -# let(:quux) { [] } -# let(:quuz) { {} } -# end -# end -# @example when disabling AllowSubject configuration -# # rubocop.yml -# # RSpec/MultipleMemoizedHelpers: -# # AllowSubject: false -# -# # bad - `subject` counts towards memoized helpers -# describe MyClass do -# subject { {} } -# let(:foo) { [] } -# let(:bar) { [] } -# let!(:baz) { [] } -# let(:qux) { [] } -# let(:quux) { [] } -# end -# @example with Max configuration -# # rubocop.yml -# # RSpec/MultipleMemoizedHelpers: -# # Max: 1 -# -# # bad -# describe MyClass do -# let(:foo) { [] } -# let(:bar) { [] } -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#84 -class RuboCop::Cop::RSpec::MultipleMemoizedHelpers < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableMax - include ::RuboCop::Cop::RSpec::Variable - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#90 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#101 - def on_new_investigation; end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#110 - def all_helpers(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#142 - def allow_subject?; end - - # Returns the value of attribute example_group_memoized_helpers. - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#108 - def example_group_memoized_helpers; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#117 - def helpers(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#138 - def max; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#128 - def variable_nodes(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#88 -RuboCop::Cop::RSpec::MultipleMemoizedHelpers::MSG = T.let(T.unsafe(nil), String) - -# Checks if an example group defines `subject` multiple times. -# -# This cop does not support autocorrection in some cases. -# The autocorrect behavior for this cop depends on the type of -# duplication: -# -# - If multiple named subjects are defined then this probably indicates -# that the overwritten subjects (all subjects except the last -# definition) are effectively being used to define helpers. In this -# case they are replaced with `let`. -# -# - If multiple unnamed subjects are defined though then this can *only* -# be dead code and we remove the overwritten subject definitions. -# -# - If subjects are defined with `subject!` then we don't autocorrect. -# This is enough of an edge case that people can just move this to -# a `before` hook on their own -# -# @example -# # bad -# describe Foo do -# subject(:user) { User.new } -# subject(:post) { Post.new } -# end -# -# # good -# describe Foo do -# let(:user) { User.new } -# subject(:post) { Post.new } -# end -# -# # bad (does not support autocorrection) -# describe Foo do -# subject!(:user) { User.new } -# subject!(:post) { Post.new } -# end -# -# # good -# describe Foo do -# before do -# User.new -# Post.new -# end -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_subjects.rb#51 -class RuboCop::Cop::RSpec::MultipleSubjects < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_subjects.rb#57 - def on_block(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_subjects.rb#71 - def autocorrect(corrector, subject); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_subjects.rb#81 - def named_subject?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_subjects.rb#89 - def remove_autocorrect(corrector, node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_subjects.rb#85 - def rename_autocorrect(corrector, node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_subjects.rb#55 -RuboCop::Cop::RSpec::MultipleSubjects::MSG = T.let(T.unsafe(nil), String) - -# Checks for explicitly referenced test subjects. -# -# RSpec lets you declare an "implicit subject" using `subject { ... }` -# which allows for tests like `it { is_expected.to be_valid }`. -# If you need to reference your test subject you should explicitly -# name it using `subject(:your_subject_name) { ... }`. Your test subjects -# should be the most important object in your tests so they deserve -# a descriptive name. -# -# This cop can be configured in your configuration using `EnforcedStyle`, -# and `IgnoreSharedExamples` which will not report offenses for implicit -# subjects in shared example groups. -# -# @example `EnforcedStyle: always` (default) -# # bad -# RSpec.describe User do -# subject { described_class.new } -# -# it 'is valid' do -# expect(subject.valid?).to be(true) -# end -# end -# -# # good -# RSpec.describe User do -# subject(:user) { described_class.new } -# -# it 'is valid' do -# expect(user.valid?).to be(true) -# end -# end -# -# # also good -# RSpec.describe User do -# subject(:user) { described_class.new } -# -# it { is_expected.to be_valid } -# end -# @example `EnforcedStyle: named_only` -# # bad -# RSpec.describe User do -# subject(:user) { described_class.new } -# -# it 'is valid' do -# expect(subject.valid?).to be(true) -# end -# end -# -# # good -# RSpec.describe User do -# subject(:user) { described_class.new } -# -# it 'is valid' do -# expect(user.valid?).to be(true) -# end -# end -# -# # also good -# RSpec.describe User do -# subject { described_class.new } -# -# it { is_expected.to be_valid } -# end -# -# # acceptable -# RSpec.describe User do -# subject { described_class.new } -# -# it 'is valid' do -# expect(subject.valid?).to be(true) -# end -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#79 -class RuboCop::Cop::RSpec::NamedSubject < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#85 - def example_or_hook_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#97 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#90 - def shared_example?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#95 - def subject_usage(param0); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#120 - def allow_explicit_subject?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#124 - def always?; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#114 - def check_explicit_subject(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#147 - def find_subject(block_node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#109 - def ignored_shared_example?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#128 - def named_only?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#139 - def nearest_subject(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#133 - def subject_definition_is_named?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#82 -RuboCop::Cop::RSpec::NamedSubject::MSG = T.let(T.unsafe(nil), String) - -# Helps to find namespace of the node. -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/namespace.rb#7 -module RuboCop::Cop::RSpec::Namespace - private - - # @example - # namespace(node) # => ['A', 'B', 'C'] - # @param node [RuboCop::AST::Node] - # @return [Array<String>] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/namespace.rb#14 - def namespace(node); end -end - -# Checks for nested example groups. -# -# This cop is configurable using the `Max` option -# and supports `--auto-gen-config`. -# -# @example -# # bad -# context 'when using some feature' do -# let(:some) { :various } -# let(:feature) { :setup } -# -# context 'when user is signed in' do # flagged by rubocop -# let(:user) do -# UserCreate.call(user_attributes) -# end -# -# let(:user_attributes) do -# { -# name: 'John', -# age: 22, -# role: role -# } -# end -# -# context 'when user is an admin' do # flagged by rubocop -# let(:role) { 'admin' } -# -# it 'blah blah' -# it 'yada yada' -# end -# end -# end -# -# # good -# context 'using some feature as an admin' do -# let(:some) { :various } -# let(:feature) { :setup } -# -# let(:user) do -# UserCreate.call( -# name: 'John', -# age: 22, -# role: 'admin' -# ) -# end -# -# it 'blah blah' -# it 'yada yada' -# end -# @example `Max: 3` (default) -# # bad -# describe Foo do -# context 'foo' do -# context 'bar' do -# context 'baz' do # flagged by rubocop -# end -# end -# end -# end -# @example `Max: 2` -# # bad -# describe Foo do -# context 'foo' do -# context 'bar' do # flagged by rubocop -# context 'baz' do # flagged by rubocop -# end -# end -# end -# end -# @example `AllowedGroups: [] (default)` -# describe Foo do # <-- nested groups 1 -# context 'foo' do # <-- nested groups 2 -# context 'bar' do # <-- nested groups 3 -# end -# end -# end -# @example `AllowedGroups: [path]` -# describe Foo do # <-- nested groups 1 -# path '/foo' do # <-- nested groups 1 (not counted) -# context 'bar' do # <-- nested groups 2 -# end -# end -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#94 -class RuboCop::Cop::RSpec::NestedGroups < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableMax - include ::RuboCop::Cop::RSpec::TopLevelGroup - - # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#106 - def on_top_level_group(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#156 - def allowed_groups; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#133 - def count_up_nesting?(node, example_group); end - - # @yield [node, nesting] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#118 - def find_nested_example_groups(node, nesting: T.unsafe(nil), &block); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#143 - def max_nesting; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#147 - def max_nesting_config; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#139 - def message(nesting); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#100 -RuboCop::Cop::RSpec::NestedGroups::DEPRECATED_MAX_KEY = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#102 -RuboCop::Cop::RSpec::NestedGroups::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#98 -RuboCop::Cop::RSpec::NestedGroups::MSG = T.let(T.unsafe(nil), String) - -# Checks if an example contains any expectation. -# -# All RSpec's example and expectation methods are covered by default. -# If you are using your own custom methods, -# add the following configuration: -# -# RSpec: -# Language: -# Examples: -# Regular: -# - custom_it -# Expectations: -# - custom_expect -# -# This cop can be customized with an allowed expectation methods pattern -# with an `AllowedPatterns` option. ^expect_ and ^assert_ are allowed -# by default. -# -# @example -# # bad -# it do -# a? -# end -# -# # good -# it do -# expect(a?).to be(true) -# end -# @example `AllowedPatterns` configuration -# -# # .rubocop.yml -# # RSpec/NoExpectationExample: -# # AllowedPatterns: -# # - ^expect_ -# # - ^assert_ -# @example -# # bad -# it do -# not_expect_something -# end -# -# # good -# it do -# expect_something -# end -# -# it do -# assert_something -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/no_expectation_example.rb#58 -class RuboCop::Cop::RSpec::NoExpectationExample < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::RSpec::SkipOrPending - - # @param node [RuboCop::AST::Node] - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/no_expectation_example.rb#74 - def includes_expectation?(param0); end - - # @param node [RuboCop::AST::Node] - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/no_expectation_example.rb#84 - def includes_skip_example?(param0); end - - # @param node [RuboCop::AST::BlockNode] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/no_expectation_example.rb#89 - def on_block(node); end - - # @param node [RuboCop::AST::BlockNode] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/no_expectation_example.rb#89 - def on_numblock(node); end - - # @param node [RuboCop::AST::Node] - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/no_expectation_example.rb#67 - def regular_or_focused_example?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/no_expectation_example.rb#62 -RuboCop::Cop::RSpec::NoExpectationExample::MSG = T.let(T.unsafe(nil), String) - -# Checks for consistent method usage for negating expectations. -# -# @example `EnforcedStyle: not_to` (default) -# # bad -# it '...' do -# expect(false).to_not be_true -# end -# -# # good -# it '...' do -# expect(false).not_to be_true -# end -# @example `EnforcedStyle: to_not` -# # bad -# it '...' do -# expect(false).not_to be_true -# end -# -# # good -# it '...' do -# expect(false).to_not be_true -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/not_to_not.rb#30 -class RuboCop::Cop::RSpec::NotToNot < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/not_to_not.rb#38 - def not_to_not_offense(param0 = T.unsafe(nil), param1); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/not_to_not.rb#40 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/not_to_not.rb#50 - def message(_node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/not_to_not.rb#34 -RuboCop::Cop::RSpec::NotToNot::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/not_to_not.rb#35 -RuboCop::Cop::RSpec::NotToNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks if there is a let/subject that overwrites an existing one. -# -# @example -# # bad -# let(:foo) { bar } -# let(:foo) { baz } -# -# subject(:foo) { bar } -# let(:foo) { baz } -# -# let(:foo) { bar } -# let!(:foo) { baz } -# -# # good -# subject(:test) { something } -# let(:foo) { bar } -# let(:baz) { baz } -# let!(:other) { other } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/overwriting_setup.rb#25 -class RuboCop::Cop::RSpec::OverwritingSetup < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/overwriting_setup.rb#34 - def first_argument_name(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/overwriting_setup.rb#36 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/overwriting_setup.rb#29 - def setup?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/overwriting_setup.rb#64 - def common_setup?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/overwriting_setup.rb#49 - def find_duplicates(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/overwriting_setup.rb#26 -RuboCop::Cop::RSpec::OverwritingSetup::MSG = T.let(T.unsafe(nil), String) - -# Checks for any pending or skipped examples. -# -# @example -# # bad -# describe MyClass do -# it "should be true" -# end -# -# describe MyClass do -# it "should be true", skip: true do -# expect(1).to eq(2) -# end -# end -# -# describe MyClass do -# it "should be true" do -# pending -# end -# end -# -# describe MyClass do -# xit "should be true" do -# end -# end -# -# # good -# describe MyClass do -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#35 -class RuboCop::Cop::RSpec::Pending < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::SkipOrPending - - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#56 - def on_send(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#49 - def pending_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#41 - def skippable?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#64 - def skipped?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#38 -RuboCop::Cop::RSpec::Pending::MSG = T.let(T.unsafe(nil), String) - -# Checks for pending or skipped examples without reason. -# -# @example -# # bad -# pending 'does something' do -# end -# -# # bad -# it 'does something', :pending do -# end -# -# # bad -# it 'does something' do -# pending -# end -# -# # bad -# xdescribe 'something' do -# end -# -# # bad -# skip 'does something' do -# end -# -# # bad -# it 'does something', :skip do -# end -# -# # bad -# it 'does something' do -# skip -# end -# -# # bad -# it 'does something' -# -# # good -# it 'does something' do -# pending 'reason' -# end -# -# # good -# it 'does something' do -# skip 'reason' -# end -# -# # good -# it 'does something', pending: 'reason' do -# end -# -# # good -# it 'does something', skip: 'reason' do -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#59 -class RuboCop::Cop::RSpec::PendingWithoutReason < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#77 - def metadata_without_reason?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#97 - def on_send(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#93 - def pending_step_without_reason?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#88 - def skipped_by_example_group_method?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#72 - def skipped_by_example_method?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#63 - def skipped_in_example?(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#118 - def block_node_example_group?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#130 - def on_pending_by_metadata(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#142 - def on_skipped_by_example_group_method(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#136 - def on_skipped_by_example_method(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#124 - def on_skipped_by_in_example_method(node, _direct_parent); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#111 - def parent_node(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#60 -RuboCop::Cop::RSpec::PendingWithoutReason::MSG = T.let(T.unsafe(nil), String) - -# Prefer using predicate matcher over using predicate method directly. -# -# RSpec defines magic matchers for predicate methods. -# This cop recommends to use the predicate matcher instead of using -# predicate method directly. -# -# @example Strict: true, EnforcedStyle: inflected (default) -# # bad -# expect(foo.something?).to be_truthy -# -# # good -# expect(foo).to be_something -# -# # also good - It checks "true" strictly. -# expect(foo.something?).to be(true) -# @example Strict: false, EnforcedStyle: inflected -# # bad -# expect(foo.something?).to be_truthy -# expect(foo.something?).to be(true) -# -# # good -# expect(foo).to be_something -# @example Strict: true, EnforcedStyle: explicit -# # bad -# expect(foo).to be_something -# -# # good - the above code is rewritten to it by this cop -# expect(foo.something?).to be(true) -# -# # bad - no autocorrect -# expect(foo) -# .to be_something(<<~TEXT) -# bar -# TEXT -# -# # good -# expect(foo.something?(<<~TEXT)).to be(true) -# bar -# TEXT -# @example Strict: false, EnforcedStyle: explicit -# # bad -# expect(foo).to be_something -# -# # good - the above code is rewritten to it by this cop -# expect(foo.something?).to be_truthy -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#315 -class RuboCop::Cop::RSpec::PredicateMatcher < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RSpec::InflectedHelper - include ::RuboCop::Cop::RSpec::ExplicitHelper - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#332 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#323 - def on_send(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#321 -RuboCop::Cop::RSpec::PredicateMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb#6 -module RuboCop::Cop::RSpec::Rails; end - -# Checks that tests use RSpec `before` hook over Rails `setup` method. -# -# @example -# # bad -# setup do -# allow(foo).to receive(:bar) -# end -# -# # good -# before do -# allow(foo).to receive(:bar) -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb#20 -class RuboCop::Cop::RSpec::Rails::AvoidSetupHook < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb#32 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb#26 - def setup_call(param0 = T.unsafe(nil)); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb#23 -RuboCop::Cop::RSpec::Rails::AvoidSetupHook::MSG = T.let(T.unsafe(nil), String) - -# Checks that tests use `have_http_status` instead of equality matchers. -# -# @example -# # bad -# expect(response.status).to be(200) -# -# # good -# expect(response).to have_http_status(200) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#16 -class RuboCop::Cop::RSpec::Rails::HaveHttpStatus < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#27 - def match_status(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#37 - def on_send(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#19 -RuboCop::Cop::RSpec::Rails::HaveHttpStatus::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#24 -RuboCop::Cop::RSpec::Rails::HaveHttpStatus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#23 -RuboCop::Cop::RSpec::Rails::HaveHttpStatus::RUNNERS = T.let(T.unsafe(nil), Set) - -# Identifies redundant spec type. -# -# After setting up rspec-rails, you will have enabled -# `config.infer_spec_type_from_file_location!` by default in -# spec/rails_helper.rb. This cop works in conjunction with this config. -# If you disable this config, disable this cop as well. -# -# @example -# # bad -# # spec/models/user_spec.rb -# RSpec.describe User, type: :model do -# end -# -# # good -# # spec/models/user_spec.rb -# RSpec.describe User do -# end -# -# # good -# # spec/models/user_spec.rb -# RSpec.describe User, type: :common do -# end -# @example `Inferences` configuration -# # .rubocop.yml -# # RSpec/Rails/InferredSpecType: -# # Inferences: -# # services: service -# -# # bad -# # spec/services/user_spec.rb -# RSpec.describe User, type: :service do -# end -# -# # good -# # spec/services/user_spec.rb -# RSpec.describe User do -# end -# -# # good -# # spec/services/user_spec.rb -# RSpec.describe User, type: :common do -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#54 -class RuboCop::Cop::RSpec::Rails::InferredSpecType < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # @param node [RuboCop::AST::BlockNode] - # @return [RuboCop::AST::PairNode, nil] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#79 - def describe_with_type(param0 = T.unsafe(nil)); end - - # @param node [RuboCop::AST::BlockNode] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#60 - def on_block(node); end - - # @param node [RuboCop::AST::BlockNode] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#60 - def on_numblock(node); end - - private - - # @param corrector [RuboCop::AST::Corrector] - # @param node [RuboCop::AST::Node] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#91 - def autocorrect(corrector, node); end - - # @param node [RuboCop::AST::PairNode] - # @return [RuboCop::AST::Node] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#111 - def detect_removable_node(node); end - - # @return [String] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#120 - def file_path; end - - # @return [Hash] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#138 - def inferences; end - - # @param node [RuboCop::AST::PairNode] - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#126 - def inferred_type?(node); end - - # @return [Symbol, nil] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#131 - def inferred_type_from_file_path; end - - # @param node [RuboCop::AST::Node] - # @return [Parser::Source::Range] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#97 - def remove_range(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#57 -RuboCop::Cop::RSpec::Rails::InferredSpecType::MSG = T.let(T.unsafe(nil), String) - -# Check if using Minitest matchers. -# -# @example -# # bad -# assert_equal(a, b) -# assert_equal a, b, "must be equal" -# refute_equal(a, b) -# -# # good -# expect(a).to eq(b) -# expect(a).to(eq(b), "must be equal") -# expect(a).not_to eq(b) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#20 -class RuboCop::Cop::RSpec::Rails::MinitestAssertions < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#27 - def minitest_assertion(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#31 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#53 - def message(prefer); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#43 - def replacement(node, expected, actual, failure_message); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#23 -RuboCop::Cop::RSpec::Rails::MinitestAssertions::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#24 -RuboCop::Cop::RSpec::Rails::MinitestAssertions::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Prefer to travel in `before` rather than `around`. -# -# @example -# # bad -# around do |example| -# freeze_time do -# example.run -# end -# end -# -# # good -# before { freeze_time } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#27 -class RuboCop::Cop::RSpec::Rails::TravelAround < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#39 - def extract_run_in_travel(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#48 - def match_around_each?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#55 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#55 - def on_numblock(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#70 - def autocorrect(corrector, node, run_node, around_node); end - - # @param node [RuboCop::AST::BlockNode] - # @return [RuboCop::AST::BlockNode, nil] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#83 - def extract_surrounding_around_block(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#30 -RuboCop::Cop::RSpec::Rails::TravelAround::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#32 -RuboCop::Cop::RSpec::Rails::TravelAround::TRAVEL_METHOD_NAMES = T.let(T.unsafe(nil), Set) - -# Check for `once` and `twice` receive counts matchers usage. -# -# @example -# # bad -# expect(foo).to receive(:bar).exactly(1).times -# expect(foo).to receive(:bar).exactly(2).times -# expect(foo).to receive(:bar).at_least(1).times -# expect(foo).to receive(:bar).at_least(2).times -# expect(foo).to receive(:bar).at_most(1).times -# expect(foo).to receive(:bar).at_most(2).times -# -# # good -# expect(foo).to receive(:bar).once -# expect(foo).to receive(:bar).twice -# expect(foo).to receive(:bar).at_least(:once) -# expect(foo).to receive(:bar).at_least(:twice) -# expect(foo).to receive(:bar).at_most(:once) -# expect(foo).to receive(:bar).at_most(:twice).times -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#25 -class RuboCop::Cop::RSpec::ReceiveCounts < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#40 - def on_send(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#33 - def receive_counts(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#38 - def stub?(param0); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#55 - def autocorrect(corrector, node, range); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#72 - def matcher_for(method, count); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#64 - def message_for(node, source); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#81 - def range(node, offending_node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#28 -RuboCop::Cop::RSpec::ReceiveCounts::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#30 -RuboCop::Cop::RSpec::ReceiveCounts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Prefer `not_to receive(...)` over `receive(...).never`. -# -# @example -# # bad -# expect(foo).to receive(:bar).never -# -# # good -# expect(foo).not_to receive(:bar) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_never.rb#15 -class RuboCop::Cop::RSpec::ReceiveNever < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_never.rb#21 - def method_on_stub?(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_never.rb#23 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_never.rb#33 - def autocorrect(corrector, node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_never.rb#17 -RuboCop::Cop::RSpec::ReceiveNever::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_never.rb#18 -RuboCop::Cop::RSpec::ReceiveNever::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Remove redundant `around` hook. -# -# @example -# # bad -# around do |example| -# example.run -# end -# -# # good -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#16 -class RuboCop::Cop::RSpec::RedundantAround < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#43 - def match_redundant_around_hook_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#52 - def match_redundant_around_hook_send?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#23 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#23 - def on_numblock(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#32 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#63 - def autocorrect(corrector, node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#19 -RuboCop::Cop::RSpec::RedundantAround::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#21 -RuboCop::Cop::RSpec::RedundantAround::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Check for repeated description strings in example groups. -# -# @example -# # bad -# RSpec.describe User do -# it 'is valid' do -# # ... -# end -# -# it 'is valid' do -# # ... -# end -# end -# -# # good -# RSpec.describe User do -# it 'is valid when first and last name are present' do -# # ... -# end -# -# it 'is valid when last name only is present' do -# # ... -# end -# end -# -# # good -# RSpec.describe User do -# it 'is valid' do -# # ... -# end -# -# it 'is valid', :flag do -# # ... -# end -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_description.rb#42 -class RuboCop::Cop::RSpec::RepeatedDescription < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_description.rb#45 - def on_block(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_description.rb#88 - def example_signature(example); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_description.rb#92 - def its_signature(example); end - - # Select examples in the current scope with repeated description strings - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_description.rb#60 - def repeated_descriptions(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_description.rb#74 - def repeated_its(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_description.rb#43 -RuboCop::Cop::RSpec::RepeatedDescription::MSG = T.let(T.unsafe(nil), String) - -# Check for repeated examples within example groups. -# -# @example -# -# it 'is valid' do -# expect(user).to be_valid -# end -# -# it 'validates the user' do -# expect(user).to be_valid -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example.rb#18 -class RuboCop::Cop::RSpec::RepeatedExample < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example.rb#21 - def on_block(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example.rb#41 - def example_signature(example); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example.rb#31 - def repeated_examples(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example.rb#19 -RuboCop::Cop::RSpec::RepeatedExample::MSG = T.let(T.unsafe(nil), String) - -# Check for repeated describe and context block body. -# -# @example -# # bad -# describe 'cool feature x' do -# it { cool_predicate } -# end -# -# describe 'cool feature y' do -# it { cool_predicate } -# end -# -# # good -# describe 'cool feature' do -# it { cool_predicate } -# end -# -# describe 'another cool feature' do -# it { another_predicate } -# end -# -# # good -# context 'when case x', :tag do -# it { cool_predicate } -# end -# -# context 'when case y' do -# it { cool_predicate } -# end -# -# # good -# context Array do -# it { is_expected.to respond_to :each } -# end -# -# context Hash do -# it { is_expected.to respond_to :each } -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#45 -class RuboCop::Cop::RSpec::RepeatedExampleGroupBody < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::SkipOrPending - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#59 - def body(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#62 - def const_arg(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#56 - def metadata(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#64 - def on_begin(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#51 - def several_example_groups?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#85 - def add_repeated_lines(groups); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#94 - def message(group, repeats); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#74 - def repeated_group_bodies(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#90 - def signature_keys(group); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#48 -RuboCop::Cop::RSpec::RepeatedExampleGroupBody::MSG = T.let(T.unsafe(nil), String) - -# Check for repeated example group descriptions. -# -# @example -# # bad -# describe 'cool feature' do -# # example group -# end -# -# describe 'cool feature' do -# # example group -# end -# -# # bad -# context 'when case x' do -# # example group -# end -# -# describe 'when case x' do -# # example group -# end -# -# # good -# describe 'cool feature' do -# # example group -# end -# -# describe 'another cool feature' do -# # example group -# end -# -# # good -# context 'when case x' do -# # example group -# end -# -# context 'when another case' do -# # example group -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#45 -class RuboCop::Cop::RSpec::RepeatedExampleGroupDescription < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::SkipOrPending - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#56 - def doc_string_and_metadata(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#61 - def empty_description?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#63 - def on_begin(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#51 - def several_example_groups?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#85 - def add_repeated_lines(groups); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#90 - def message(group, repeats); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#73 - def repeated_group_descriptions(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#48 -RuboCop::Cop::RSpec::RepeatedExampleGroupDescription::MSG = T.let(T.unsafe(nil), String) - -# Check for repeated include of shared examples. -# -# @example -# # bad -# describe 'foo' do -# include_examples 'cool stuff' -# include_examples 'cool stuff' -# end -# -# # bad -# describe 'foo' do -# it_behaves_like 'a cool', 'thing' -# it_behaves_like 'a cool', 'thing' -# end -# -# # bad -# context 'foo' do -# it_should_behave_like 'a duck' -# it_should_behave_like 'a duck' -# end -# -# # good -# describe 'foo' do -# include_examples 'cool stuff' -# end -# -# describe 'bar' do -# include_examples 'cool stuff' -# end -# -# # good -# describe 'foo' do -# it_behaves_like 'a cool', 'thing' -# it_behaves_like 'a cool', 'person' -# end -# -# # good -# context 'foo' do -# it_should_behave_like 'a duck' -# it_should_behave_like 'a goose' -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#48 -class RuboCop::Cop::RSpec::RepeatedIncludeExample < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#58 - def include_examples?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#65 - def on_begin(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#53 - def several_include_examples?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#62 - def shared_examples_name(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#90 - def add_repeated_lines(items); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#85 - def literal_include_examples?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#99 - def message(item, repeats); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#75 - def repeated_include_examples(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#95 - def signature_keys(item); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#49 -RuboCop::Cop::RSpec::RepeatedIncludeExample::MSG = T.let(T.unsafe(nil), String) - -# Checks for consistent style of stub's return setting. -# -# Enforces either `and_return` or block-style return in the cases -# where the returned value is constant. Ignores dynamic returned values -# are the result would be different -# -# This cop can be configured using the `EnforcedStyle` option -# -# @example `EnforcedStyle: and_return` (default) -# # bad -# allow(Foo).to receive(:bar) { "baz" } -# expect(Foo).to receive(:bar) { "baz" } -# -# # good -# allow(Foo).to receive(:bar).and_return("baz") -# expect(Foo).to receive(:bar).and_return("baz") -# # also good as the returned value is dynamic -# allow(Foo).to receive(:bar) { bar.baz } -# @example `EnforcedStyle: block` -# # bad -# allow(Foo).to receive(:bar).and_return("baz") -# expect(Foo).to receive(:bar).and_return("baz") -# -# # good -# allow(Foo).to receive(:bar) { "baz" } -# expect(Foo).to receive(:bar) { "baz" } -# # also good as the returned value is dynamic -# allow(Foo).to receive(:bar).and_return(bar.baz) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#36 -class RuboCop::Cop::RSpec::ReturnFromStub < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#51 - def and_return_value(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#45 - def contains_stub?(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#62 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#55 - def on_send(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#48 - def stub_with_block?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#71 - def check_and_return_call(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#81 - def check_block_body(block); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#90 - def dynamic?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#95 -class RuboCop::Cop::RSpec::ReturnFromStub::AndReturnCallCorrector - # @return [AndReturnCallCorrector] a new instance of AndReturnCallCorrector - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#96 - def initialize(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#102 - def call(corrector); end - - private - - # Returns the value of attribute arg. - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#111 - def arg; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#133 - def hash_without_braces?; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#113 - def heredoc?; end - - # Returns the value of attribute node. - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#111 - def node; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#117 - def range; end - - # Returns the value of attribute receiver. - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#111 - def receiver; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#125 - def replacement; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#139 -class RuboCop::Cop::RSpec::ReturnFromStub::BlockBodyCorrector - # @return [BlockBodyCorrector] a new instance of BlockBodyCorrector - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#140 - def initialize(block); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#146 - def call(corrector); end - - private - - # Returns the value of attribute block. - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#158 - def block; end - - # Returns the value of attribute body. - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#158 - def body; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#160 - def heredoc?; end - - # Returns the value of attribute node. - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#158 - def node; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#164 -RuboCop::Cop::RSpec::ReturnFromStub::BlockBodyCorrector::NULL_BLOCK_BODY = T.let(T.unsafe(nil), T.untyped) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#40 -RuboCop::Cop::RSpec::ReturnFromStub::MSG_AND_RETURN = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#41 -RuboCop::Cop::RSpec::ReturnFromStub::MSG_BLOCK = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#42 -RuboCop::Cop::RSpec::ReturnFromStub::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for let scattered across the example group. -# -# Group lets together -# -# @example -# # bad -# describe Foo do -# let(:foo) { 1 } -# subject { Foo } -# let(:bar) { 2 } -# before { prepare } -# let!(:baz) { 3 } -# end -# -# # good -# describe Foo do -# subject { Foo } -# before { prepare } -# let(:foo) { 1 } -# let(:bar) { 2 } -# let!(:baz) { 3 } -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_let.rb#29 -class RuboCop::Cop::RSpec::ScatteredLet < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_let.rb#34 - def on_block(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_let.rb#42 - def check_let_declarations(body); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_let.rb#32 -RuboCop::Cop::RSpec::ScatteredLet::MSG = T.let(T.unsafe(nil), String) - -# Checks for setup scattered across multiple hooks in an example group. -# -# Unify `before`, `after`, and `around` hooks when possible. -# -# @example -# # bad -# describe Foo do -# before { setup1 } -# before { setup2 } -# end -# -# # good -# describe Foo do -# before do -# setup1 -# setup2 -# end -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#25 -class RuboCop::Cop::RSpec::ScatteredSetup < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#29 - def on_block(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#59 - def lines_msg(numbers); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#46 - def repeated_hooks(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#26 -RuboCop::Cop::RSpec::ScatteredSetup::MSG = T.let(T.unsafe(nil), String) - -# Checks for proper shared_context and shared_examples usage. -# -# If there are no examples defined, use shared_context. -# If there is no setup defined, use shared_examples. -# -# @example -# # bad -# RSpec.shared_context 'only examples here' do -# it 'does x' do -# end -# -# it 'does y' do -# end -# end -# -# # good -# RSpec.shared_examples 'only examples here' do -# it 'does x' do -# end -# -# it 'does y' do -# end -# end -# @example -# # bad -# RSpec.shared_examples 'only setup here' do -# subject(:foo) { :bar } -# -# let(:baz) { :bazz } -# -# before do -# something -# end -# end -# -# # good -# RSpec.shared_context 'only setup here' do -# subject(:foo) { :bar } -# -# let(:baz) { :bazz } -# -# before do -# something -# end -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#53 -class RuboCop::Cop::RSpec::SharedContext < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#65 - def context?(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#60 - def examples?(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#81 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#72 - def shared_context(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#77 - def shared_example(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#97 - def context_with_only_examples(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#101 - def examples_with_only_context(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#57 -RuboCop::Cop::RSpec::SharedContext::MSG_CONTEXT = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#56 -RuboCop::Cop::RSpec::SharedContext::MSG_EXAMPLES = T.let(T.unsafe(nil), String) - -# Enforces use of string to titleize shared examples. -# -# @example -# # bad -# it_behaves_like :foo_bar_baz -# it_should_behave_like :foo_bar_baz -# shared_examples :foo_bar_baz -# shared_examples_for :foo_bar_baz -# include_examples :foo_bar_baz -# -# # good -# it_behaves_like 'foo bar baz' -# it_should_behave_like 'foo bar baz' -# shared_examples 'foo bar baz' -# shared_examples_for 'foo bar baz' -# include_examples 'foo bar baz' -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#23 -class RuboCop::Cop::RSpec::SharedExamples < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#34 - def on_send(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#27 - def shared_examples(param0 = T.unsafe(nil)); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#47 -class RuboCop::Cop::RSpec::SharedExamples::Checker - # @return [Checker] a new instance of Checker - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#53 - def initialize(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#57 - def message; end - - # Returns the value of attribute node. - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#51 - def node; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#61 - def preferred_style; end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#68 - def symbol; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#72 - def wrap_with_single_quotes(string); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#48 -RuboCop::Cop::RSpec::SharedExamples::Checker::MSG = T.let(T.unsafe(nil), String) - -# Checks that chains of messages contain more than one element. -# -# @example -# # bad -# allow(foo).to receive_message_chain(:bar).and_return(42) -# -# # good -# allow(foo).to receive(:bar).and_return(42) -# -# # also good -# allow(foo).to receive(:bar, :baz) -# allow(foo).to receive("bar.baz") -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#19 -class RuboCop::Cop::RSpec::SingleArgumentMessageChain < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#27 - def message_chain(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#34 - def on_send(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#32 - def single_key_hash?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#49 - def autocorrect(corrector, node, method, arg); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#77 - def autocorrect_array_arg(corrector, arg); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#69 - def autocorrect_hash_arg(corrector, arg); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#83 - def key_to_arg(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#88 - def replacement(method); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#65 - def single_element_array?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#55 - def valid_usage?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#22 -RuboCop::Cop::RSpec::SingleArgumentMessageChain::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#24 -RuboCop::Cop::RSpec::SingleArgumentMessageChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for passing a block to `skip` within examples. -# -# @example -# # bad -# it 'does something' do -# skip 'not yet implemented' do -# do_something -# end -# end -# -# # good -# it 'does something' do -# skip 'not yet implemented' -# do_something -# end -# -# # good - when outside example -# skip 'not yet implemented' do -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/skip_block_inside_example.rb#26 -class RuboCop::Cop::RSpec::SkipBlockInsideExample < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/skip_block_inside_example.rb#29 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/skip_block_inside_example.rb#29 - def on_numblock(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/skip_block_inside_example.rb#40 - def inside_example?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/skip_block_inside_example.rb#27 -RuboCop::Cop::RSpec::SkipBlockInsideExample::MSG = T.let(T.unsafe(nil), String) - -# Helps check offenses with variable definitions -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/skip_or_pending.rb#7 -module RuboCop::Cop::RSpec::SkipOrPending - extend ::RuboCop::AST::NodePattern::Macros - - # Match skip/pending statements inside a block (e.g. `context`) - # - # @example source that matches - # context 'when color is blue' do - # skip 'not implemented yet' - # pending 'not implemented yet' - # end - # @example source that does not match - # skip 'not implemented yet' - # pending 'not implemented yet' - # @param node [RuboCop::AST::Node] - # @return [Array<RuboCop::AST::Node>] matching nodes - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/skip_or_pending.rb#33 - def skip_or_pending_inside_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/skip_or_pending.rb#11 - def skipped_in_metadata?(param0 = T.unsafe(nil)); end -end - -# Sort RSpec metadata alphabetically. -# -# @example -# # bad -# describe 'Something', :b, :a -# context 'Something', foo: 'bar', baz: true -# it 'works', :b, :a, foo: 'bar', baz: true -# -# # good -# describe 'Something', :a, :b -# context 'Something', baz: true, foo: 'bar' -# it 'works', :a, :b, baz: true, foo: 'bar' -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#19 -class RuboCop::Cop::RSpec::SortMetadata < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::Metadata - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#26 - def on_metadata(symbols, pairs); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#37 - def crime_scene(symbols, pairs); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#46 - def replacement(symbols, pairs); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#54 - def sort_pairs(pairs); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#58 - def sort_symbols(symbols); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#50 - def sorted?(symbols, pairs); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#24 -RuboCop::Cop::RSpec::SortMetadata::MSG = T.let(T.unsafe(nil), String) - -# Checks that message expectations do not have a configured response. -# -# @example -# # bad -# expect(foo).to receive(:bar).with(42).and_return("hello world") -# -# # good (without spies) -# allow(foo).to receive(:bar).with(42).and_return("hello world") -# expect(foo).to receive(:bar).with(42) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#16 -class RuboCop::Cop::RSpec::StubbedMock < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#42 - def configured_response?(param0 = T.unsafe(nil)); end - - # Match expectation - # - # @example source that matches - # is_expected.to be_in_the_bar - # @example source that matches - # expect(cocktail).to contain_exactly(:fresh_orange_juice, :campari) - # @example source that matches - # expect_any_instance_of(Officer).to be_alert - # @param node [RuboCop::AST::Node] - # @yield [RuboCop::AST::Node] expectation, method name, matcher - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#61 - def expectation(param0 = T.unsafe(nil)); end - - # Match matcher with a configured response in block-pass - # - # @example source that matches - # receive(:foo, &canned) - # @example source that matches - # receive_message_chain(:foo, :bar, &canned) - # @example source that matches - # receive(:foo).with('bar', &canned) - # @param node [RuboCop::AST::Node] - # @yield [RuboCop::AST::Node] matcher - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#129 - def matcher_with_blockpass(param0 = T.unsafe(nil)); end - - # Match matcher with a configured response - # - # @example source that matches - # receive(:foo).and_return('bar') - # @example source that matches - # receive(:lower).and_raise(SomeError) - # @example source that matches - # receive(:redirect).and_call_original - # @param node [RuboCop::AST::Node] - # @yield [RuboCop::AST::Node] matcher - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#81 - def matcher_with_configured_response(param0 = T.unsafe(nil)); end - - # Match matcher with a configured response defined as a hash - # - # @example source that matches - # receive_messages(foo: 'bar', baz: 'qux') - # @example source that matches - # receive_message_chain(:foo, bar: 'baz') - # @param node [RuboCop::AST::Node] - # @yield [RuboCop::AST::Node] matcher - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#108 - def matcher_with_hash(param0 = T.unsafe(nil)); end - - # Match matcher with a return block - # - # @example source that matches - # receive(:foo) { 'bar' } - # @param node [RuboCop::AST::Node] - # @yield [RuboCop::AST::Node] matcher - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#93 - def matcher_with_return_block(param0 = T.unsafe(nil)); end - - # Match message expectation matcher - # - # @example source that matches - # receive(:foo) - # @example source that matches - # receive_message_chain(:foo, :bar) - # @example source that matches - # receive(:foo).with('bar') - # @param node [RuboCop::AST::Node] - # @return [Array<RuboCop::AST::Node>] matching nodes - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#34 - def message_expectation?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#138 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#155 - def msg(method_name); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#144 - def on_expectation(expectation, method_name, matcher); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#161 - def replacement(method_name); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#17 -RuboCop::Cop::RSpec::StubbedMock::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#136 -RuboCop::Cop::RSpec::StubbedMock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Ensure that subject is defined using subject helper. -# -# @example -# # bad -# let(:subject) { foo } -# let!(:subject) { foo } -# subject(:subject) { foo } -# subject!(:subject) { foo } -# -# # bad -# block = -> {} -# let(:subject, &block) -# -# # good -# subject(:test_subject) { foo } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/subject_declaration.rb#22 -class RuboCop::Cop::RSpec::SubjectDeclaration < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_declaration.rb#27 - def offensive_subject_declaration?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_declaration.rb#31 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_declaration.rb#40 - def message_for(offense); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/subject_declaration.rb#23 -RuboCop::Cop::RSpec::SubjectDeclaration::MSG_LET = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/subject_declaration.rb#24 -RuboCop::Cop::RSpec::SubjectDeclaration::MSG_REDUNDANT = T.let(T.unsafe(nil), String) - -# Checks for stubbed test subjects. -# -# Checks nested subject stubs for innermost subject definition -# when subject is also defined in parent example groups. -# -# @example -# # bad -# describe Article do -# subject(:article) { Article.new } -# -# it 'indicates that the author is unknown' do -# allow(article).to receive(:author).and_return(nil) -# expect(article.description).to include('by an unknown author') -# end -# end -# -# # bad -# describe Article do -# subject(:foo) { Article.new } -# -# context 'nested subject' do -# subject(:article) { Article.new } -# -# it 'indicates that the author is unknown' do -# allow(article).to receive(:author).and_return(nil) -# expect(article.description).to include('by an unknown author') -# end -# end -# end -# -# # good -# describe Article do -# subject(:article) { Article.new(author: nil) } -# -# it 'indicates that the author is unknown' do -# expect(article.description).to include('by an unknown author') -# end -# end -# @see https://robots.thoughtbot.com/don-t-stub-the-system-under-test -# @see https://penelope.zone/2015/12/27/introducing-rspec-smells-and-where-to-find-them.html#smell-1-stubjec -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#50 -class RuboCop::Cop::RSpec::SubjectStub < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::TopLevelGroup - - # Find a memoized helper - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#80 - def let?(param0 = T.unsafe(nil)); end - - # Match `allow` and `expect(...).to receive` - # - # @example source that matches - # allow(foo).to receive(:bar) - # allow(foo).to receive(:bar).with(1) - # allow(foo).to receive(:bar).with(1).and_return(2) - # expect(foo).to receive(:bar) - # expect(foo).to receive(:bar).with(1) - # expect(foo).to receive(:bar).with(1).and_return(2) - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#97 - def message_expectation?(param0 = T.unsafe(nil), param1); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#109 - def message_expectation_matcher?(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#115 - def on_top_level_group(node); end - - # Find a named or unnamed subject definition - # - # @example anonymous subject - # subject?(parse('subject { foo }').ast) do |name| - # name # => :subject - # end - # @example named subject - # subject?(parse('subject(:thing) { foo }').ast) do |name| - # name # => :thing - # end - # @param node [RuboCop::AST::Node] - # @yield [Symbol] subject name - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#71 - def subject?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#126 - def find_all_explicit(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#140 - def find_subject_expectations(node, subject_names = T.unsafe(nil), &block); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#53 -RuboCop::Cop::RSpec::SubjectStub::MSG = T.let(T.unsafe(nil), String) - -# Helper methods for top level example group cops -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#7 -module RuboCop::Cop::RSpec::TopLevelGroup - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#10 - def on_new_investigation; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#19 - def top_level_groups; end - - private - - # Dummy methods to be overridden in the consumer - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#27 - def on_top_level_example_group(_node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#29 - def on_top_level_group(_node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#48 - def root_node; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#31 - def top_level_group?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#35 - def top_level_nodes(node); end -end - -# Checks for a specified error in checking raised errors. -# -# Enforces one of an Exception type, a string, or a regular -# expression to match against the exception message as a parameter -# to `raise_error` -# -# @example -# # bad -# expect { -# raise StandardError.new('error') -# }.to raise_error -# -# # good -# expect { -# raise StandardError.new('error') -# }.to raise_error(StandardError) -# -# expect { -# raise StandardError.new('error') -# }.to raise_error('error') -# -# expect { -# raise StandardError.new('error') -# }.to raise_error(/err/) -# -# expect { do_something }.not_to raise_error -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#33 -class RuboCop::Cop::RSpec::UnspecifiedException < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#38 - def empty_raise_error_or_exception(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#47 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#59 - def block_with_args?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#55 - def empty_exception_matcher?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#34 -RuboCop::Cop::RSpec::UnspecifiedException::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#35 -RuboCop::Cop::RSpec::UnspecifiedException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Helps check offenses with variable definitions -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/variable.rb#7 -module RuboCop::Cop::RSpec::Variable - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/variable.rb#14 - def variable_definition?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/variable.rb#11 -RuboCop::Cop::RSpec::Variable::Helpers = RuboCop::RSpec::Language::Helpers - -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/variable.rb#10 -RuboCop::Cop::RSpec::Variable::Subjects = RuboCop::RSpec::Language::Subjects - -# Checks that memoized helpers names are symbols or strings. -# -# @example EnforcedStyle: symbols (default) -# # bad -# subject('user') { create_user } -# let('user_name') { 'Adam' } -# -# # good -# subject(:user) { create_user } -# let(:user_name) { 'Adam' } -# @example EnforcedStyle: strings -# # bad -# subject(:user) { create_user } -# let(:user_name) { 'Adam' } -# -# # good -# subject('user') { create_user } -# let('user_name') { 'Adam' } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#26 -class RuboCop::Cop::RSpec::VariableDefinition < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RSpec::Variable - include ::RuboCop::Cop::RSpec::InsideExampleGroup - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#34 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#51 - def correct_variable(variable); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#67 - def string?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#62 - def style_violation?(variable); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#71 - def symbol?(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#32 -RuboCop::Cop::RSpec::VariableDefinition::MSG = T.let(T.unsafe(nil), String) - -# Checks that memoized helper names use the configured style. -# -# Variables can be excluded from checking using the `AllowedPatterns` -# option. -# -# @example EnforcedStyle: snake_case (default) -# # bad -# subject(:userName1) { 'Adam' } -# let(:userName2) { 'Adam' } -# -# # good -# subject(:user_name_1) { 'Adam' } -# let(:user_name_2) { 'Adam' } -# @example EnforcedStyle: camelCase -# # bad -# subject(:user_name_1) { 'Adam' } -# let(:user_name_2) { 'Adam' } -# -# # good -# subject(:userName1) { 'Adam' } -# let(:userName2) { 'Adam' } -# @example AllowedPatterns configuration -# # rubocop.yml -# # RSpec/VariableName: -# # EnforcedStyle: snake_case -# # AllowedPatterns: -# # - ^userFood -# @example -# # okay because it matches the `^userFood` regex in `AllowedPatterns` -# subject(:userFood_1) { 'spaghetti' } -# let(:userFood_2) { 'fettuccine' } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/variable_name.rb#41 -class RuboCop::Cop::RSpec::VariableName < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::ConfigurableFormatting - include ::RuboCop::Cop::ConfigurableNaming - include ::RuboCop::Cop::AllowedPattern - include ::RuboCop::Cop::RSpec::Variable - include ::RuboCop::Cop::RSpec::InsideExampleGroup - - # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_name.rb#49 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_name.rb#62 - def message(style); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/variable_name.rb#47 -RuboCop::Cop::RSpec::VariableName::MSG = T.let(T.unsafe(nil), String) - -# Checks for consistent verified double reference style. -# -# Only investigates references that are one of the supported styles. -# -# This cop can be configured in your configuration using the -# `EnforcedStyle` option and supports `--auto-gen-config`. -# -# @example `EnforcedStyle: constant` (default) -# # bad -# let(:foo) do -# instance_double('ClassName', method_name: 'returned_value') -# end -# -# # good -# let(:foo) do -# instance_double(ClassName, method_name: 'returned_value') -# end -# @example `EnforcedStyle: string` -# # bad -# let(:foo) do -# instance_double(ClassName, method_name: 'returned_value') -# end -# -# # good -# let(:foo) do -# instance_double('ClassName', method_name: 'returned_value') -# end -# @example Reference is not in the supported style list. No enforcement -# -# # good -# let(:foo) do -# instance_double(@klass, method_name: 'returned_value') -# end -# @see https://relishapp.com/rspec/rspec-mocks/docs/verifying-doubles -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#43 -class RuboCop::Cop::RSpec::VerifiedDoubleReference < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#74 - def on_send(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#66 - def verified_double(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#101 - def correct_style(violation); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#92 - def opposing_style?(class_reference); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#47 -RuboCop::Cop::RSpec::VerifiedDoubleReference::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#60 -RuboCop::Cop::RSpec::VerifiedDoubleReference::REFERENCE_TYPE_STYLES = T.let(T.unsafe(nil), Hash) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#49 -RuboCop::Cop::RSpec::VerifiedDoubleReference::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# Prefer using verifying doubles over normal doubles. -# -# @example -# # bad -# let(:foo) do -# double(method_name: 'returned value') -# end -# -# # bad -# let(:foo) do -# double("ClassName", method_name: 'returned value') -# end -# -# # good -# let(:foo) do -# instance_double("ClassName", method_name: 'returned value') -# end -# @see https://relishapp.com/rspec/rspec-mocks/docs/verifying-doubles -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_doubles.rb#26 -class RuboCop::Cop::RSpec::VerifiedDoubles < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_doubles.rb#35 - def on_send(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_doubles.rb#31 - def unverified_double(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_doubles.rb#46 - def symbol?(name); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_doubles.rb#27 -RuboCop::Cop::RSpec::VerifiedDoubles::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_doubles.rb#28 -RuboCop::Cop::RSpec::VerifiedDoubles::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks void `expect()`. -# -# @example -# # bad -# expect(something) -# -# # good -# expect(something).to be(1) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#15 -class RuboCop::Cop::RSpec::VoidExpect < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#21 - def expect?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#26 - def expect_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#36 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#30 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#44 - def check_expect(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#50 - def void?(expect); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#16 -RuboCop::Cop::RSpec::VoidExpect::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#18 -RuboCop::Cop::RSpec::VoidExpect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for calling a block within a stub. -# -# @example -# # bad -# allow(foo).to receive(:bar) { |&block| block.call(1) } -# -# # good -# expect(foo).to receive(:bar).and_yield(1) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#15 -class RuboCop::Cop::RSpec::Yield < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#25 - def block_arg(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#28 - def block_call?(param0 = T.unsafe(nil), param1); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#22 - def method_on_stub?(param0); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#30 - def on_block(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#46 - def autocorrect(corrector, node, range); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#61 - def block_range(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#53 - def calling_block?(node, block); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#73 - def convert_block_to_yield(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#65 - def generate_replacement(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#19 -RuboCop::Cop::RSpec::Yield::MSG = T.let(T.unsafe(nil), String) - -module RuboCop::Cop::Style; end - -class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - # source://rubocop/1.49.0/lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 - def on_csend(node); end - - # source://rubocop/1.49.0/lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 - def on_send(node); end - - class << self - # source://rubocop-rspec//lib/rubocop-rspec.rb#61 - def autocorrect_incompatible_with; end - end -end - -# RuboCop RSpec project namespace -# -# source://rubocop-rspec//lib/rubocop/rspec.rb#5 -module RuboCop::RSpec; end - -# Shared behavior for aligning braces for single line lets -# -# source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#6 -class RuboCop::RSpec::AlignLetBrace - include ::RuboCop::RSpec::Language - include ::RuboCop::PathUtil - include ::RuboCop::Cop::Util - - # @return [AlignLetBrace] a new instance of AlignLetBrace - # - # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#10 - def initialize(root, token); end - - # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#21 - def indent_for(node); end - - # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#15 - def offending_tokens; end - - private - - # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#43 - def adjacent_let_chunks; end - - # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#35 - def let_group_for(let); end - - # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#27 - def let_token(node); end - - # Returns the value of attribute root. - # - # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#60 - def root; end - - # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#53 - def single_line_lets; end - - # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#31 - def target_column_for(let); end - - # Returns the value of attribute token. - # - # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#60 - def token; end -end - -# source://rubocop-rspec//lib/rubocop/rspec.rb#7 -RuboCop::RSpec::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) - -# Wrapper for RSpec DSL methods -# -# source://rubocop-rspec//lib/rubocop/rspec/concept.rb#6 -class RuboCop::RSpec::Concept - include ::RuboCop::RSpec::Language - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::RSpec::Language::NodePattern - - # @return [Concept] a new instance of Concept - # - # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#11 - def initialize(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#15 - def ==(other); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#15 - def eql?(other); end - - # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#21 - def hash; end - - # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#25 - def to_node; end - - protected - - # Returns the value of attribute node. - # - # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#31 - def node; end -end - -# source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#5 -module RuboCop::RSpec::Corrector; end - -# Helper methods to move a node -# -# source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#7 -class RuboCop::RSpec::Corrector::MoveNode - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::Cop::RSpec::FinalEndLocation - include ::RuboCop::Cop::RSpec::CommentsHelp - - # @return [MoveNode] a new instance of MoveNode - # - # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#14 - def initialize(node, corrector, processed_source); end - - # Returns the value of attribute corrector. - # - # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#12 - def corrector; end - - # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#27 - def move_after(other); end - - # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#20 - def move_before(other); end - - # Returns the value of attribute original. - # - # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#12 - def original; end - - # Returns the value of attribute processed_source. - # - # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#12 - def processed_source; end - - private - - # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#40 - def node_range(node); end - - # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#44 - def node_range_with_surrounding_space(node); end - - # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#36 - def source(node); end -end - -# Wrapper for RSpec examples -# -# source://rubocop-rspec//lib/rubocop/rspec/example.rb#6 -class RuboCop::RSpec::Example < ::RuboCop::RSpec::Concept - # source://rubocop-rspec//lib/rubocop/rspec/example.rb#28 - def definition; end - - # source://rubocop-rspec//lib/rubocop/rspec/example.rb#16 - def doc_string; end - - # source://rubocop-rspec//lib/rubocop/rspec/example.rb#8 - def extract_doc_string(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/rspec/example.rb#14 - def extract_implementation(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/rspec/example.rb#11 - def extract_metadata(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/rspec/example.rb#24 - def implementation; end - - # source://rubocop-rspec//lib/rubocop/rspec/example.rb#20 - def metadata; end -end - -# Wrapper for RSpec example groups -# -# source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#6 -class RuboCop::RSpec::ExampleGroup < ::RuboCop::RSpec::Concept - # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#28 - def examples; end - - # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#34 - def hooks; end - - # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#20 - def lets; end - - # Detect if the node is an example group or shared example - # - # Selectors which indicate that we should stop searching - # - # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#13 - def scope_change?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#24 - def subjects; end - - private - - # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#56 - def find_all(node, predicate); end - - # Recursively search for predicate within the current scope - # - # Searches node and halts when a scope change is detected - # - # @param node [RuboCop::AST::Node] node to recursively search - # @param predicate [Symbol] method to call with node as argument - # @return [Array<RuboCop::AST::Node>] discovered nodes - # - # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#50 - def find_all_in_scope(node, predicate); end -end - -# RuboCop FactoryBot project namespace -# -# source://rubocop-rspec//lib/rubocop/rspec/factory_bot/language.rb#5 -module RuboCop::RSpec::FactoryBot - class << self - # source://rubocop-rspec//lib/rubocop/rspec/factory_bot.rb#55 - def attribute_defining_methods; end - - # source://rubocop-rspec//lib/rubocop/rspec/factory_bot.rb#59 - def reserved_methods; end - end -end - -# source://rubocop-rspec//lib/rubocop/rspec/factory_bot.rb#7 -RuboCop::RSpec::FactoryBot::ATTRIBUTE_DEFINING_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/rspec/factory_bot.rb#30 -RuboCop::RSpec::FactoryBot::DEFINITION_PROXY_METHODS = T.let(T.unsafe(nil), Array) - -# Contains node matchers for common FactoryBot DSL. -# -# source://rubocop-rspec//lib/rubocop/rspec/factory_bot/language.rb#7 -module RuboCop::RSpec::FactoryBot::Language - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop-rspec//lib/rubocop/rspec/factory_bot/language.rb#31 - def factory_bot?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-rspec//lib/rubocop/rspec/factory_bot/language.rb#10 -RuboCop::RSpec::FactoryBot::Language::METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop-rspec//lib/rubocop/rspec/factory_bot.rb#43 -RuboCop::RSpec::FactoryBot::RESERVED_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/rspec/factory_bot.rb#15 -RuboCop::RSpec::FactoryBot::UNPROXIED_METHODS = T.let(T.unsafe(nil), Array) - -# Wrapper for RSpec hook -# -# source://rubocop-rspec//lib/rubocop/rspec/hook.rb#6 -class RuboCop::RSpec::Hook < ::RuboCop::RSpec::Concept - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#24 - def example?; end - - # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#8 - def extract_metadata(param0 = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#18 - def knowable_scope?; end - - # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#38 - def metadata; end - - # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#14 - def name; end - - # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#28 - def scope; end - - private - - # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#74 - def scope_argument; end - - # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#70 - def scope_name; end - - # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#51 - def transform_metadata(meta); end - - # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#66 - def transform_true(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#47 - def valid_scope?(node); end -end - -# Because RuboCop doesn't yet support plugins, we have to monkey patch in a -# bit of our configuration. -# -# source://rubocop-rspec//lib/rubocop/rspec/inject.rb#7 -module RuboCop::RSpec::Inject - class << self - # source://rubocop-rspec//lib/rubocop/rspec/inject.rb#8 - def defaults!; end - end -end - -# Contains node matchers for common RSpec DSL. -# -# RSpec allows for configuring aliases for commonly used DSL elements, e.g. -# example groups and hooks. It is possible to configure RuboCop RSpec to -# be able to properly detect these elements in the `RSpec/Language` section -# of the RuboCop YAML configuration file. -# -# In addition to providing useful matchers, this class is responsible for -# using the configured aliases. -# -# source://rubocop-rspec//lib/rubocop/rspec/language/node_pattern.rb#5 -module RuboCop::RSpec::Language - extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::RSpec::Language::NodePattern - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#50 - def example?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#29 - def example_group?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#45 - def example_group_with_body?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#26 - def explicit_rspec?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#53 - def hook?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#69 - def include?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#61 - def let?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#23 - def rspec?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#34 - def shared_group?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#38 - def spec_group?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#77 - def subject?(param0 = T.unsafe(nil)); end - - class << self - # Returns the value of attribute config. - # - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#19 - def config; end - - # Sets the attribute config - # - # @param value the value to set the attribute config to. - # - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#19 - def config=(_arg0); end - end -end - -# This is used in Dialect and DescribeClass cops to detect RSpec blocks. -# -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#205 -module RuboCop::RSpec::Language::ALL - class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#206 - def all(element); end - end -end - -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#79 -module RuboCop::RSpec::Language::ExampleGroups - class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#81 - def all(element); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#91 - def focused(element); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#87 - def regular(element); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#95 - def skipped(element); end - end -end - -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#101 -module RuboCop::RSpec::Language::Examples - class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#103 - def all(element); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#114 - def focused(element); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#122 - def pending(element); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#110 - def regular(element); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#118 - def skipped(element); end - end -end - -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#128 -module RuboCop::RSpec::Language::Expectations - class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#129 - def all(element); end - end -end - -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#134 -module RuboCop::RSpec::Language::Helpers - class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#135 - def all(element); end - end -end - -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#146 -module RuboCop::RSpec::Language::HookScopes - class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#148 - def all(element); end - end -end - -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#147 -RuboCop::RSpec::Language::HookScopes::ALL = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#140 -module RuboCop::RSpec::Language::Hooks - class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#141 - def all(element); end - end -end - -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#153 -module RuboCop::RSpec::Language::Includes - class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#155 - def all(element); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#164 - def context(element); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#160 - def examples(element); end - end -end - -# Helper methods to detect RSpec DSL used with send and block -# -# @deprecated Prefer using Node Pattern directly -# Use `'(block (send nil? #Example.all ...) ...)'` instead of -# `block_pattern('#Example.all')` -# -# source://rubocop-rspec//lib/rubocop/rspec/language/node_pattern.rb#10 -module RuboCop::RSpec::Language::NodePattern - # @deprecated Prefer using Node Pattern directly - # - # source://rubocop-rspec//lib/rubocop/rspec/language/node_pattern.rb#30 - def block_or_numblock_pattern(string); end - - # @deprecated Prefer using Node Pattern directly - # - # source://rubocop-rspec//lib/rubocop/rspec/language/node_pattern.rb#18 - def block_pattern(string); end - - # @deprecated Prefer using Node Pattern directly - # - # source://rubocop-rspec//lib/rubocop/rspec/language/node_pattern.rb#24 - def numblock_pattern(string); end - - # @deprecated Prefer using Node Pattern directly - # - # source://rubocop-rspec//lib/rubocop/rspec/language/node_pattern.rb#12 - def send_pattern(string); end - - private - - # source://rubocop-rspec//lib/rubocop/rspec/language/node_pattern.rb#37 - def deprecation_warning(method); end -end - -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#170 -module RuboCop::RSpec::Language::Runners - class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#173 - def all(element = T.unsafe(nil)); end - end -end - -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#171 -RuboCop::RSpec::Language::Runners::ALL = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#181 -module RuboCop::RSpec::Language::SharedGroups - class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#183 - def all(element); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#192 - def context(element); end - - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#188 - def examples(element); end - end -end - -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#198 -module RuboCop::RSpec::Language::Subjects - class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#199 - def all(element); end - end -end - -# RuboCop RSpec specific extensions of RuboCop::AST::Node -# -# source://rubocop-rspec//lib/rubocop/rspec/node.rb#6 -module RuboCop::RSpec::Node - # In various cops we want to regard const as literal although it's not - # strictly literal. - # - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/rspec/node.rb#9 - def recursive_literal_or_const?; end -end - -# source://rubocop-rspec//lib/rubocop/rspec.rb#6 -RuboCop::RSpec::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) - -# Version information for the RSpec RuboCop plugin. -# -# source://rubocop-rspec//lib/rubocop/rspec/version.rb#6 -module RuboCop::RSpec::Version; end - -# source://rubocop-rspec//lib/rubocop/rspec/version.rb#7 -RuboCop::RSpec::Version::STRING = T.let(T.unsafe(nil), String) - -# RSpec example wording rewriter -# -# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#6 -class RuboCop::RSpec::Wording - # @return [Wording] a new instance of Wording - # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#12 - def initialize(text, ignore:, replace:); end - - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#18 - def rewrite; end - - private - - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#72 - def append_suffix(word, suffix); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#57 - def ignored_word?(word); end - - # Returns the value of attribute ignores. - # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#31 - def ignores; end - - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#43 - def remove_should_and_pluralize; end - - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#33 - def replace_prefix(pattern, replacement); end - - # Returns the value of attribute replacements. - # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#31 - def replacements; end - - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#61 - def substitute(word); end - - # Returns the value of attribute text. - # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#31 - def text; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#39 - def uppercase?(word); end -end - -# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#9 -RuboCop::RSpec::Wording::ES_SUFFIX_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#10 -RuboCop::RSpec::Wording::IES_SUFFIX_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#8 -RuboCop::RSpec::Wording::SHOULDNT_BE_PREFIX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#7 -RuboCop::RSpec::Wording::SHOULDNT_PREFIX = T.let(T.unsafe(nil), Regexp) diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi deleted file mode 100644 index 63d013ee..00000000 --- a/sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi +++ /dev/null @@ -1,1043 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-sorbet` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-sorbet`. - -# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#2 -module RuboCop; end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#6 -module RuboCop::Cop; end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#7 -module RuboCop::Cop::Sorbet; end - -# This cop disallows using `.override(allow_incompatible: true)`. -# Using `allow_incompatible` suggests a violation of the Liskov -# Substitution Principle, meaning that a subclass is not a valid -# subtype of it's superclass. This Cop prevents these design smells -# from occurring. -# -# @example -# -# # bad -# sig.override(allow_incompatible: true) -# -# # good -# sig.override -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#21 -class RuboCop::Cop::Sorbet::AllowIncompatibleOverride < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#35 - def allow_incompatible?(param0); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#39 - def allow_incompatible_override?(param0 = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#31 - def not_nil?(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#48 - def on_send(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/allow_incompatible_override.rb#22 - def sig?(param0); end -end - -# This cop disallows binding the return value of `T.any`, `T.all`, `T.enum` -# to a constant directly. To bind the value, one must use `T.type_alias`. -# -# @example -# -# # bad -# FooOrBar = T.any(Foo, Bar) -# -# # good -# FooOrBar = T.type_alias { T.any(Foo, Bar) } -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#18 -class RuboCop::Cop::Sorbet::BindingConstantWithoutTypeAlias < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#116 - def autocorrect(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#19 - def binding_unaliased_type?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#51 - def dynamic_type_creation_with_block?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#66 - def generic_parameter_decl_block_call?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#60 - def generic_parameter_decl_call?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#72 - def method_needing_aliasing_on_t?(param0); end - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#85 - def not_dynamic_type_creation_with_block?(node); end - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#89 - def not_generic_parameter_decl?(node); end - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#93 - def not_nil?(node); end - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#81 - def not_t_let?(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#97 - def on_casgn(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#41 - def t_let?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#32 - def using_deprecated_type_alias_syntax?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/binding_constants_without_type_alias.rb#23 - def using_type_alias?(param0 = T.unsafe(nil)); end -end - -# This cop ensures that callback conditionals are bound to the right type -# so that they are type checked properly. -# -# Auto-correction is unsafe because other libraries define similar style callbacks as Rails, but don't always need -# binding to the attached class. Auto-correcting those usages can lead to false positives and auto-correction -# introduces new typing errors. -# -# @example -# -# # bad -# class Post < ApplicationRecord -# before_create :do_it, if: -> { should_do_it? } -# -# def should_do_it? -# true -# end -# end -# -# # good -# class Post < ApplicationRecord -# before_create :do_it, if: -> { -# T.bind(self, Post) -# should_do_it? -# } -# -# def should_do_it? -# true -# end -# end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#35 -class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#47 - def autocorrect(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#99 - def on_send(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#36 -RuboCop::Cop::Sorbet::CallbackConditionalsBinding::CALLBACKS = T.let(T.unsafe(nil), Array) - -# This cop disallows the usage of `checked(true)`. This usage could cause -# confusion; it could lead some people to believe that a method would be checked -# even if runtime checks have not been enabled on the class or globally. -# Additionally, in the event where checks are enabled, `checked(true)` would -# be redundant; only `checked(false)` or `soft` would change the behaviour. -# -# @example -# -# # bad -# sig { void.checked(true) } -# -# # good -# sig { void } -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#22 -class RuboCop::Cop::Sorbet::CheckedTrueInSignature < ::RuboCop::Cop::Sorbet::SignatureCop - include ::RuboCop::Cop::RangeHelp - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#25 - def offending_node(param0); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#36 - def on_signature(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/checked_true_in_signature.rb#29 -RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), String) - -# This cop disallows the calls that are used to get constants fom Strings -# such as +constantize+, +const_get+, and +constants+. -# -# The goal of this cop is to make the code easier to statically analyze, -# more IDE-friendly, and more predictable. It leads to code that clearly -# expresses which values the constant can have. -# -# @example -# -# # bad -# class_name.constantize -# -# # bad -# constants.detect { |c| c.name == "User" } -# -# # bad -# const_get(class_name) -# -# # good -# case class_name -# when "User" -# User -# else -# raise ArgumentError -# end -# -# # good -# { "User" => User }.fetch(class_name) -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#36 -class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#37 - def constant_from_string?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#41 - def on_send(node); end -end - -# This cop checks for blank lines after signatures. -# -# It also suggests an autocorrect -# -# @example -# -# # bad -# sig { void } -# -# def foo; end -# -# # good -# sig { void } -# def foo; end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#23 -class RuboCop::Cop::Sorbet::EmptyLineAfterSig < ::RuboCop::Cop::Sorbet::SignatureCop - include ::RuboCop::Cop::RangeHelp - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#33 - def autocorrect(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#26 - def on_signature(node); end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/empty_line_after_sig.rb#48 - def next_method(node); end -end - -# This cop checks that the Sorbet sigil comes as the first magic comment in the file. -# -# The expected order for magic comments is: (en)?coding, typed, warn_indent then frozen_string_literal. -# -# For example, the following bad ordering: -# -# ```ruby -# class Foo; end -# ``` -# -# Will be corrected as: -# -# ```ruby -# class Foo; end -# ``` -# -# Only `(en)?coding`, `typed`, `warn_indent` and `frozen_string_literal` magic comments are considered, -# other comments or magic comments are left in the same place. -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#30 -class RuboCop::Cop::Sorbet::EnforceSigilOrder < ::RuboCop::Cop::Sorbet::ValidSigil - include ::RuboCop::Cop::RangeHelp - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#42 - def autocorrect(_node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#33 - def investigate(processed_source); end - - protected - - # checks - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#91 - def check_magic_comments_order(tokens); end - - # Get all the tokens in `processed_source` that match `MAGIC_REGEX` - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#83 - def extract_magic_comments(processed_source); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#67 -RuboCop::Cop::Sorbet::EnforceSigilOrder::CODING_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#69 -RuboCop::Cop::Sorbet::EnforceSigilOrder::FROZEN_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#68 -RuboCop::Cop::Sorbet::EnforceSigilOrder::INDENT_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#78 -RuboCop::Cop::Sorbet::EnforceSigilOrder::MAGIC_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_sigil_order.rb#71 -RuboCop::Cop::Sorbet::EnforceSigilOrder::PREFERRED_ORDER = T.let(T.unsafe(nil), Hash) - -# This cop checks that every method definition and attribute accessor has a Sorbet signature. -# -# It also suggest an autocorrect with placeholders so the following code: -# -# ``` -# def foo(a, b, c); end -# ``` -# -# Will be corrected as: -# -# ``` -# sig { params(a: T.untyped, b: T.untyped, c: T.untyped).returns(T.untyped) -# def foo(a, b, c); end -# ``` -# -# You can configure the placeholders used by changing the following options: -# -# * `ParameterTypePlaceholder`: placeholders used for parameter types (default: 'T.untyped') -# * `ReturnTypePlaceholder`: placeholders used for return types (default: 'T.untyped') -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#29 -class RuboCop::Cop::Sorbet::EnforceSignatures < ::RuboCop::Cop::Sorbet::SignatureCop - # @return [EnforceSignatures] a new instance of EnforceSignatures - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#30 - def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#35 - def accessor?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#55 - def autocorrect(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#39 - def on_def(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#43 - def on_defs(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#47 - def on_send(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#51 - def on_signature(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#74 - def scope(node); end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#82 - def check_node(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#93 - def param_type_placeholder; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#97 - def return_type_placeholder; end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#101 -class RuboCop::Cop::Sorbet::EnforceSignatures::SigSuggestion - # @return [SigSuggestion] a new instance of SigSuggestion - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#104 - def initialize(indent, param_placeholder, return_placeholder); end - - # Returns the value of attribute params. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#102 - def params; end - - # Sets the attribute params - # - # @param value the value to set the attribute params to. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#102 - def params=(_arg0); end - - # Returns the value of attribute returns. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#102 - def returns; end - - # Sets the attribute returns - # - # @param value the value to set the attribute returns to. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#102 - def returns=(_arg0); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#112 - def to_autocorrect; end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#124 - def generate_params; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/enforce_signatures.rb#135 - def generate_return; end -end - -# This cop checks that there is only one Sorbet sigil in a given file -# -# For example, the following class with two sigils -# -# ```ruby -# class Foo; end -# ``` -# -# Will be corrected as: -# -# ```ruby -# class Foo; end -# ``` -# -# Other comments or magic comments are left in place. -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#26 -class RuboCop::Cop::Sorbet::EnforceSingleSigil < ::RuboCop::Cop::Sorbet::ValidSigil - include ::RuboCop::Cop::RangeHelp - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#39 - def autocorrect(_node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#29 - def investigate(processed_source); end - - protected - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/enforce_single_sigil.rb#55 - def extract_all_sigils(processed_source); end -end - -# This cop makes the Sorbet `false` sigil mandatory in all files. -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/false_sigil.rb#10 -class RuboCop::Cop::Sorbet::FalseSigil < ::RuboCop::Cop::Sorbet::HasSigil - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/false_sigil.rb#11 - def minimum_strictness; end -end - -# This cop ensures RBI shims do not include a call to extend T::Sig -# or to extend T::Helpers -# -# @example -# -# # bad -# module SomeModule -# extend T::Sig -# extend T::Helpers -# -# sig { returns(String) } -# def foo; end -# end -# -# # good -# module SomeModule -# sig { returns(String) } -# def foo; end -# end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#25 -class RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims < ::RuboCop::Cop::Cop - include ::RuboCop::Cop::RangeHelp - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#39 - def autocorrect(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#35 - def extend_t_helpers?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#31 - def extend_t_sig?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#47 - def on_send(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#28 -RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_extend_t_sig_helpers_in_shims.rb#29 -RuboCop::Cop::Sorbet::ForbidExtendTSigHelpersInShims::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#29 -class RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral < ::RuboCop::Cop::Cop - # @return [ForbidIncludeConstLiteral] a new instance of ForbidIncludeConstLiteral - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#40 - def initialize(*_arg0); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#56 - def autocorrect(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#34 - def not_lit_const_include?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#45 - def on_send(node); end - - # Returns the value of attribute used_names. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#32 - def used_names; end - - # Sets the attribute used_names - # - # @param value the value to set the attribute used_names to. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#32 - def used_names=(_arg0); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_include_const_literal.rb#30 -RuboCop::Cop::Sorbet::ForbidIncludeConstLiteral::MSG = T.let(T.unsafe(nil), String) - -# This cop makes sure that RBI files are always located under the defined allowed paths. -# -# Options: -# -# * `AllowedPaths`: A list of the paths where RBI files are allowed (default: ["rbi/**", "sorbet/rbi/**"]) -# -# @example -# # bad -# # lib/some_file.rbi -# # other_file.rbi -# -# # good -# # rbi/external_interface.rbi -# # sorbet/rbi/some_file.rbi -# # sorbet/rbi/any/path/for/file.rbi -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#23 -class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Cop - include ::RuboCop::Cop::RangeHelp - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#26 - def investigate(processed_source); end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#58 - def allowed_paths; end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#27 -class RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#30 - def not_lit_const_superclass?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#38 - def on_class(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#28 -RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String) - -# This cop disallows using `T.unsafe` anywhere. -# -# @example -# -# # bad -# T.unsafe(foo) -# -# # good -# foo -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#17 -class RuboCop::Cop::Sorbet::ForbidTUnsafe < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#20 - def on_send(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#18 - def t_unsafe?(param0 = T.unsafe(nil)); end -end - -# This cop disallows using `T.untyped` anywhere. -# -# @example -# -# # bad -# sig { params(my_argument: T.untyped).void } -# def foo(my_argument); end -# -# # good -# sig { params(my_argument: String).void } -# def foo(my_argument); end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#20 -class RuboCop::Cop::Sorbet::ForbidTUntyped < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#23 - def on_send(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_untyped.rb#21 - def t_untyped?(param0 = T.unsafe(nil)); end -end - -# This cop disallows use of `T.untyped` or `T.nilable(T.untyped)` -# as a prop type for `T::Struct` or `T::ImmutableStruct`. -# -# @example -# -# # bad -# class SomeClass < T::Struct -# const :foo, T.untyped -# prop :bar, T.nilable(T.untyped) -# end -# -# # good -# class SomeClass < T::Struct -# const :foo, Integer -# prop :bar, T.nilable(String) -# end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#25 -class RuboCop::Cop::Sorbet::ForbidUntypedStructProps < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#52 - def on_class(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#44 - def subclass_of_t_struct?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#32 - def t_immutable_struct(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#40 - def t_nilable_untyped(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#28 - def t_struct(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#36 - def t_untyped(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#48 - def untyped_props(param0); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_untyped_struct_props.rb#26 -RuboCop::Cop::Sorbet::ForbidUntypedStructProps::MSG = T.let(T.unsafe(nil), String) - -# This cop makes the Sorbet typed sigil mandatory in all files. -# -# Options: -# -# * `SuggestedStrictness`: Sorbet strictness level suggested in offense messages (default: 'false') -# * `MinimumStrictness`: If set, make offense if the strictness level in the file is below this one -# -# If a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#17 -class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#20 - def require_sigil_on_all_files?; end -end - -# This cop makes the Sorbet `ignore` sigil mandatory in all files. -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb#10 -class RuboCop::Cop::Sorbet::IgnoreSigil < ::RuboCop::Cop::Sorbet::HasSigil - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/ignore_sigil.rb#11 - def minimum_strictness; end -end - -# This cop checks for the ordering of keyword arguments required by -# sorbet-runtime. The ordering requires that all keyword arguments -# are at the end of the parameters list, and all keyword arguments -# with a default value must be after those without default values. -# -# @example -# -# # bad -# sig { params(a: Integer, b: String).void } -# def foo(a: 1, b:); end -# -# # good -# sig { params(b: String, a: Integer).void } -# def foo(b:, a: 1); end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#23 -class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Sorbet::SignatureCop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#24 - def on_signature(node); end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/keyword_argument_ordering.rb#34 - def check_order_for_kwoptargs(parameters); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#8 -module RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#15 - def on_assignment(value); end - - class << self - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#9 - def prepended(base); end - end -end - -# This cop ensures one ancestor per requires_ancestor line -# rather than chaining them as a comma-separated list. -# -# @example -# -# # bad -# module SomeModule -# requires_ancestor Kernel, Minitest::Assertions -# end -# -# # good -# module SomeModule -# requires_ancestor Kernel -# requires_ancestor Minitest::Assertions -# end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#24 -class RuboCop::Cop::Sorbet::OneAncestorPerLine < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#35 - def abstract?(param0); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#51 - def autocorrect(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#31 - def more_than_one_ancestor(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#45 - def on_class(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#39 - def on_module(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#27 - def requires_ancestors(param0); end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#67 - def new_ra_line(indent_count); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#61 - def process_node(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#25 -RuboCop::Cop::Sorbet::OneAncestorPerLine::MSG = T.let(T.unsafe(nil), String) - -# Forbids the use of redundant `extend T::Sig`. Only for use in -# applications that monkey patch `Module.include(T::Sig)` globally, -# which would make it redundant. -# -# @example -# # bad -# class Example -# extend T::Sig -# sig { void } -# def no_op; end -# end -# -# # good -# class Example -# sig { void } -# def no_op; end -# end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#28 -class RuboCop::Cop::Sorbet::RedundantExtendTSig < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#42 - def autocorrect(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#32 - def extend_t_sig?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#36 - def on_send(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#29 -RuboCop::Cop::Sorbet::RedundantExtendTSig::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#30 -RuboCop::Cop::Sorbet::RedundantExtendTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#15 -class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Sorbet::SignatureCop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#54 - def autocorrect(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#34 - def on_signature(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#30 - def root_call(param0); end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#96 - def call_chain(sig_child_node); end - - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#92 - def can_autocorrect?; end - - # This method exists to reparse the current node with modern features enabled. - # Modern features include "index send" emitting, which is necessary to unparse - # "index sends" (i.e. `[]` calls) back to index accessors (i.e. as `foo[bar]``). - # Otherwise, we would get the unparsed node as `foo.[](bar)`. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#83 - def node_reparsed_with_modern_features(node); end -end - -# Create a subclass of AST Builder that has modern features turned on -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#72 -class RuboCop::Cop::Sorbet::SignatureBuildOrder::ModernBuilder < ::RuboCop::AST::Builder; end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#16 -RuboCop::Cop::Sorbet::SignatureBuildOrder::ORDER = T.let(T.unsafe(nil), Hash) - -# Abstract cop specific to Sorbet signatures -# -# You can subclass it to use the `on_signature` trigger and the `signature?` node matcher. -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#11 -class RuboCop::Cop::Sorbet::SignatureCop < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#30 - def on_block(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#34 - def on_signature(_); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#14 - def signature?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#22 - def with_runtime?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_cop.rb#26 - def without_runtime?(param0 = T.unsafe(nil)); end -end - -# This cop ensures empty class/module definitions in RBI files are -# done on a single line rather than being split across multiple lines. -# -# @example -# -# # bad -# module SomeModule -# end -# -# # good -# module SomeModule; end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#17 -class RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#28 - def autocorrect(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#24 - def on_class(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#20 - def on_module(node); end - - protected - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#34 - def convert_newlines(source); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#38 - def process_node(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/single_line_rbi_class_module_definitions.rb#18 -RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions::MSG = T.let(T.unsafe(nil), String) - -# This cop makes the Sorbet `strict` sigil mandatory in all files. -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#10 -class RuboCop::Cop::Sorbet::StrictSigil < ::RuboCop::Cop::Sorbet::HasSigil - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#11 - def minimum_strictness; end -end - -# This cop makes the Sorbet `strong` sigil mandatory in all files. -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strong_sigil.rb#10 -class RuboCop::Cop::Sorbet::StrongSigil < ::RuboCop::Cop::Sorbet::HasSigil - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strong_sigil.rb#11 - def minimum_strictness; end -end - -# This cop makes the Sorbet `true` sigil mandatory in all files. -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/true_sigil.rb#10 -class RuboCop::Cop::Sorbet::TrueSigil < ::RuboCop::Cop::Sorbet::HasSigil - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/true_sigil.rb#11 - def minimum_strictness; end -end - -# This cop ensures all constants used as `T.type_alias` are using CamelCase. -# -# @example -# -# # bad -# FOO_OR_BAR = T.type_alias { T.any(Foo, Bar) } -# -# # good -# FooOrBar = T.type_alias { T.any(Foo, Bar) } -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#17 -class RuboCop::Cop::Sorbet::TypeAliasName < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#20 - def casgn_type_alias?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#32 - def on_casgn(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/type_alias_name.rb#18 -RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String) - -# This cop checks that every Ruby file contains a valid Sorbet sigil. -# Adapted from: https://gist.github.com/clarkdave/85aca4e16f33fd52aceb6a0a29936e52 -# -# Options: -# -# * `RequireSigilOnAllFiles`: make offense if the Sorbet typed is not found in the file (default: false) -# * `SuggestedStrictness`: Sorbet strictness level suggested in offense messages (default: 'false') -# * `MinimumStrictness`: If set, make offense if the strictness level in the file is below this one -# -# If a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#18 -class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#33 - def autocorrect(_node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#21 - def investigate(processed_source); end - - protected - - # checks - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#68 - def check_sigil_present(sigil); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#125 - def check_strictness_level(sigil, strictness); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#103 - def check_strictness_not_empty(sigil, strictness); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#114 - def check_strictness_valid(sigil, strictness); end - - # extraction - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#56 - def extract_sigil(processed_source); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#62 - def extract_strictness(sigil); end - - # Default is `nil` - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#155 - def minimum_strictness; end - - # Default is `false` - # - # @return [Boolean] - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#144 - def require_sigil_on_all_files?; end - - # Default is `'false'` - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#149 - def suggested_strictness; end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#84 - def suggested_strictness_level(minimum_strictness, suggested_strictness); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#52 -RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#51 -RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) - -module RuboCop::Cop::Style; end - -class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour -end - -# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#3 -module RuboCop::Sorbet; end - -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#11 -RuboCop::Sorbet::CONFIG = T.let(T.unsafe(nil), Hash) - -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#10 -RuboCop::Sorbet::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) - -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#7 -class RuboCop::Sorbet::Error < ::StandardError; end - -# Because RuboCop doesn't yet support plugins, we have to monkey patch in a -# bit of our configuration. -# -# source://rubocop-sorbet//lib/rubocop/sorbet/inject.rb#9 -module RuboCop::Sorbet::Inject - class << self - # source://rubocop-sorbet//lib/rubocop/sorbet/inject.rb#10 - def defaults!; end - end -end - -# source://rubocop-sorbet//lib/rubocop/sorbet.rb#9 -RuboCop::Sorbet::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) - -# source://rubocop-sorbet//lib/rubocop/sorbet/version.rb#4 -RuboCop::Sorbet::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop@1.49.0.rbi b/sorbet/rbi/gems/rubocop@1.60.2.rbi similarity index 91% rename from sorbet/rbi/gems/rubocop@1.49.0.rbi rename to sorbet/rbi/gems/rubocop@1.60.2.rbi index c4dc58ae..66ca14b8 100644 --- a/sorbet/rbi/gems/rubocop@1.49.0.rbi +++ b/sorbet/rbi/gems/rubocop@1.60.2.rbi @@ -20,6 +20,10 @@ class Regexp::Expression::CharacterSet < ::Regexp::Expression::Subexpression include ::RuboCop::Ext::RegexpParser::Expression::CharacterSet end +class Regexp::Expression::Quantifier + include ::RuboCop::Ext::RegexpParser::Expression::Base +end + # source://rubocop//lib/rubocop/version.rb#3 module RuboCop; end @@ -96,7 +100,7 @@ class RuboCop::CLI # source://rubocop//lib/rubocop/cli.rb#152 def act_on_options; end - # source://rubocop//lib/rubocop/cli.rb#186 + # source://rubocop//lib/rubocop/cli.rb#189 def apply_default_formatter; end # source://rubocop//lib/rubocop/cli.rb#121 @@ -104,7 +108,7 @@ class RuboCop::CLI # @raise [Finished] # - # source://rubocop//lib/rubocop/cli.rb#177 + # source://rubocop//lib/rubocop/cli.rb#178 def handle_exiting_options; end # source://rubocop//lib/rubocop/cli.rb#140 @@ -162,77 +166,77 @@ end class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#21 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#22 def run; end private # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#97 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#98 def add_formatter; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#105 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#106 def add_inheritance_from_auto_generated_file(config_file); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#101 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#102 def execute_runner; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#126 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#127 def existing_configuration(config_file); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#59 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#60 def line_length_cop(config); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#47 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#48 def line_length_enabled?(config); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#55 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#56 def max_line_length(config); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#30 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#31 def maybe_run_line_length_cop; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#148 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#153 def options_config_in_root?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#63 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#64 def options_has_only_flag?; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#139 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#144 def relative_path_to_todo_from_options_config; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#90 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#91 def reset_config_and_auto_gen_file; end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#81 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#82 def run_all_cops(line_length_contents); end # Do an initial run with only Layout/LineLength so that cops that @@ -241,23 +245,23 @@ class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base # # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#70 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#71 def run_line_length_cop; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#51 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#52 def same_max_line_length?(config1, config2); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#42 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#43 def skip_line_length_cop(reason); end # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#132 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#133 def write_config_file(file_name, file_string, rubocop_yml_contents); end end @@ -268,29 +272,34 @@ RuboCop::CLI::Command::AutoGenerateConfig::AUTO_GENERATED_FILE = T.let(T.unsafe( # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#14 +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#15 RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1 = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#18 +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#19 RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_DISABLED = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#17 +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#18 RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#19 +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#20 RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#15 +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#16 RuboCop::CLI::Command::AutoGenerateConfig::PHASE_2 = T.let(T.unsafe(nil), String) +# @api private +# +# source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#13 +RuboCop::CLI::Command::AutoGenerateConfig::PLACEHOLDER = T.let(T.unsafe(nil), String) + # @api private # # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#12 @@ -412,6 +421,18 @@ end # source://rubocop//lib/rubocop/cli/command/init_dotfile.rb#9 RuboCop::CLI::Command::InitDotfile::DOTFILE = T.let(T.unsafe(nil), String) +# Start Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/cli/command/lsp.rb#10 +class RuboCop::CLI::Command::Lsp < ::RuboCop::CLI::Command::Base + # @api private + # + # source://rubocop//lib/rubocop/cli/command/lsp.rb#13 + def run; end +end + # Shows the given cops, or all cops by default, and their configurations # for the current directory. # @@ -506,7 +527,7 @@ end # # @api private # -# source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#11 +# source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#12 class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base # @api private # @@ -736,7 +757,7 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#63 def comment_only_line?(line_number); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def config(*args, **_arg1, &block); end # source://rubocop//lib/rubocop/comment_config.rb#51 @@ -760,7 +781,7 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#30 def processed_source; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def registry(*args, **_arg1, &block); end private @@ -925,7 +946,7 @@ end # during a run of the rubocop program, if files in several # directories are inspected. # -# source://rubocop//lib/rubocop/config.rb#14 +# source://rubocop//lib/rubocop/config.rb#12 class RuboCop::Config include ::RuboCop::PathUtil include ::RuboCop::FileFinder @@ -933,26 +954,26 @@ class RuboCop::Config # @return [Config] a new instance of Config # - # source://rubocop//lib/rubocop/config.rb#32 + # source://rubocop//lib/rubocop/config.rb#30 def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def [](*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def []=(*args, **_arg1, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#172 + # source://rubocop//lib/rubocop/config.rb#170 def active_support_extensions_enabled?; end - # source://rubocop//lib/rubocop/config.rb#98 + # source://rubocop//lib/rubocop/config.rb#96 def add_excludes_from_higher_level(highest_config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#195 + # source://rubocop//lib/rubocop/config.rb#193 def allowed_camel_case_file?(file); end # Paths specified in configuration files starting with .rubocop are @@ -961,67 +982,67 @@ class RuboCop::Config # config/default.yml, for example, are not relative to RuboCop's config # directory since that wouldn't work. # - # source://rubocop//lib/rubocop/config.rb#239 + # source://rubocop//lib/rubocop/config.rb#237 def base_dir_for_path_parameters; end - # source://rubocop//lib/rubocop/config.rb#264 + # source://rubocop//lib/rubocop/config.rb#262 def bundler_lock_file_path; end - # source://rubocop//lib/rubocop/config.rb#53 + # source://rubocop//lib/rubocop/config.rb#51 def check; end # @api private # @return [Boolean] whether config for this badge has 'Include' or 'Exclude' keys # - # source://rubocop//lib/rubocop/config.rb#144 + # source://rubocop//lib/rubocop/config.rb#142 def clusivity_config_for_badge?(badge); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def delete(*args, **_arg1, &block); end - # source://rubocop//lib/rubocop/config.rb#110 + # source://rubocop//lib/rubocop/config.rb#108 def deprecation_check; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def dig(*args, **_arg1, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#164 + # source://rubocop//lib/rubocop/config.rb#162 def disabled_new_cops?; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def each(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def each_key(*args, **_arg1, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#168 + # source://rubocop//lib/rubocop/config.rb#166 def enabled_new_cops?; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def fetch(*args, **_arg1, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#217 + # source://rubocop//lib/rubocop/config.rb#215 def file_to_exclude?(file); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#176 + # source://rubocop//lib/rubocop/config.rb#174 def file_to_include?(file); end - # source://rubocop//lib/rubocop/config.rb#160 + # source://rubocop//lib/rubocop/config.rb#158 def for_all_cops; end # Note: the 'Enabled' attribute is same as that returned by `for_cop` # # @return [Config] for the given cop merged with that of its department (if any) # - # source://rubocop//lib/rubocop/config.rb#130 + # source://rubocop//lib/rubocop/config.rb#128 def for_badge(badge); end # Note: the 'Enabled' attribute is calculated according to the department's @@ -1029,7 +1050,7 @@ class RuboCop::Config # # @return [Config] for the given cop / cop name. # - # source://rubocop//lib/rubocop/config.rb#124 + # source://rubocop//lib/rubocop/config.rb#122 def for_cop(cop); end # Note: the 'Enabled' attribute will be present only if specified @@ -1037,49 +1058,52 @@ class RuboCop::Config # # @return [Config] for the given department name. # - # source://rubocop//lib/rubocop/config.rb#155 + # source://rubocop//lib/rubocop/config.rb#153 def for_department(department_name); end + # source://rubocop//lib/rubocop/config.rb#285 + def inspect; end + # True if this is a config file that is shipped with RuboCop # # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#78 + # source://rubocop//lib/rubocop/config.rb#76 def internal?; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def key?(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def keys(*args, **_arg1, &block); end - # source://rubocop//lib/rubocop/config.rb#49 + # source://rubocop//lib/rubocop/config.rb#47 def loaded_features; end # Returns the value of attribute loaded_path. # - # source://rubocop//lib/rubocop/config.rb#22 + # source://rubocop//lib/rubocop/config.rb#20 def loaded_path; end - # source://rubocop//lib/rubocop/config.rb#83 + # source://rubocop//lib/rubocop/config.rb#81 def make_excludes_absolute; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def map(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def merge(*args, **_arg1, &block); end - # source://rubocop//lib/rubocop/config.rb#230 + # source://rubocop//lib/rubocop/config.rb#228 def path_relative_to_config(path); end - # source://rubocop//lib/rubocop/config.rb#226 + # source://rubocop//lib/rubocop/config.rb#224 def patterns_to_exclude; end - # source://rubocop//lib/rubocop/config.rb#222 + # source://rubocop//lib/rubocop/config.rb#220 def patterns_to_include; end - # source://rubocop//lib/rubocop/config.rb#275 + # source://rubocop//lib/rubocop/config.rb#273 def pending_cops; end # Returns true if there's a chance that an Include pattern matches hidden @@ -1087,65 +1111,65 @@ class RuboCop::Config # # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#209 + # source://rubocop//lib/rubocop/config.rb#207 def possibly_include_hidden?; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def replace(*args, **_arg1, &block); end - # source://rubocop//lib/rubocop/config.rb#73 + # source://rubocop//lib/rubocop/config.rb#71 def signature; end - # source://rubocop//lib/rubocop/config.rb#260 + # source://rubocop//lib/rubocop/config.rb#258 def smart_loaded_path; end - # source://rubocop//lib/rubocop/config.rb#249 + # source://rubocop//lib/rubocop/config.rb#247 def target_rails_version; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def target_ruby_version(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def to_h(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def to_hash(*args, **_arg1, &block); end - # source://rubocop//lib/rubocop/config.rb#69 + # source://rubocop//lib/rubocop/config.rb#67 def to_s; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def transform_values(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def validate(*args, **_arg1, &block); end - # source://rubocop//lib/rubocop/config.rb#60 + # source://rubocop//lib/rubocop/config.rb#58 def validate_after_resolution; end private - # source://rubocop//lib/rubocop/config.rb#318 + # source://rubocop//lib/rubocop/config.rb#320 def department_of(qualified_cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#306 + # source://rubocop//lib/rubocop/config.rb#308 def enable_cop?(qualified_cop_name, cop_options); end - # source://rubocop//lib/rubocop/config.rb#293 + # source://rubocop//lib/rubocop/config.rb#295 def read_rails_version_from_bundler_lock_file; end - # source://rubocop//lib/rubocop/config.rb#289 + # source://rubocop//lib/rubocop/config.rb#291 def target_rails_version_from_bundler_lock_file; end class << self - # source://rubocop//lib/rubocop/config.rb#24 + # source://rubocop//lib/rubocop/config.rb#22 def create(hash, path, check: T.unsafe(nil)); end end end -# source://rubocop//lib/rubocop/config.rb#19 +# source://rubocop//lib/rubocop/config.rb#17 class RuboCop::Config::CopConfig < ::Struct # Returns the value of attribute metadata # @@ -1178,7 +1202,7 @@ class RuboCop::Config::CopConfig < ::Struct end end -# source://rubocop//lib/rubocop/config.rb#21 +# source://rubocop//lib/rubocop/config.rb#19 RuboCop::Config::DEFAULT_RAILS_VERSION = T.let(T.unsafe(nil), Float) # This class has methods related to finding configuration path. @@ -1263,12 +1287,12 @@ RuboCop::ConfigFinder::XDG_CONFIG = T.let(T.unsafe(nil), String) # during a run of the rubocop program, if files in several # directories are inspected. # -# source://rubocop//lib/rubocop/config_loader.rb#18 +# source://rubocop//lib/rubocop/config_loader.rb#17 class RuboCop::ConfigLoader extend ::RuboCop::FileFinder class << self - # source://rubocop//lib/rubocop/config_loader.rb#130 + # source://rubocop//lib/rubocop/config_loader.rb#137 def add_excludes_from_files(config, config_file); end # Used to add features that were required inside a config or from @@ -1276,13 +1300,13 @@ class RuboCop::ConfigLoader # # @api private # - # source://rubocop//lib/rubocop/config_loader.rb#199 + # source://rubocop//lib/rubocop/config_loader.rb#198 def add_loaded_features(loaded_features); end - # source://rubocop//lib/rubocop/config_loader.rb#73 + # source://rubocop//lib/rubocop/config_loader.rb#80 def add_missing_namespaces(path, hash); end - # source://rubocop//lib/rubocop/config_loader.rb#34 + # source://rubocop//lib/rubocop/config_loader.rb#41 def clear_options; end # Returns the path of .rubocop.yml searching upwards in the @@ -1291,128 +1315,128 @@ class RuboCop::ConfigLoader # user's home directory is checked. If there's no .rubocop.yml # there either, the path to the default file is returned. # - # source://rubocop//lib/rubocop/config_loader.rb#97 + # source://rubocop//lib/rubocop/config_loader.rb#104 def configuration_file_for(target_dir); end - # source://rubocop//lib/rubocop/config_loader.rb#101 + # source://rubocop//lib/rubocop/config_loader.rb#108 def configuration_from_file(config_file, check: T.unsafe(nil)); end # Returns the value of attribute debug. # - # source://rubocop//lib/rubocop/config_loader.rb#26 + # source://rubocop//lib/rubocop/config_loader.rb#33 def debug; end # Sets the attribute debug # # @param value the value to set the attribute debug to. # - # source://rubocop//lib/rubocop/config_loader.rb#26 + # source://rubocop//lib/rubocop/config_loader.rb#33 def debug=(_arg0); end # Returns the value of attribute debug. # - # source://rubocop//lib/rubocop/config_loader.rb#26 + # source://rubocop//lib/rubocop/config_loader.rb#33 def debug?; end - # source://rubocop//lib/rubocop/config_loader.rb#140 + # source://rubocop//lib/rubocop/config_loader.rb#147 def default_configuration; end # Sets the attribute default_configuration # # @param value the value to set the attribute default_configuration to. # - # source://rubocop//lib/rubocop/config_loader.rb#28 + # source://rubocop//lib/rubocop/config_loader.rb#35 def default_configuration=(_arg0); end # Returns the value of attribute disable_pending_cops. # - # source://rubocop//lib/rubocop/config_loader.rb#26 + # source://rubocop//lib/rubocop/config_loader.rb#33 def disable_pending_cops; end # Sets the attribute disable_pending_cops # # @param value the value to set the attribute disable_pending_cops to. # - # source://rubocop//lib/rubocop/config_loader.rb#26 + # source://rubocop//lib/rubocop/config_loader.rb#33 def disable_pending_cops=(_arg0); end # Returns the value of attribute enable_pending_cops. # - # source://rubocop//lib/rubocop/config_loader.rb#26 + # source://rubocop//lib/rubocop/config_loader.rb#33 def enable_pending_cops; end # Sets the attribute enable_pending_cops # # @param value the value to set the attribute enable_pending_cops to. # - # source://rubocop//lib/rubocop/config_loader.rb#26 + # source://rubocop//lib/rubocop/config_loader.rb#33 def enable_pending_cops=(_arg0); end # Returns the value of attribute ignore_parent_exclusion. # - # source://rubocop//lib/rubocop/config_loader.rb#26 + # source://rubocop//lib/rubocop/config_loader.rb#33 def ignore_parent_exclusion; end # Sets the attribute ignore_parent_exclusion # # @param value the value to set the attribute ignore_parent_exclusion to. # - # source://rubocop//lib/rubocop/config_loader.rb#26 + # source://rubocop//lib/rubocop/config_loader.rb#33 def ignore_parent_exclusion=(_arg0); end # Returns the value of attribute ignore_parent_exclusion. # - # source://rubocop//lib/rubocop/config_loader.rb#26 + # source://rubocop//lib/rubocop/config_loader.rb#33 def ignore_parent_exclusion?; end # Returns the value of attribute ignore_unrecognized_cops. # - # source://rubocop//lib/rubocop/config_loader.rb#26 + # source://rubocop//lib/rubocop/config_loader.rb#33 def ignore_unrecognized_cops; end # Sets the attribute ignore_unrecognized_cops # # @param value the value to set the attribute ignore_unrecognized_cops to. # - # source://rubocop//lib/rubocop/config_loader.rb#26 + # source://rubocop//lib/rubocop/config_loader.rb#33 def ignore_unrecognized_cops=(_arg0); end # @api private # - # source://rubocop//lib/rubocop/config_loader.rb#148 + # source://rubocop//lib/rubocop/config_loader.rb#155 def inject_defaults!(project_root); end - # source://rubocop//lib/rubocop/config_loader.rb#40 + # source://rubocop//lib/rubocop/config_loader.rb#47 def load_file(file, check: T.unsafe(nil)); end # @raise [TypeError] # - # source://rubocop//lib/rubocop/config_loader.rb#60 + # source://rubocop//lib/rubocop/config_loader.rb#67 def load_yaml_configuration(absolute_path); end # Returns the value of attribute loaded_features. # - # source://rubocop//lib/rubocop/config_loader.rb#29 + # source://rubocop//lib/rubocop/config_loader.rb#36 def loaded_features; end # Return a recursive merge of two hashes. That is, a normal hash merge, # with the addition that any value that is a hash, and occurs in both # arguments, will also be merged. And so on. # - # source://rubocop//lib/rubocop/config_loader.rb#88 + # source://rubocop//lib/rubocop/config_loader.rb#95 def merge(base_hash, derived_hash); end # Merges the given configuration with the default one. # - # source://rubocop//lib/rubocop/config_loader.rb#192 + # source://rubocop//lib/rubocop/config_loader.rb#191 def merge_with_default(config, config_file, unset_nil: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/config_loader.rb#121 + # source://rubocop//lib/rubocop/config_loader.rb#128 def pending_cops_only_qualified(pending_cops); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader.rb#125 + # source://rubocop//lib/rubocop/config_loader.rb#132 def possible_new_cops?(config); end # Returns the path RuboCop inferred as the root of the project. No file @@ -1420,48 +1444,48 @@ class RuboCop::ConfigLoader # # @deprecated Use `RuboCop::ConfigFinder.project_root` instead. # - # source://rubocop//lib/rubocop/config_loader.rb#159 + # source://rubocop//lib/rubocop/config_loader.rb#166 def project_root; end - # source://rubocop//lib/rubocop/config_loader.rb#176 + # source://rubocop//lib/rubocop/config_loader.rb#175 def warn_on_pending_cops(pending_cops); end - # source://rubocop//lib/rubocop/config_loader.rb#184 + # source://rubocop//lib/rubocop/config_loader.rb#183 def warn_pending_cop(cop); end private - # source://rubocop//lib/rubocop/config_loader.rb#213 + # source://rubocop//lib/rubocop/config_loader.rb#212 def check_duplication(yaml_code, absolute_path); end - # source://rubocop//lib/rubocop/config_loader.rb#205 + # source://rubocop//lib/rubocop/config_loader.rb#204 def file_path(file); end # Read the specified file, or exit with a friendly, concise message on # stderr. Care is taken to use the standard OS exit code for a "file not # found" error. # - # source://rubocop//lib/rubocop/config_loader.rb#233 + # source://rubocop//lib/rubocop/config_loader.rb#232 def read_file(absolute_path); end - # source://rubocop//lib/rubocop/config_loader.rb#209 + # source://rubocop//lib/rubocop/config_loader.rb#208 def resolver; end - # source://rubocop//lib/rubocop/config_loader.rb#239 + # source://rubocop//lib/rubocop/config_loader.rb#238 def yaml_safe_load(yaml_code, filename); end - # source://rubocop//lib/rubocop/config_loader.rb#249 + # source://rubocop//lib/rubocop/config_loader.rb#248 def yaml_safe_load!(yaml_code, filename); end end end -# source://rubocop//lib/rubocop/config_loader.rb#21 +# source://rubocop//lib/rubocop/config_loader.rb#20 RuboCop::ConfigLoader::DEFAULT_FILE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/config_loader.rb#19 +# source://rubocop//lib/rubocop/config_loader.rb#18 RuboCop::ConfigLoader::DOTFILE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/config_loader.rb#20 +# source://rubocop//lib/rubocop/config_loader.rb#19 RuboCop::ConfigLoader::RUBOCOP_HOME = T.let(T.unsafe(nil), String) # A help class for ConfigLoader that handles configuration resolution. @@ -1478,7 +1502,7 @@ class RuboCop::ConfigLoaderResolver # @api private # # source://rubocop//lib/rubocop/config_loader_resolver.rb#45 - def fix_include_paths(base_config_path, hash, key, value); end + def fix_include_paths(base_config_path, hash, path, key, value); end # Return a recursive merge of two hashes. That is, a normal hash merge, # with the addition that any value that is a hash, and occurs in both @@ -1487,7 +1511,7 @@ class RuboCop::ConfigLoaderResolver # # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#98 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#99 def merge(base_hash, derived_hash, **opts); end # Merges the given configuration with the default one. If @@ -1498,7 +1522,7 @@ class RuboCop::ConfigLoaderResolver # # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#74 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#75 def merge_with_default(config, config_file, unset_nil:); end # An `Enabled: true` setting in user configuration for a cop overrides an @@ -1506,7 +1530,7 @@ class RuboCop::ConfigLoaderResolver # # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#118 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#119 def override_department_setting_for_cops(base_hash, derived_hash); end # If a cop was previously explicitly enabled, but then superseded by the @@ -1514,7 +1538,7 @@ class RuboCop::ConfigLoaderResolver # # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#135 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#136 def override_enabled_for_disabled_departments(base_hash, derived_hash); end # @api private @@ -1524,7 +1548,7 @@ class RuboCop::ConfigLoaderResolver # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#54 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#55 def resolve_inheritance_from_gems(hash); end # @api private @@ -1536,85 +1560,85 @@ class RuboCop::ConfigLoaderResolver # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#207 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#208 def base_configs(path, inherit_from, file); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#175 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#176 def determine_inherit_mode(hash, key); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#151 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#152 def disabled?(hash, department); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#155 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#156 def duplicate_setting?(base_hash, derived_hash, key, inherited_file); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#267 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#268 def gem_config_path(gem_name, relative_config_path); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#245 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#246 def handle_disabled_by_default(config, new_default_configuration); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#219 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#220 def inherited_file(path, inherit_from, file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#203 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#204 def merge_hashes?(base_hash, derived_hash, key); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#240 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#241 def remote_file?(uri); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#195 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#196 def should_merge?(mode, key); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#199 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#200 def should_override?(mode, key); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#181 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#182 def should_union?(derived_hash, base_hash, root_mode, key); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#263 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#264 def transform(config, &block); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#164 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#165 def warn_on_duplicate_setting(base_hash, derived_hash, key, **opts); end end # Raised when a RuboCop configuration file is not found. # -# source://rubocop//lib/rubocop/config_loader.rb#10 +# source://rubocop//lib/rubocop/config_loader.rb#9 class RuboCop::ConfigNotFoundError < ::RuboCop::Error; end # This class handles obsolete configuration. @@ -1626,23 +1650,23 @@ class RuboCop::ConfigObsoletion # @api private # @return [ConfigObsoletion] a new instance of ConfigObsoletion # - # source://rubocop//lib/rubocop/config_obsoletion.rb#33 + # source://rubocop//lib/rubocop/config_obsoletion.rb#35 def initialize(config); end # @api private # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_obsoletion.rb#39 + # source://rubocop//lib/rubocop/config_obsoletion.rb#41 def reject_obsolete!; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#19 + # source://rubocop//lib/rubocop/config_obsoletion.rb#21 def rules; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#19 + # source://rubocop//lib/rubocop/config_obsoletion.rb#21 def warnings; end private @@ -1651,7 +1675,7 @@ class RuboCop::ConfigObsoletion # # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#69 + # source://rubocop//lib/rubocop/config_obsoletion.rb#72 def load_cop_rules(rules); end # Parameter rules may apply to multiple cops and multiple parameters @@ -1660,7 +1684,7 @@ class RuboCop::ConfigObsoletion # # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#82 + # source://rubocop//lib/rubocop/config_obsoletion.rb#85 def load_parameter_rules(rules); end # Default rules for obsoletions are in config/obsoletion.yml @@ -1668,28 +1692,28 @@ class RuboCop::ConfigObsoletion # # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#50 + # source://rubocop//lib/rubocop/config_obsoletion.rb#52 def load_rules; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#95 + # source://rubocop//lib/rubocop/config_obsoletion.rb#98 def obsoletions; end class << self # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#22 + # source://rubocop//lib/rubocop/config_obsoletion.rb#24 def files; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#22 + # source://rubocop//lib/rubocop/config_obsoletion.rb#24 def files=(_arg0); end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#24 + # source://rubocop//lib/rubocop/config_obsoletion.rb#26 def legacy_cop_names; end end end @@ -1842,6 +1866,11 @@ class RuboCop::ConfigObsoletion::ExtractedCop < ::RuboCop::ConfigObsoletion::Cop def feature_loaded?; end end +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion.rb#18 +RuboCop::ConfigObsoletion::LOAD_RULES_CACHE = T.let(T.unsafe(nil), Hash) + # @api private # # source://rubocop//lib/rubocop/config_obsoletion.rb#14 @@ -1896,22 +1925,28 @@ class RuboCop::ConfigObsoletion::ParameterRule < ::RuboCop::ConfigObsoletion::Ru # @api private # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#31 + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#39 def alternative; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#35 + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#43 def alternatives; end + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#31 + def applies_to_current_ruby_version?; end + # @api private # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#39 + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#47 def reason; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#43 + # source://rubocop//lib/rubocop/config_obsoletion/parameter_rule.rb#51 def severity; end end @@ -2172,25 +2207,25 @@ end # Handles validation of configuration, for example cop names, parameter # names, and Ruby versions. # -# source://rubocop//lib/rubocop/config_validator.rb#8 +# source://rubocop//lib/rubocop/config_validator.rb#6 class RuboCop::ConfigValidator extend ::Forwardable # @return [ConfigValidator] a new instance of ConfigValidator # - # source://rubocop//lib/rubocop/config_validator.rb#27 + # source://rubocop//lib/rubocop/config_validator.rb#25 def initialize(config); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def for_all_cops(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def smart_loaded_path(*args, **_arg1, &block); end - # source://rubocop//lib/rubocop/config_validator.rb#63 + # source://rubocop//lib/rubocop/config_validator.rb#61 def target_ruby_version; end - # source://rubocop//lib/rubocop/config_validator.rb#33 + # source://rubocop//lib/rubocop/config_validator.rb#31 def validate; end # Validations that should only be run after all config resolving has @@ -2199,100 +2234,100 @@ class RuboCop::ConfigValidator # chain has been loaded so that only the final value is validated, and # any obsolete but overridden values are ignored. # - # source://rubocop//lib/rubocop/config_validator.rb#59 + # source://rubocop//lib/rubocop/config_validator.rb#57 def validate_after_resolution; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#67 + # source://rubocop//lib/rubocop/config_validator.rb#65 def validate_section_presence(name); end private # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#104 + # source://rubocop//lib/rubocop/config_validator.rb#102 def alert_about_unrecognized_cops(invalid_cop_names); end - # source://rubocop//lib/rubocop/config_validator.rb#253 + # source://rubocop//lib/rubocop/config_validator.rb#251 def check_cop_config_value(hash, parent = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/config_validator.rb#77 + # source://rubocop//lib/rubocop/config_validator.rb#75 def check_obsoletions; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#84 + # source://rubocop//lib/rubocop/config_validator.rb#82 def check_target_ruby; end - # source://rubocop//lib/rubocop/config_validator.rb#195 + # source://rubocop//lib/rubocop/config_validator.rb#193 def each_invalid_parameter(cop_name); end - # source://rubocop//lib/rubocop/config_validator.rb#120 + # source://rubocop//lib/rubocop/config_validator.rb#118 def list_unknown_cops(invalid_cop_names); end # FIXME: Handling colors in exception messages like this is ugly. # - # source://rubocop//lib/rubocop/config_validator.rb#266 + # source://rubocop//lib/rubocop/config_validator.rb#264 def msg_not_boolean(parent, key, value); end - # source://rubocop//lib/rubocop/config_validator.rb#242 + # source://rubocop//lib/rubocop/config_validator.rb#240 def reject_conflicting_safe_settings; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#233 + # source://rubocop//lib/rubocop/config_validator.rb#231 def reject_mutually_exclusive_defaults; end - # source://rubocop//lib/rubocop/config_validator.rb#142 + # source://rubocop//lib/rubocop/config_validator.rb#140 def suggestion(name); end # Returns the value of attribute target_ruby. # - # source://rubocop//lib/rubocop/config_validator.rb#75 + # source://rubocop//lib/rubocop/config_validator.rb#73 def target_ruby; end - # source://rubocop//lib/rubocop/config_validator.rb#207 + # source://rubocop//lib/rubocop/config_validator.rb#205 def validate_enforced_styles(valid_cop_names); end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#169 + # source://rubocop//lib/rubocop/config_validator.rb#167 def validate_new_cops_parameter; end - # source://rubocop//lib/rubocop/config_validator.rb#180 + # source://rubocop//lib/rubocop/config_validator.rb#178 def validate_parameter_names(valid_cop_names); end - # source://rubocop//lib/rubocop/config_validator.rb#227 + # source://rubocop//lib/rubocop/config_validator.rb#225 def validate_support_and_has_list(name, formats, valid); end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#158 + # source://rubocop//lib/rubocop/config_validator.rb#156 def validate_syntax_cop; end end # @api private # -# source://rubocop//lib/rubocop/config_validator.rb#12 +# source://rubocop//lib/rubocop/config_validator.rb#10 RuboCop::ConfigValidator::COMMON_PARAMS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/config_validator.rb#22 +# source://rubocop//lib/rubocop/config_validator.rb#20 RuboCop::ConfigValidator::CONFIG_CHECK_DEPARTMENTS = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/config_validator.rb#21 +# source://rubocop//lib/rubocop/config_validator.rb#19 RuboCop::ConfigValidator::CONFIG_CHECK_KEYS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop//lib/rubocop/config_validator.rb#14 +# source://rubocop//lib/rubocop/config_validator.rb#12 RuboCop::ConfigValidator::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/config_validator.rb#18 +# source://rubocop//lib/rubocop/config_validator.rb#16 RuboCop::ConfigValidator::NEW_COPS_VALUES = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/util.rb#4 @@ -2508,6 +2543,22 @@ module RuboCop::Cop::AllowedPattern def matches_ignored_pattern?(line); end end +# This module encapsulates the ability to allow certain receivers in a cop. +# +# source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#6 +module RuboCop::Cop::AllowedReceivers + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#7 + def allowed_receiver?(receiver); end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#29 + def allowed_receivers; end + + # source://rubocop//lib/rubocop/cop/mixin/allowed_receivers.rb#13 + def receiver_name(receiver); end +end + # Error raised when an unqualified cop name is used that could # refer to two or more cops under different departments # @@ -2700,25 +2751,25 @@ module RuboCop::Cop::AutocorrectLogic # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#46 def disable_offense(offense_range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#111 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#113 def disable_offense_at_end_of_line(range, eol_comment); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#115 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#117 def disable_offense_before_and_after(range_by_lines); end # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#56 def disable_offense_with_eol_or_surround_comment(range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#107 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#109 def max_line_length; end # Expand the given range to include all of any lines it covers. Does not # include newline at end of the last line. # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#97 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#99 def range_by_lines(range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#88 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#90 def range_of_first_line(range); end # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#67 @@ -2914,6 +2965,9 @@ class RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/base.rb#205 def external_dependency_checksum; end + # source://rubocop//lib/rubocop/cop/base.rb#308 + def inspect; end + # Gets called if no message is specified when calling `add_offense` or # `add_global_offense` # Cops are discouraged to override this; instead pass your message directly @@ -2977,83 +3031,91 @@ class RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/base.rb#432 + # source://rubocop//lib/rubocop/cop/base.rb#436 def annotate(message); end - # source://rubocop//lib/rubocop/cop/base.rb#316 + # source://rubocop//lib/rubocop/cop/base.rb#320 def apply_correction(corrector); end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#396 + # source://rubocop//lib/rubocop/cop/base.rb#400 def attempt_correction(range, corrector); end # Reserved for Cop::Cop # - # source://rubocop//lib/rubocop/cop/base.rb#312 + # source://rubocop//lib/rubocop/cop/base.rb#316 def callback_argument(range); end # Called to complete an investigation # - # source://rubocop//lib/rubocop/cop/base.rb#345 + # source://rubocop//lib/rubocop/cop/base.rb#349 def complete_investigation; end # @return [Symbol, Corrector] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#370 + # source://rubocop//lib/rubocop/cop/base.rb#374 def correct(range); end - # source://rubocop//lib/rubocop/cop/base.rb#330 + # source://rubocop//lib/rubocop/cop/base.rb#334 def current_corrector; end # Reserved for Commissioner: # - # source://rubocop//lib/rubocop/cop/base.rb#322 + # source://rubocop//lib/rubocop/cop/base.rb#326 def current_offense_locations; end - # source://rubocop//lib/rubocop/cop/base.rb#334 + # source://rubocop//lib/rubocop/cop/base.rb#338 def current_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#326 + # source://rubocop//lib/rubocop/cop/base.rb#330 def currently_disabled_lines; end - # source://rubocop//lib/rubocop/cop/base.rb#460 + # source://rubocop//lib/rubocop/cop/base.rb#464 def custom_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#456 + # source://rubocop//lib/rubocop/cop/base.rb#460 def default_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#410 + # source://rubocop//lib/rubocop/cop/base.rb#414 def disable_uncorrectable(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#446 + # source://rubocop//lib/rubocop/cop/base.rb#450 def enabled_line?(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#438 + # source://rubocop//lib/rubocop/cop/base.rb#442 def file_name_matches_any?(file, parameter, default_result); end - # source://rubocop//lib/rubocop/cop/base.rb#428 + # source://rubocop//lib/rubocop/cop/base.rb#432 def find_message(range, message); end - # source://rubocop//lib/rubocop/cop/base.rb#452 + # source://rubocop//lib/rubocop/cop/base.rb#456 def find_severity(_range, severity); end - # source://rubocop//lib/rubocop/cop/base.rb#473 + # This experimental feature has been under consideration for a while. + # + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#487 + def lsp_mode?; end + + # source://rubocop//lib/rubocop/cop/base.rb#477 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/base.rb#417 + # source://rubocop//lib/rubocop/cop/base.rb#421 def range_from_node_or_range(node_or_range); end - # source://rubocop//lib/rubocop/cop/base.rb#365 + # source://rubocop//lib/rubocop/cop/base.rb#369 def reset_investigation; end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#385 + # source://rubocop//lib/rubocop/cop/base.rb#389 def use_corrector(range, corrector); end class << self @@ -3061,7 +3123,7 @@ class RuboCop::Cop::Base # time as this cop # # @api public - # @return [Array<RuboCop::Cop::Cop>] + # @return [Array<RuboCop::Cop::Base>] # # source://rubocop//lib/rubocop/cop/base.rb#59 def autocorrect_incompatible_with; end @@ -3143,15 +3205,15 @@ class RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#356 + # source://rubocop//lib/rubocop/cop/base.rb#360 def builtin?; end - # source://rubocop//lib/rubocop/cop/base.rb#338 + # source://rubocop//lib/rubocop/cop/base.rb#342 def restrict_on_send; end end end -# source://rubocop//lib/rubocop/cop/base.rb#342 +# source://rubocop//lib/rubocop/cop/base.rb#346 RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) # Reports of an investigation. @@ -3254,38 +3316,121 @@ module RuboCop::Cop::Bundler; end # gem 'rubocop', '~> 0.90.0' # end # -# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#38 +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#39 class RuboCop::Cop::Bundler::DuplicatedGem < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#57 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#58 def gem_declarations(param0); end - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#44 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#45 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#66 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#67 def conditional_declaration?(nodes); end - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#59 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#60 def duplicated_gem_nodes; end - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#80 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#81 def register_offense(node, gem_name, line_of_first_occurrence); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#74 + # source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#75 def within_conditional?(node, conditional_node); end end -# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#41 +# source://rubocop//lib/rubocop/cop/bundler/duplicated_gem.rb#42 RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String) +# A Gem group, or a set of groups, should be listed only once in a Gemfile. +# +# For example, if the values of `source`, `git`, `platforms`, or `path` +# surrounding `group` are different, no offense will be registered: +# +# [source,ruby] +# ----- +# platforms :ruby do +# group :default do +# gem 'openssl' +# end +# end +# +# platforms :jruby do +# group :default do +# gem 'jruby-openssl' +# end +# end +# ----- +# +# @example +# # bad +# group :development do +# gem 'rubocop' +# end +# +# group :development do +# gem 'rubocop-rails' +# end +# +# # bad (same set of groups declared twice) +# group :development, :test do +# gem 'rubocop' +# end +# +# group :test, :development do +# gem 'rspec' +# end +# +# # good +# group :development do +# gem 'rubocop' +# end +# +# group :development, :test do +# gem 'rspec' +# end +# +# # good +# gem 'rubocop', groups: [:development, :test] +# gem 'rspec', groups: [:development, :test] +# +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#58 +class RuboCop::Cop::Bundler::DuplicatedGroup < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#66 + def group_declarations(param0); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#68 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#82 + def duplicated_group_nodes; end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#105 + def find_source_key(node); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#115 + def group_attributes(node); end + + # source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#94 + def register_offense(node, group_name, line_of_first_occurrence); end +end + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#61 +RuboCop::Cop::Bundler::DuplicatedGroup::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/bundler/duplicated_group.rb#63 +RuboCop::Cop::Bundler::DuplicatedGroup::SOURCE_BLOCK_NAMES = T.let(T.unsafe(nil), Array) + # Each gem in the Gemfile should have a comment explaining # its purpose in the project, or the reason for its version # or source. @@ -3724,31 +3869,37 @@ RuboCop::Cop::Bundler::InsecureProtocolSource::RESTRICT_ON_SEND = T.let(T.unsafe # gem 'rubocop' # # gem 'rspec' -# -# # good only if TreatCommentsAsGroupSeparators is true +# @example TreatCommentsAsGroupSeparators: true (default) +# # good +# # For code quality +# gem 'rubocop' +# # For tests +# gem 'rspec' +# @example TreatCommentsAsGroupSeparators: false +# # bad # # For code quality # gem 'rubocop' # # For tests # gem 'rspec' # -# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#27 +# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#35 class RuboCop::Cop::Bundler::OrderedGems < ::RuboCop::Cop::Base include ::RuboCop::Cop::OrderedGemNode extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#56 + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#64 def gem_declarations(param0); end - # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#35 + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#43 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#49 + # source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#57 def previous_declaration(node); end end -# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#31 +# source://rubocop//lib/rubocop/cop/bundler/ordered_gems.rb#39 RuboCop::Cop::Bundler::OrderedGems::MSG = T.let(T.unsafe(nil), String) # Common functionality for checking assignment nodes. @@ -4608,7 +4759,7 @@ module RuboCop::Cop::ConfigurableFormatting # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#29 + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#30 def class_emitter_method?(node, name); end # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#17 @@ -4616,7 +4767,7 @@ module RuboCop::Cop::ConfigurableFormatting # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#23 + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#24 def valid_name?(node, name, given_style = T.unsafe(nil)); end end @@ -4856,7 +5007,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter # Legacy # - # source://parser/3.2.2.0/lib/parser/source/tree_rewriter.rb#252 + # source://parser/3.3.0.5/lib/parser/source/tree_rewriter.rb#252 def rewrite; end # Swaps sources at the given ranges. @@ -5523,7 +5674,7 @@ RuboCop::Cop::Gemspec::DependencyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#59 RuboCop::Cop::Gemspec::DependencyVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) -# Checks that deprecated attribute attributes are not set in a gemspec file. +# Checks that deprecated attributes are not set in a gemspec file. # Removing deprecated attributes allows the user to receive smaller packed gems. # # @example @@ -5766,34 +5917,40 @@ RuboCop::Cop::Gemspec::DuplicatedAssignment::MSG = T.let(T.unsafe(nil), String) # spec.add_runtime_dependency 'rubocop' # # spec.add_runtime_dependency 'rspec' -# -# # good only if TreatCommentsAsGroupSeparators is true +# @example TreatCommentsAsGroupSeparators: true (default) +# # good +# # For code quality +# spec.add_dependency 'rubocop' +# # For tests +# spec.add_dependency 'rspec' +# @example TreatCommentsAsGroupSeparators: false +# # bad # # For code quality # spec.add_dependency 'rubocop' # # For tests # spec.add_dependency 'rspec' # -# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#53 +# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#61 class RuboCop::Cop::Gemspec::OrderedDependencies < ::RuboCop::Cop::Base include ::RuboCop::Cop::OrderedGemNode extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#87 + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#95 def dependency_declarations(param0); end - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#61 + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#69 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#82 + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#90 def get_dependency_name(node); end - # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#76 + # source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#84 def previous_declaration(node); end end -# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#57 +# source://rubocop//lib/rubocop/cop/gemspec/ordered_dependencies.rb#65 RuboCop::Cop::Gemspec::OrderedDependencies::MSG = T.let(T.unsafe(nil), String) # Requires a gemspec to have `rubygems_mfa_required` metadata set. @@ -6384,61 +6541,61 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#122 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#125 def brackets?(method_dispatch_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#152 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#155 def breakdown_value_types_of_hash(hash_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#99 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#102 def def_node_that_require_parentheses(node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#176 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#179 def each_omittable_value_pair(hash_value_type_breakdown, &block); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#172 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#175 def each_omitted_value_pair(hash_value_type_breakdown, &block); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#77 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#80 def enforced_shorthand_syntax; end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#114 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#117 def find_ancestor_method_dispatch_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#164 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#167 def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#168 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#171 def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#71 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#74 def ignore_hash_shorthand_syntax?(pair_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#66 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#69 def ignore_mixed_hash_shorthand_syntax?(hash_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#137 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#140 def last_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#145 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#148 def method_dispatch_as_argument?(method_dispatch_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#180 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#183 def mixed_shorthand_syntax_check(hash_value_type_breakdown); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#196 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#199 def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#49 @@ -6446,22 +6603,22 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#81 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#84 def require_hash_value?(hash_key_source, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#90 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#93 def require_hash_value_for_around_hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#126 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#129 def use_element_of_hash_literal_as_receiver?(ancestor, parent); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#131 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#134 def use_modifier_form_without_parenthesized_method_call?(ancestor); end end @@ -6474,12 +6631,12 @@ RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_MSG_PREFIX = T.let(T.unsafe(nil), # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#11 RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_OMIT_VALUE_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#206 +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#209 class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#215 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#218 def first_argument; end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#219 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#222 def last_argument; end # Returns the value of attribute node @@ -6493,7 +6650,7 @@ class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct # @return [Object] the newly set value def node=(_); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#207 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#210 def selector; end class << self @@ -6749,7 +6906,7 @@ module RuboCop::Cop::Heredoc # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#28 def delimiter_string(node); end - # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#32 + # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#34 def heredoc_type(node); end # source://rubocop//lib/rubocop/cop/mixin/heredoc.rb#23 @@ -6877,74 +7034,74 @@ class RuboCop::Cop::LambdaLiteralToMethodCorrector # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#115 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#118 def arg_to_unparenthesized_call?; end # Returns the value of attribute arguments. # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#31 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 def arguments; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#99 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#102 def arguments_begin_pos; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#95 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#98 def arguments_end_pos; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#107 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#110 def block_begin; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#103 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#106 def block_end; end # Returns the value of attribute block_node. # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#31 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 def block_node; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#56 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#59 def insert_arguments(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#40 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#43 def insert_separating_space(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#85 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#88 def lambda_arg_string; end # Returns the value of attribute method. # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#31 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#34 def method; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#89 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#92 def needs_separating_space?; end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#50 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#53 def remove_arguments(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#63 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#66 def remove_leading_whitespace(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#71 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#74 def remove_trailing_whitespace(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#33 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#36 def remove_unparenthesized_whitespace(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#76 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#79 def replace_delimiters(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#46 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#49 def replace_selector(corrector); end - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#111 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#114 def selector_end; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#131 + # source://rubocop//lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb#134 def separating_space?; end end @@ -7769,7 +7926,7 @@ RuboCop::Cop::Layout::CaseIndentation::MSG = T.let(T.unsafe(nil), String) # end # end # -# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#135 +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#142 class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base include ::RuboCop::Cop::VisibilityHelp include ::RuboCop::Cop::CommentsHelp @@ -7778,29 +7935,35 @@ class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base # Validates code style on class declaration. # Add offense when find a node out of expected order. # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#151 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#158 def on_class(class_node); end + # Validates code style on class declaration. + # Add offense when find a node out of expected order. + # + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#158 + def on_sclass(class_node); end + private # Autocorrect by swapping between two nodes autocorrecting them # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#166 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#174 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#297 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#305 def begin_pos_with_comment(node); end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#320 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#328 def buffer; end # Setting categories hash allow you to group methods in group to match # in the {expected_order}. # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#332 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#340 def categories; end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#226 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#234 def class_elements(class_node); end # Classifies a node to match with something in the {expected_order} @@ -7812,21 +7975,21 @@ class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base # by method name # @return String otherwise trying to {humanize_node} of the current node # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#186 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#194 def classify(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#263 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#271 def dynamic_constant?(node); end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#287 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#295 def end_position_for(node); end # Load expected order from `ExpectedOrder` config. # Define new terms in the expected order by adding new {categories}. # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#326 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#334 def expected_order; end # Categorize a node according to the {expected_order} @@ -7836,51 +7999,51 @@ class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base # @param node to be analysed. # @return [String] with the key category or the `method_name` as string # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#204 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#212 def find_category(node); end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#316 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#324 def find_heredoc(node); end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#254 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#262 def humanize_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#238 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#246 def ignore?(node, classification); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#245 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#253 def ignore_for_autocorrect?(node, sibling); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#281 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#289 def marked_as_private_constant?(node, name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#271 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#279 def private_constant?(node); end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#312 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#320 def start_line_position(node); end - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#217 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#225 def walk_over_nested_class_definition(class_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#308 + # source://rubocop//lib/rubocop/cop/layout/class_structure.rb#316 def whole_line_comment_at_line?(line); end end -# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#140 +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#147 RuboCop::Cop::Layout::ClassStructure::HUMANIZED_NODE_TYPE = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#147 +# source://rubocop//lib/rubocop/cop/layout/class_structure.rb#154 RuboCop::Cop::Layout::ClassStructure::MSG = T.let(T.unsafe(nil), String) # Checks the indentation of here document closings. @@ -7925,53 +8088,53 @@ RuboCop::Cop::Layout::ClassStructure::MSG = T.let(T.unsafe(nil), String) # Hi # EOS # -# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#49 +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#48 class RuboCop::Cop::Layout::ClosingHeredocIndentation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Heredoc extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#58 + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#57 def on_heredoc(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#75 + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#74 def argument_indentation_correct?(node); end - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#83 + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#82 def closing_indentation(node); end - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#102 + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#101 def find_node_used_heredoc_argument(node); end - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#91 + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#90 def heredoc_closing(node); end - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#87 + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#86 def heredoc_opening(node); end - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#118 + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#117 def indent_level(source_line); end - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#95 + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#94 def indented_end(node); end - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#110 + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#109 def message(node); end - # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#71 + # source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#70 def opening_indentation(node); end end -# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#54 +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#53 RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#55 +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#54 RuboCop::Cop::Layout::ClosingHeredocIndentation::MSG_ARG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#53 +# source://rubocop//lib/rubocop/cop/layout/closing_heredoc_indentation.rb#52 RuboCop::Cop::Layout::ClosingHeredocIndentation::SIMPLE_HEREDOC = T.let(T.unsafe(nil), String) # Checks the indentation of hanging closing parentheses in @@ -8345,11 +8508,6 @@ class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#137 - def ampersand_dot?(node); end - # source://rubocop//lib/rubocop/cop/layout/dot_position.rb#49 def autocorrect(corrector, dot, node); end @@ -8572,7 +8730,23 @@ end # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#67 RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String) -# Enforces empty line after guard clause +# Enforces empty line after guard clause. +# +# This cop allows `# :nocov:` directive after guard clause because +# SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: +# +# [source,ruby] +# ---- +# def foo +# # :nocov: +# return if condition +# # :nocov: +# bar +# end +# ---- +# +# Refer to SimpleCov's documentation for more details: +# https://github.com/simplecov-ruby/simplecov#ignoringskipping-code # # @example # @@ -8605,90 +8779,106 @@ RuboCop::Cop::Layout::EmptyComment::MSG = T.let(T.unsafe(nil), String) # end # end # -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#38 +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#54 class RuboCop::Cop::Layout::EmptyLineAfterGuardClause < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::PathUtil extend ::RuboCop::Cop::Util - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#46 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#63 def on_if(node); end private - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#65 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#84 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#87 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#106 def contains_guard_clause?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#80 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#99 def correct_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#160 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#181 def heredoc?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#153 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#174 def heredoc_line(node, heredoc_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#129 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#148 def last_heredoc_argument(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#143 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#162 def last_heredoc_argument_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#172 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#199 def multiple_statements_on_line?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#98 - def next_line_empty?(line); end + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#121 + def next_line_allowed_directive_comment?(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#91 - def next_line_empty_or_enable_directive_comment?(line); end + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#117 + def next_line_empty?(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#102 - def next_line_enable_directive_comment?(line); end + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#110 + def next_line_empty_or_allowed_directive_comment?(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#108 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#127 def next_line_rescue_or_ensure?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#122 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#141 def next_sibling_empty_or_guard_clause?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#113 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#132 def next_sibling_parent_empty_or_else?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#164 + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#191 def offense_location(node); end + + # SimpleCov excludes code from the coverage report by wrapping it in `# :nocov:`: + # https://github.com/simplecov-ruby/simplecov#ignoringskipping-code + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#208 + def simplecov_directive_comment?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#185 + def use_heredoc_in_condition?(condition); end end -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#44 +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#60 RuboCop::Cop::Layout::EmptyLineAfterGuardClause::END_OF_HEREDOC_LINE = T.let(T.unsafe(nil), Integer) -# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#43 +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#59 RuboCop::Cop::Layout::EmptyLineAfterGuardClause::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/layout/empty_line_after_guard_clause.rb#61 +RuboCop::Cop::Layout::EmptyLineAfterGuardClause::SIMPLE_DIRECTIVE_COMMENT_PATTERN = T.let(T.unsafe(nil), Regexp) + # Checks for a newline after the final magic comment. # # @example @@ -8936,7 +9126,7 @@ class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#144 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#145 def autocorrect(corrector, prev_def, node, count); end # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#130 @@ -8955,73 +9145,84 @@ class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#267 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#290 def allowance_range?; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#251 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#274 def autocorrect_insert_lines(corrector, newline_pos, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#244 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#267 def autocorrect_remove_lines(corrector, newline_pos, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#208 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#227 def blank_lines_count_between(first_def_node, second_def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#162 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#171 def candidate?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#172 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#191 def class_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#232 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#255 def def_end(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#228 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#163 + def def_location(correction_node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#247 def def_start(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#236 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#178 + def empty_line_between_macros; end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#259 def end_loc(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#186 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#205 def expected_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#204 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#223 def line_count_allowed?(count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#220 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#239 def lines_between_defs(first_def_node, second_def_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#216 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#182 + def macro_candidate?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#235 def maximum_empty_lines; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#180 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#199 def message(node, count: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#168 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#187 def method_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#212 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#231 def minimum_empty_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#176 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#195 def module_candidate?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#195 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#214 def multiple_blank_lines_groups?(first_def_node, second_def_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#258 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#281 def node_type(node); end class << self @@ -9695,36 +9896,42 @@ class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCo include ::RuboCop::Cop::Layout::EmptyLinesAroundBody extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 + def on_block(node); end + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 def on_def(node); end # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#72 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#74 def on_kwbegin(node); end + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#67 + def on_numblock(node); end + private - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#79 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#81 def check_body(body, line_of_def_or_kwbegin); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#106 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#108 def keyword_locations(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#123 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#125 def keyword_locations_in_ensure(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#119 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#121 def keyword_locations_in_rescue(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#94 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#96 def last_rescue_and_end_on_same_line(body); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#98 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#100 def message(location, keyword); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#102 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#104 def style; end end @@ -9900,54 +10107,54 @@ class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::EndKeywordAlignment extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#105 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#109 def on_case(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#105 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#109 def on_case_match(node); end # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#81 def on_class(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#93 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#97 def on_if(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#89 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#93 def on_module(node); end # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#85 def on_sclass(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#101 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#105 def on_until(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#97 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#101 def on_while(node); end private - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#161 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#165 def alignment_node(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#172 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#182 def alignment_node_for_variable_style(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#142 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#146 def asgn_variable_align_with(outer_node, inner_node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#190 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#200 def assignment_or_operator_method(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#116 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#120 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#131 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#135 def check_asgn_alignment(outer_node, inner_node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#120 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#124 def check_assignment(node, rhs); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#152 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#156 def check_other_alignment(node); end end @@ -10050,13 +10257,13 @@ class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#176 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#170 def align_column(asgn_token); end - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#153 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#147 def align_equal_sign(corrector, token, align_to); end - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#143 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#137 def align_equal_signs(range, corrector); end # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#52 @@ -10064,46 +10271,46 @@ class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#109 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#103 def aligned_tok?(token); end - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#165 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#159 def all_relevant_assignment_lines(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#185 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#179 def allow_for_trailing_comments?; end - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#78 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#72 def check_assignment(token); end - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#87 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#81 def check_other(token1, token2, ast); end - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#68 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#62 def check_tokens(ast, token1, token2); end # @yield [range_between(start_pos, end_pos)] # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#97 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#91 def extra_space_range(token1, token2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#139 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#133 def force_equal_sign_alignment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#117 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#111 def ignored_range?(ast, start_pos); end # Returns an array of ranges that should not be reported. It's the # extra spaces between the keys and values in a multiline hash, # since those are handled by the Layout/HashAlignment cop. # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#124 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#118 def ignored_ranges(ast); end end @@ -10336,7 +10543,10 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # Checks the indentation of the first element in an array literal # where the opening bracket and the first element are on separate lines. -# The other elements' indentations are handled by the ArrayAlignment cop. +# The other elements' indentations are handled by `Layout/ArrayAlignment` cop. +# +# This cop will respect `Layout/ArrayAlignment` and will not work when +# `EnforcedStyle: with_fixed_indentation` is specified for `Layout/ArrayAlignment`. # # By default, array literals that are arguments in a method call with # parentheses, and where the opening square bracket of the array is on the @@ -10356,7 +10566,7 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # # element are on separate lines is indented one step (two spaces) more # # than the position inside the opening parenthesis. # -# #bad +# # bad # array = [ # :value # ] @@ -10364,7 +10574,7 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # :no_difference # ]) # -# #good +# # good # array = [ # :value # ] @@ -10377,7 +10587,7 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # # separate lines is indented the same as an array literal which is not # # defined inside a method call. # -# #bad +# # bad # # consistent # array = [ # :value @@ -10386,7 +10596,7 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # :its_like_this # ]) # -# #good +# # good # array = [ # :value # ] @@ -10397,131 +10607,128 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # # The `align_brackets` style enforces that the opening and closing # # brackets are indented to the same position. # -# #bad +# # bad # # align_brackets # and_now_for_something = [ # :completely_different # ] # -# #good +# # good # # align_brackets # and_now_for_something = [ # :completely_different # ] # -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#82 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#85 class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::MultilineElementIndentation extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#94 def on_array(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#95 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#98 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#95 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#98 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#104 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#189 + def array_alignment_config; end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#109 def autocorrect(corrector, node); end # Returns the description of what the correct indentation is based on. # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#142 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#147 def base_description(indent_base_type); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#108 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#113 def brace_alignment_style; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#112 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#117 def check(array_node, left_parenthesis); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#126 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#131 def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#155 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#183 + def enforce_first_argument_with_fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#160 def message(base_description); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#163 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#168 def message_for_right_bracket(indent_base_type); end end -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#88 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 RuboCop::Cop::Layout::FirstArrayElementIndentation::MSG = T.let(T.unsafe(nil), String) # Checks for a line break before the first element in a # multi-line array. # -# @example AllowMultilineFinalElement: false (default) +# @example # # # bad # [ :a, # :b] # -# # bad -# [ :a, { -# :b => :c -# }] -# -# # good -# [:a, :b] -# # # good # [ # :a, # :b] # # # good -# [ -# :a, { -# :b => :c -# }] -# @example AllowMultilineFinalElement: true +# [:a, :b] +# @example AllowMultilineFinalElement: false (default) # # # bad -# [ :a, -# :b] -# -# # good # [ :a, { # :b => :c # }] # # # good # [ -# :a, -# :b] +# :a, { +# :b => :c +# }] +# @example AllowMultilineFinalElement: true # # # good -# [:a, :b] +# [:a, { +# :b => :c +# }] # -# source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#52 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#43 class RuboCop::Cop::Layout::FirstArrayElementLineBreak < ::RuboCop::Cop::Base include ::RuboCop::Cop::FirstElementLineBreak extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#58 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#49 def on_array(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#66 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#57 def assignment_on_same_line?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#71 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#62 def ignore_last_element?; end end -# source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#56 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_line_break.rb#47 RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), String) # Checks the indentation of the first key in a hash literal @@ -10693,17 +10900,12 @@ RuboCop::Cop::Layout::FirstHashElementIndentation::MSG = T.let(T.unsafe(nil), St # Checks for a line break before the first element in a # multi-line hash. # -# @example AllowMultilineFinalElement: false (default) +# @example # # # bad # { a: 1, # b: 2} # -# # bad -# { a: 1, b: { -# c: 3 -# }} -# # # good # { # a: 1, @@ -10714,11 +10916,13 @@ RuboCop::Cop::Layout::FirstHashElementIndentation::MSG = T.let(T.unsafe(nil), St # a: 1, b: { # c: 3 # }} -# @example AllowMultilineFinalElement: true +# @example AllowMultilineFinalElement: false (default) # # # bad -# { a: 1, -# b: 2} +# { a: 1, b: { +# c: 3 +# }} +# @example AllowMultilineFinalElement: true # # # bad # { a: 1, @@ -10731,45 +10935,44 @@ RuboCop::Cop::Layout::FirstHashElementIndentation::MSG = T.let(T.unsafe(nil), St # c: 3 # }} # -# # good -# { -# a: 1, -# b: 2 } -# -# # good -# { -# a: 1, b: { -# c: 3 -# }} -# -# source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#58 +# source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#46 class RuboCop::Cop::Layout::FirstHashElementLineBreak < ::RuboCop::Cop::Base include ::RuboCop::Cop::FirstElementLineBreak extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#64 + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#52 def on_hash(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#74 + # source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#62 def ignore_last_element?; end end -# source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#62 +# source://rubocop//lib/rubocop/cop/layout/first_hash_element_line_break.rb#50 RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), String) # Checks for a line break before the first argument in a # multi-line method call. # -# @example AllowMultilineFinalElement: false (default) +# @example # # # bad # method(foo, bar, # baz) # +# # good +# method( +# foo, bar, +# baz) +# +# # ignored +# method foo, bar, +# baz +# @example AllowMultilineFinalElement: false (default) +# # # bad # method(foo, bar, { # baz: "a", @@ -10778,26 +10981,13 @@ RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), Stri # # # good # method( -# foo, bar, -# baz) -# -# # good -# method( # foo, bar, { # baz: "a", # qux: "b", # }) -# -# # ignored -# method foo, bar, -# baz # @example AllowMultilineFinalElement: true # # # bad -# method(foo, bar, -# baz) -# -# # bad # method(foo, # bar, # { @@ -10814,11 +11004,6 @@ RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), Stri # # # good # method( -# foo, bar, -# baz) -# -# # good -# method( # foo, # bar, # { @@ -10827,39 +11012,35 @@ RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), Stri # } # ) # -# # ignored -# method foo, bar, -# baz -# -# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#76 +# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#66 class RuboCop::Cop::Layout::FirstMethodArgumentLineBreak < ::RuboCop::Cop::Base include ::RuboCop::Cop::FirstElementLineBreak extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#82 + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#82 + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 def on_send(node); end - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#82 + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 def on_super(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#101 + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#91 def ignore_last_element?; end end -# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#80 +# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#70 RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), String) # Checks for a line break before the first parameter in a # multi-line method parameter definition. # -# @example AllowMultilineFinalElement: false (default) +# @example # # # bad # def method(foo, bar, @@ -10867,13 +11048,6 @@ RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), S # do_something # end # -# # bad -# def method(foo, bar, baz = { -# :a => "b", -# }) -# do_something -# end -# # # good # def method( # foo, bar, @@ -10881,28 +11055,14 @@ RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), S # do_something # end # -# # good -# def method( -# foo, bar, baz = { -# :a => "b", -# }) -# do_something -# end -# # # ignored # def method foo, # bar # do_something # end -# @example AllowMultilineFinalElement: true +# @example AllowMultilineFinalElement: false (default) # # # bad -# def method(foo, bar, -# baz) -# do_something -# end -# -# # good # def method(foo, bar, baz = { # :a => "b", # }) @@ -10911,37 +11071,40 @@ RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), S # # # good # def method( -# foo, bar, -# baz) +# foo, bar, baz = { +# :a => "b", +# }) # do_something # end +# @example AllowMultilineFinalElement: true # -# # ignored -# def method foo, -# bar +# # good +# def method(foo, bar, baz = { +# :a => "b", +# }) # do_something # end # -# source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#73 +# source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#56 class RuboCop::Cop::Layout::FirstMethodParameterLineBreak < ::RuboCop::Cop::Base include ::RuboCop::Cop::FirstElementLineBreak extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#79 + # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#62 def on_def(node); end - # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#79 + # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#62 def on_defs(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#86 + # source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#69 def ignore_last_element?; end end -# source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#77 +# source://rubocop//lib/rubocop/cop/layout/first_method_parameter_line_break.rb#60 RuboCop::Cop::Layout::FirstMethodParameterLineBreak::MSG = T.let(T.unsafe(nil), String) # Checks the indentation of the first parameter in a method @@ -11507,7 +11670,7 @@ RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(ni # # Note: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default), # this cop does not add any offenses for long here documents to -# avoid `Layout/LineLength`'s offenses. +# avoid ``Layout/LineLength``'s offenses. # # @example # # bad @@ -11525,71 +11688,72 @@ class RuboCop::Cop::Layout::HeredocIndentation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::Heredoc extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#33 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#36 def on_heredoc(node); end private - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#117 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#120 def adjust_minus(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#112 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#115 def adjust_squiggly(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#141 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#144 def base_indent_level(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#152 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#155 def heredoc_body(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#156 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#159 def heredoc_end(node); end # Returns '~', '-' or nil # - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#148 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#151 def heredoc_indent_type(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#123 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#126 def indented_body(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#130 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#133 def indented_end(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#88 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#91 def line_too_long?(node); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#100 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#103 def longest_line(lines); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#108 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#111 def max_line_length; end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#66 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#69 def message(heredoc_indent_type); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#54 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#57 def register_offense(node, heredoc_indent_type); end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#76 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#79 def type_message(indentation_width, current_indent_type); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#104 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#107 def unlimited_heredoc_length?; end - # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#84 + # source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#87 def width_message(indentation_width); end end -# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#29 +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#32 RuboCop::Cop::Layout::HeredocIndentation::TYPE_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#31 +# source://rubocop//lib/rubocop/cop/layout/heredoc_indentation.rb#34 RuboCop::Cop::Layout::HeredocIndentation::WIDTH_MSG = T.let(T.unsafe(nil), String) # Checks for inconsistent indentation. @@ -12249,35 +12413,38 @@ class RuboCop::Cop::Layout::LineContinuationLeadingSpace < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#105 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#113 def autocorrect(corrector, offense_range, insert_pos, spaces); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#101 - def continuation?(line); end + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#106 + def continuation?(line, line_num, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#130 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#138 def enforced_style_leading?; end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#79 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#76 + def investigate(first_line, second_line, end_of_first_line); end + + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#84 def investigate_leading_style(first_line, second_line, end_of_first_line); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#90 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#95 def investigate_trailing_style(first_line, second_line, end_of_first_line); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#110 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#118 def leading_offense_range(end_of_first_line, matches); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#122 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#130 def message(_range); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#75 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#72 def raw_lines(node); end - # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#116 + # source://rubocop//lib/rubocop/cop/layout/line_continuation_leading_space.rb#124 def trailing_offense_range(end_of_first_line, matches); end end @@ -12439,7 +12606,7 @@ class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::C include ::RuboCop::Cop::Alignment extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#95 + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#97 def autocorrect(corrector, node); end # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#83 @@ -12447,26 +12614,26 @@ class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::C private - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#135 + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#137 def add_offense_and_correction(node, message); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#107 + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#109 def always_indented?(dstr_node); end - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#126 + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#128 def base_column(child); end - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#111 + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#113 def check_aligned(children, start_index); end - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#120 + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#122 def check_indented(children); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#101 + # source://rubocop//lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb#103 def strings_concatenated_with_backslash?(dstr_node); end end @@ -12774,7 +12941,7 @@ RuboCop::Cop::Layout::MultilineArrayBraceLayout::SAME_LINE_MESSAGE = T.let(T.uns # Ensures that each item in a multi-line array # starts on a separate line. # -# @example AllowMultilineFinalElement: false (default) +# @example # # # bad # [ @@ -12782,11 +12949,6 @@ RuboCop::Cop::Layout::MultilineArrayBraceLayout::SAME_LINE_MESSAGE = T.let(T.uns # c # ] # -# # bad -# [ a, b, foo( -# bar -# )] -# # # good # [ # a, @@ -12802,52 +12964,36 @@ RuboCop::Cop::Layout::MultilineArrayBraceLayout::SAME_LINE_MESSAGE = T.let(T.uns # bar # ) # ] -# @example AllowMultilineFinalElement: true +# @example AllowMultilineFinalElement: false (default) # # # bad -# [ -# a, b, -# c -# ] -# -# # good -# [ a, b, foo( +# [a, b, foo( # bar # )] +# @example AllowMultilineFinalElement: true # # # good -# [ -# a, -# b, -# c -# ] -# -# # good -# [ -# a, -# b, -# foo( +# [a, b, foo( # bar -# ) -# ] +# )] # -# source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#66 +# source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#47 class RuboCop::Cop::Layout::MultilineArrayLineBreaks < ::RuboCop::Cop::Base include ::RuboCop::Cop::MultilineElementLineBreaks extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#72 + # source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#53 def on_array(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#78 + # source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#59 def ignore_last_element?; end end -# source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#70 +# source://rubocop//lib/rubocop/cop/layout/multiline_array_line_breaks.rb#51 RuboCop::Cop::Layout::MultilineArrayLineBreaks::MSG = T.let(T.unsafe(nil), String) # Checks whether the multiline assignments have a newline @@ -13146,7 +13292,7 @@ RuboCop::Cop::Layout::MultilineHashBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsa # Ensures that each key in a multi-line hash # starts on a separate line. # -# @example AllowMultilineFinalElement: false (default) +# @example # # # bad # { @@ -13154,11 +13300,6 @@ RuboCop::Cop::Layout::MultilineHashBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsa # c: 3 # } # -# # bad -# { a: 1, b: { -# c: 3, -# }} -# # # good # { # a: 1, @@ -13173,56 +13314,41 @@ RuboCop::Cop::Layout::MultilineHashBraceLayout::SAME_LINE_MESSAGE = T.let(T.unsa # c: 3, # } # } -# @example AllowMultilineFinalElement: true +# @example AllowMultilineFinalElement: false (default) # # # bad -# { -# a: 1, b: 2, -# c: 3 -# } -# -# # good # { a: 1, b: { # c: 3, # }} +# @example AllowMultilineFinalElement: true # # # good -# { -# a: 1, -# b: 2, -# c: 3 -# } -# -# # good -# { -# a: 1, -# b: { +# { a: 1, b: { # c: 3, -# } -# } +# }} # -# source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#65 +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#46 class RuboCop::Cop::Layout::MultilineHashKeyLineBreaks < ::RuboCop::Cop::Base include ::RuboCop::Cop::MultilineElementLineBreaks extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#71 + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#52 def on_hash(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#87 + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#68 def ignore_last_element?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#83 + # source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#64 def starts_with_curly_brace?(node); end end -# source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#69 +# source://rubocop//lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb#50 RuboCop::Cop::Layout::MultilineHashKeyLineBreaks::MSG = T.let(T.unsafe(nil), String) # Ensures that each argument in a multi-line method call @@ -13231,7 +13357,7 @@ RuboCop::Cop::Layout::MultilineHashKeyLineBreaks::MSG = T.let(T.unsafe(nil), Str # NOTE: This cop does not move the first argument, if you want that to # be on a separate line, see `Layout/FirstMethodArgumentLineBreak`. # -# @example AllowMultilineFinalElement: false (default) +# @example # # # bad # foo(a, b, @@ -13252,6 +13378,7 @@ RuboCop::Cop::Layout::MultilineHashKeyLineBreaks::MSG = T.let(T.unsafe(nil), Str # # # good # foo(a, b, c) +# @example AllowMultilineFinalElement: false (default) # # # good # foo( @@ -13263,26 +13390,6 @@ RuboCop::Cop::Layout::MultilineHashKeyLineBreaks::MSG = T.let(T.unsafe(nil), Str # ) # @example AllowMultilineFinalElement: true # -# # bad -# foo(a, b, -# c -# ) -# -# # good -# foo(a, b, { -# foo: "bar", -# }) -# -# # good -# foo( -# a, -# b, -# c -# ) -# -# # good -# foo(a, b, c) -# # # good # foo( # a, @@ -13292,23 +13399,23 @@ RuboCop::Cop::Layout::MultilineHashKeyLineBreaks::MSG = T.let(T.unsafe(nil), Str # } # ) # -# source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#73 +# source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#56 class RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks < ::RuboCop::Cop::Base include ::RuboCop::Cop::MultilineElementLineBreaks extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#79 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#62 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#98 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#81 def ignore_last_element?; end end -# source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#77 +# source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#60 RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks::MSG = T.let(T.unsafe(nil), String) # Checks that the closing brace in a method call is either @@ -13503,10 +13610,13 @@ class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Bas # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#101 def extra_indentation(given_style, parent); end - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#222 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#226 + def find_multiline_block_chain_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#237 def first_call_has_a_dot(node); end - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#213 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#217 def get_dot_right_above(node); end # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#113 @@ -13520,12 +13630,12 @@ class RuboCop::Cop::Layout::MultilineMethodCallIndentation < ::RuboCop::Cop::Bas # @yield [operation_rhs.first_argument] # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#232 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#247 def operation_rhs(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#242 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_indentation.rb#257 def operator_rhs?(node, receiver); end # a @@ -13696,7 +13806,7 @@ RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::SAME_LINE_MESSAGE = # NOTE: This cop does not move the first argument, if you want that to # be on a separate line, see `Layout/FirstMethodParameterLineBreak`. # -# @example AllowMultilineFinalElement: false (default) +# @example # # # bad # def foo(a, b, @@ -13704,12 +13814,6 @@ RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::SAME_LINE_MESSAGE = # ) # end # -# # bad -# def foo(a, b = { -# foo: "bar", -# }) -# end -# # # good # def foo( # a, @@ -13730,58 +13834,38 @@ RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout::SAME_LINE_MESSAGE = # # good # def foo(a, b, c) # end -# @example AllowMultilineFinalElement: true +# @example AllowMultilineFinalElement: false (default) # # # bad -# def foo(a, b, -# c -# ) -# end -# -# # good # def foo(a, b = { # foo: "bar", # }) # end +# @example AllowMultilineFinalElement: true # # # good -# def foo( -# a, -# b, -# c -# ) -# end -# -# # good -# def foo( -# a, -# b = { +# def foo(a, b = { # foo: "bar", -# } -# ) -# end -# -# # good -# def foo(a, b, c) +# }) # end # -# source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#81 +# source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#57 class RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks < ::RuboCop::Cop::Base include ::RuboCop::Cop::MultilineElementLineBreaks extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#87 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#63 def on_def(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#95 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#71 def ignore_last_element?; end end -# source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#85 +# source://rubocop//lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb#61 RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks::MSG = T.let(T.unsafe(nil), String) # Checks the indentation of the right hand side operand in binary operations that @@ -14010,61 +14094,77 @@ class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base include ::RuboCop::Cop::CheckAssignment extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#55 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#51 + def on_lvasgn(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#55 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#64 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#73 def check_assignment(node, _rhs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#112 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#125 def comment_within?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#82 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#95 def configured_to_not_be_inspected?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#106 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#119 def convertible_block?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#132 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#69 + def end_with_percent_blank_string?(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#91 + def index_access_call_chained?(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#147 def max_line_length; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#77 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#86 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#89 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#102 def other_cop_takes_precedence?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#70 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#79 def register_offense(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#95 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#108 def single_line_block_chain_enabled?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#99 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#112 def suitable_as_single_line?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#123 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#138 def to_single_line(source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#118 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#133 def too_long?(node); end end @@ -14199,21 +14299,29 @@ class RuboCop::Cop::Layout::SingleLineBlockChain < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#28 + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#32 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#32 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#51 + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#56 def call_method_after_block?(node, dot_range, closing_block_delimiter_line_num); end - # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#35 + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#40 def offending_range(node); end - # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#57 + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#62 def selector_range(node); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#28 + def autocorrect_incompatible_with; end + end end # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#26 @@ -14276,6 +14384,13 @@ class RuboCop::Cop::Layout::SpaceAfterComma < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#21 def space_style_before_rcurly; end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_after_comma.rb#32 + def before_semicolon?(token); end end # Checks for space between a method name and a left parenthesis in defs. @@ -14720,7 +14835,7 @@ RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), # foo &. bar # foo &. bar&. buzz # RuboCop:: Cop -# RuboCop:: Cop:: Cop +# RuboCop:: Cop:: Base # :: RuboCop::Cop # # # good @@ -14732,7 +14847,7 @@ RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), # foo&.bar # foo&.bar&.buzz # RuboCop::Cop -# RuboCop::Cop::Cop +# RuboCop::Cop::Base # ::RuboCop::Cop # # source://rubocop//lib/rubocop/cop/layout/space_around_method_call_operator.rb#37 @@ -14813,149 +14928,166 @@ RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::SPACES_REGEXP = T.let(T.uns # # # good # a ** b +# @example EnforcedStyleForRationalLiterals: no_space (default) +# # bad +# 1 / 48r # -# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#53 +# # good +# 1/48r +# @example EnforcedStyleForRationalLiterals: space +# # bad +# 1/48r +# +# # good +# 1 / 48r +# +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#67 class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base include ::RuboCop::Cop::PrecedingFollowingAlignment include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::RationalLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 def on_and(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_and_asgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_assignment(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 def on_binary(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#111 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#125 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 def on_class(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_cvasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_gvasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#78 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#92 def on_if(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_ivasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_masgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#135 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#149 def on_match_pattern(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#127 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#141 def on_op_asgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 def on_or(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_or_asgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#70 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#84 def on_pair(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#85 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#99 def on_resbody(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#66 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#80 def on_sclass(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#93 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#107 def on_send(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#127 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#141 def on_special_asgn(node); end private - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#236 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#256 def align_hash_cop_config; end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#179 - def autocorrect(corrector, range); end + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#195 + def autocorrect(corrector, range, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#163 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#179 def check_operator(type, operator, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#189 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#209 def enclose_operator_with_space(corrector, range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#216 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#236 def excess_leading_space?(type, operator, with_space); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#231 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#251 def excess_trailing_space?(right_operand, with_space); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#248 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#274 def force_equal_sign_alignment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#240 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#260 def hash_table_style?; end # @yield [msg] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#174 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#190 def offense(type, operator, with_space, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#202 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#222 def offense_message(type, operator, with_space, right_operand); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#159 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#175 def operator_with_regular_syntax?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#155 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#169 def regular_operator?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#252 - def should_not_have_surrounding_space?(operator); end + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#278 + def should_not_have_surrounding_space?(operator, right_operand); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#244 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#264 def space_around_exponent_operator?; end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#268 + def space_around_slash_operator?(right_operand); end + class << self - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#62 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#76 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#60 +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#74 RuboCop::Cop::Layout::SpaceAroundOperators::EXCESSIVE_SPACE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#59 +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#73 RuboCop::Cop::Layout::SpaceAroundOperators::IRREGULAR_METHODS = T.let(T.unsafe(nil), Array) # Checks that block braces have or don't have a space before the opening @@ -15579,7 +15711,7 @@ class RuboCop::Cop::Layout::SpaceInsideBlockBraces < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#205 def space_inside_right_brace(inner, right_brace, column); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#251 + # source://rubocop//lib/rubocop/cop/layout/space_inside_block_braces.rb#253 def style_for_empty_braces; end end @@ -16092,13 +16224,18 @@ class RuboCop::Cop::Layout::TrailingEmptyLines < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#79 + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#90 + def end_with_percent_blank_string?(processed_source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#80 def ends_in_end?(processed_source); end - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#89 + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#94 def message(wanted_blank_lines, blank_lines); end - # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#66 + # source://rubocop//lib/rubocop/cop/layout/trailing_empty_lines.rb#67 def offense_detected(buffer, wanted_blank_lines, blank_lines, whitespace_at_end); end end @@ -16429,30 +16566,34 @@ RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsaf class RuboCop::Cop::Lint::AmbiguousBlockAssociation < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#62 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#62 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#81 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#85 def allowed_method_pattern?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#77 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#81 def ambiguous_block_association?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#87 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#91 def message(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#97 + def wrap_in_parentheses(corrector, node); end end -# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#58 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#60 RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String) # Checks for ambiguous operators in the first argument of a @@ -16721,22 +16862,22 @@ RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) # # @example # # bad -# if some_var = true +# if some_var = value # do_something # end # # # good -# if some_var == true +# if some_var == value # do_something # end # @example AllowSafeAssignment: true (default) # # good -# if (some_var = true) +# if (some_var = value) # do_something # end # @example AllowSafeAssignment: false # # bad -# if (some_var = true) +# if (some_var = value) # do_something # end # @@ -16818,10 +16959,10 @@ RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # Checks for places where binary operator has identical operands. # # It covers arithmetic operators: `-`, `/`, `%`; -# comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, `<=`; +# comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, ``<=``; # bitwise operators: `|`, `^`, `&`; # boolean operators: `&&`, `||` -# and "spaceship" operator - `<=>`. +# and "spaceship" operator - ``<=>``. # # Simple arithmetic operations are allowed by this cop: `+`, `*`, `**`, `<<` and `>>`. # Although these can be rewritten in a different way, it should not be necessary to @@ -17044,7 +17185,7 @@ end # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#67 RuboCop::Cop::Lint::ConstantDefinitionInBlock::MSG = T.let(T.unsafe(nil), String) -# Checks for overwriting an exception with an exception result by use `rescue =>`. +# Checks for overwriting an exception with an exception result by use ``rescue =>``. # # You intended to write as `rescue StandardError`. # However, you have written `rescue => StandardError`. @@ -17224,26 +17365,39 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/lint/debugger.rb#67 class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#70 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#71 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#98 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#117 + def assumed_argument?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#96 + def assumed_usage_context?(node); end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#106 def chained_method_name(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#92 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 def debugger_method?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#85 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#83 def debugger_methods; end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#81 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#79 def message(node); end end +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#69 +RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#68 RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) @@ -17702,6 +17856,7 @@ end RuboCop::Cop::Lint::DuplicateElsifCondition::MSG = T.let(T.unsafe(nil), String) # Checks for duplicated keys in hash literals. +# This cop considers both primitive types and constants for the hash keys. # # This cop mirrors a warning in Ruby 2.2. # @@ -17716,15 +17871,15 @@ RuboCop::Cop::Lint::DuplicateElsifCondition::MSG = T.let(T.unsafe(nil), String) # # hash = { food: 'apple', other_food: 'orange' } # -# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#21 +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#22 class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base include ::RuboCop::Cop::Duplication - # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#26 + # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#27 def on_hash(node); end end -# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#24 +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#25 RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String) # Checks for duplicated magic comments. @@ -17770,6 +17925,106 @@ end # source://rubocop//lib/rubocop/cop/lint/duplicate_magic_comment.rb#33 RuboCop::Cop::Lint::DuplicateMagicComment::MSG = T.let(T.unsafe(nil), String) +# Checks that there are no repeated patterns used in `in` keywords. +# +# @example +# +# # bad +# case x +# in 'first' +# do_something +# in 'first' +# do_something_else +# end +# +# # good +# case x +# in 'first' +# do_something +# in 'second' +# do_something_else +# end +# +# # bad - repeated alternate patterns with the same conditions don't depend on the order +# case x +# in foo | bar +# first_method +# in bar | foo +# second_method +# end +# +# # good +# case x +# in foo | bar +# first_method +# in bar | baz +# second_method +# end +# +# # bad - repeated hash patterns with the same conditions don't depend on the order +# case x +# in foo: a, bar: b +# first_method +# in bar: b, foo: a +# second_method +# end +# +# # good +# case x +# in foo: a, bar: b +# first_method +# in bar: b, baz: c +# second_method +# end +# +# # bad - repeated array patterns with elements in the same order +# case x +# in [foo, bar] +# first_method +# in [foo, bar] +# second_method +# end +# +# # good +# case x +# in [foo, bar] +# first_method +# in [bar, foo] +# second_method +# end +# +# # bad - repeated the same patterns and guard conditions +# case x +# in foo if bar +# first_method +# in foo if bar +# second_method +# end +# +# # good +# case x +# in foo if bar +# first_method +# in foo if baz +# second_method +# end +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#90 +class RuboCop::Cop::Lint::DuplicateMatchPattern < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#97 + def on_case_match(case_node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#108 + def pattern_identity(pattern); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_match_pattern.rb#93 +RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) + # Checks for duplicated instance (or singleton) method # definitions. # @@ -17919,26 +18174,40 @@ class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop: include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#36 + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#37 def each_repeated_character_class_element_loc(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#27 + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#29 def on_regexp(node); end private - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#83 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#102 + def escaped_octal?(string); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#54 + def group_expressions(node, expressions); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#110 def interpolation_locs(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#65 - def skip_expression?(expr); end + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#106 + def octal?(char); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#71 + def pop_octal_digits(current_child, expressions); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#78 - def start_with_escaped_zero_number?(current_child, next_child); end + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#89 + def skip_expression?(expr); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#80 + def source_range(children); end # Since we blank interpolations with a space for every char of the interpolation, we would # mark every space (except the first) as duplicate if we do not skip regexp_parser nodes @@ -17946,13 +18215,16 @@ class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop: # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#72 + # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#96 def within_interpolation?(node, child); end end # source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#25 RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::MSG_REPEATED_ELEMENT = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb#27 +RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::OCTAL_DIGITS_AFTER_ESCAPE = T.let(T.unsafe(nil), Integer) + # Checks for duplicate ``require``s and ``require_relative``s. # # @example @@ -18125,7 +18397,7 @@ RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String) # Checks for blocks without a body. # Such empty blocks are typically an oversight or we should provide a comment -# be clearer what we're aiming for. +# to clarify what we're aiming for. # # Empty lambdas and procs are ignored by default. # @@ -18698,13 +18970,13 @@ end # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#51 RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) -# This cop emulates the following Ruby warnings in Ruby 2.6. +# Emulates the following Ruby warnings in Ruby 2.6. # # [source,console] # ---- -# % cat example.rb +# $ cat example.rb # ERB.new('hi', nil, '-', '@output_buffer') -# % ruby -rerb example.rb +# $ ruby -rerb example.rb # example.rb:1: warning: Passing safe_level with the 2nd argument of ERB.new is # deprecated. Do not use it, and specify other arguments as keyword arguments. # example.rb:1: warning: Passing trim_mode with the 3rd argument of ERB.new is @@ -18753,42 +19025,42 @@ RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) # ERB.new(str, nil, '-', '@output_buffer') # end # -# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#62 +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#61 class RuboCop::Cop::Lint::ErbNewArguments < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#84 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#83 def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#89 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#88 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#154 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#153 def arguments_range(node); end - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#109 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#108 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#124 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#123 def build_kwargs(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#120 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#119 def correct_arguments?(arguments); end - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#141 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#140 def override_by_legacy_args(kwargs, node); end end -# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#69 +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#68 RuboCop::Cop::Lint::ErbNewArguments::MESSAGES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#81 +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#80 RuboCop::Cop::Lint::ErbNewArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Looks for uses of flip-flop operator @@ -18830,13 +19102,9 @@ RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) # floating-point value representation to be exactly the same, which is very unlikely # if you perform any arithmetic operations involving precision loss. # -# @example -# # bad -# x == 0.1 -# x != 0.1 -# -# # good - using BigDecimal -# x.to_d == 0.1.to_d +# # good - comparing against zero +# x == 0.0 +# x != 0.0 # # # good # (x - 0.1).abs < Float::EPSILON @@ -18848,38 +19116,51 @@ RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) # # Or some other epsilon based type of comparison: # # https://www.embeddeduse.com/2019/08/26/qt-compare-two-floats/ # -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#31 +# @example +# # bad +# x == 0.1 +# x != 0.1 +# +# # good - using BigDecimal +# x.to_d == 0.1.to_d +# +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#35 class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#40 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#44 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#79 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#89 def check_numeric_returning_method(node); end - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#63 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#73 def check_send(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#47 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#53 def float?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#68 + def literal_zero?(node); end end -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#34 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#38 RuboCop::Cop::Lint::FloatComparison::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#36 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#40 RuboCop::Cop::Lint::FloatComparison::FLOAT_INSTANCE_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#35 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#39 RuboCop::Cop::Lint::FloatComparison::FLOAT_RETURNING_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#32 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#36 RuboCop::Cop::Lint::FloatComparison::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#38 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#42 RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies Float literals which are, like, really really really @@ -18935,7 +19216,7 @@ RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) # # format('Numbered format: %1$s and numbered %2$s', a_value, another) # -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#38 class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#100 def called_on_string?(param0 = T.unsafe(nil)); end @@ -19073,6 +19354,9 @@ class RuboCop::Cop::Lint::HashCompareByIdentity < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#37 def id_as_hash_key?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#41 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#41 def on_send(node); end end @@ -19193,30 +19477,30 @@ RuboCop::Cop::Lint::HeredocMethodCallPosition::MSG = T.let(T.unsafe(nil), String # # good # foo.equal?(bar) # -# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#19 +# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#18 class RuboCop::Cop::Lint::IdentityComparison < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#25 + # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#24 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#41 + # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#40 def compare_between_object_id_by_double_equal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#45 + # source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#44 def object_id_method?(node); end end -# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#22 +# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#21 RuboCop::Cop::Lint::IdentityComparison::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#23 +# source://rubocop//lib/rubocop/cop/lint/identity_comparison.rb#22 RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for implicit string concatenation of string literals @@ -19277,7 +19561,10 @@ RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26 RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String) -# This cop checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0. +# Checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0. +# +# When an array of IO objects waiting for an exception (the third argument of `IO.select`) +# is used as an argument, there is no alternative API, so offenses are not registered. # # NOTE: When the method is successful the return value of `IO.select` is `[[IO]]`, # and the return value of `io.wait_readable` and `io.wait_writable` are `self`. @@ -19298,31 +19585,31 @@ RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), Stri # # good # io.wait_writable(timeout) # -# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#32 +# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#34 class RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#39 + # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#41 def io_select(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#44 + # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#46 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#67 + # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#69 def preferred_method(read, write, timeout); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#61 + # source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#63 def scheduler_compatible?(io1, io2); end end -# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#35 +# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#37 RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#36 +# source://rubocop//lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb#38 RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for `private` or `protected` access modifiers which are @@ -19451,20 +19738,25 @@ class RuboCop::Cop::Lint::InheritException < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#59 def on_class(node); end - # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#69 + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#70 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#86 + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#87 def exception_class?(class_node); end - # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#82 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#91 + def inherit_exception_class_with_omitted_namespace?(class_node); end + + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#83 def message(node); end - # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#90 + # source://rubocop//lib/rubocop/cop/lint/inherit_exception.rb#99 def preferred_base_class; end end @@ -19511,10 +19803,47 @@ end # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#28 RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String) +# Emulates the following Ruby warning in Ruby 3.3. +# +# [source,ruby] +# ---- +# $ ruby -e '0.times { it }' +# -e:1: warning: `it` calls without arguments will refer to the first block param in Ruby 3.4; +# use it() or self.it +# ---- +# +# `it` calls without arguments will refer to the first block param in Ruby 3.4. +# So use `it()` or `self.it` to ensure compatibility. +# +# @example +# +# # bad +# do_something { it } +# +# # good +# do_something { it() } +# do_something { self.it } +# +# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#27 +class RuboCop::Cop::Lint::ItWithoutArgumentsInBlock < ::RuboCop::Cop::Base + include ::RuboCop::AST::NodePattern::Macros + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#48 + def deprecated_it_method?(node); end + + # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#33 + def on_block(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#30 +RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::MSG = T.let(T.unsafe(nil), String) + # Checks uses of lambda without a literal block. # It emulates the following warning in Ruby 3.0: # -# % ruby -vwe 'lambda(&proc {})' +# $ ruby -vwe 'lambda(&proc {})' # ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19] # -e:1: warning: lambda without a literal block is deprecated; use the proc without # lambda instead @@ -19645,6 +19974,70 @@ end # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#38 RuboCop::Cop::Lint::LiteralAsCondition::MSG = T.let(T.unsafe(nil), String) +# Checks for literal assignments in the conditions of `if`, `while`, and `until`. +# It emulates the following Ruby warning: +# +# [source,console] +# ---- +# $ ruby -we 'if x = true; end' +# -e:1: warning: found `= literal' in conditional, should be == +# ---- +# +# As a lint cop, it cannot be determined if `==` is appropriate as intended, +# therefore this cop does not provide autocorrection. +# +# @example +# +# # bad +# if x = 42 +# do_something +# end +# +# # good +# if x == 42 +# do_something +# end +# +# # good +# if x = y +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#35 +class RuboCop::Cop::Lint::LiteralAssignmentInCondition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39 + def on_while(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#62 + def all_literals?(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#79 + def offense_range(asgn_node, rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#75 + def parallel_assignment_with_splat_operator?(node); end + + # @yield [node] + # + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#56 + def traverse_node(node, &block); end +end + +# source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#36 +RuboCop::Cop::Lint::LiteralAssignmentInCondition::MSG = T.let(T.unsafe(nil), String) + # Checks for interpolated literals. # # @example @@ -19870,6 +20263,16 @@ RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil), # missing method. In other cases, the theoretical ideal handling could be # challenging or verbose for no actual gain. # +# Autocorrection is not supported because the position of `super` cannot be +# determined automatically. +# +# `Object` and `BasicObject` are allowed by this cop because of their +# stateless nature. However, sometimes you might want to allow other parent +# classes from this cop, for example in the case of an abstract class that is +# not meant to be called with `super`. In those cases, you can use the +# `AllowedParentClasses` option to specify which classes should be allowed +# *in addition to* `Object` and `BasicObject`. +# # @example # # bad # class Employee < Person @@ -19916,63 +20319,148 @@ RuboCop::Cop::Lint::MissingCopEnableDirective::MSG_BOUND = T.let(T.unsafe(nil), # end # end # -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#60 +# # good +# class ClassWithNoParent +# def initialize +# do_something +# end +# end +# @example AllowedParentClasses: [MyAbstractClass] +# # good +# class MyConcreteClass < MyAbstractClass +# def initialize +# do_something +# end +# end +# +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#85 class RuboCop::Cop::Lint::MissingSuper < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#74 + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#99 def class_new_block(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#80 + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#105 def on_def(node); end - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#90 + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#115 def on_defs(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#102 + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#149 + def allowed_class?(node); end + + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#153 + def allowed_classes; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#127 def callback_method_def?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#108 + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#133 def contains_super?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#112 + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#137 def inside_class_with_stateful_parent?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#98 + # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#123 def offender?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/missing_super.rb#124 - def stateless_class?(node); end end -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#71 +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#96 RuboCop::Cop::Lint::MissingSuper::CALLBACKS = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#62 +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#87 RuboCop::Cop::Lint::MissingSuper::CALLBACK_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#66 +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#91 RuboCop::Cop::Lint::MissingSuper::CLASS_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#61 +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#86 RuboCop::Cop::Lint::MissingSuper::CONSTRUCTOR_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#67 +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#92 RuboCop::Cop::Lint::MissingSuper::METHOD_LIFECYCLE_CALLBACKS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#64 +# source://rubocop//lib/rubocop/cop/lint/missing_super.rb#89 RuboCop::Cop::Lint::MissingSuper::STATELESS_CLASSES = T.let(T.unsafe(nil), Array) +# Checks for mixed-case character ranges since they include likely unintended characters. +# +# Offenses are registered for regexp character classes like `/[A-z]/` +# as well as range objects like `('A'..'z')`. +# +# NOTE: Range objects cannot be autocorrected. +# +# @example +# +# # bad +# r = /[A-z]/ +# +# # good +# r = /[A-Za-z]/ +# +# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#28 +class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#56 + def each_unsafe_regexp_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 + def on_erange(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 + def on_irange(node); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#48 + def on_regexp(node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#72 + def build_source_range(range_start, range_end); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#76 + def range_for(char); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#82 + def range_pairs(expr); end + + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#102 + def rewrite_regexp_range(source); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#92 + def skip_expression?(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#96 + def skip_range?(range_start, range_end); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#86 + def unsafe_range?(range_start, range_end); end +end + +# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#32 +RuboCop::Cop::Lint::MixedCaseRange::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#35 +RuboCop::Cop::Lint::MixedCaseRange::RANGES = T.let(T.unsafe(nil), Array) + # Do not mix named captures and numbered captures in a Regexp literal # because numbered capture is ignored if they're mixed. # Replace numbered captures with non-capturing groupings or @@ -20237,22 +20725,16 @@ class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#51 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#42 def on_block_body_of_reduce(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#38 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#56 - def on_numblock_body_of_reduce(param0 = T.unsafe(nil)); end - private - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#60 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#49 def parent_block_node(node); end - - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#64 - def parent_numblock_node(node); end end # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#26 @@ -20344,89 +20826,91 @@ RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#44 class RuboCop::Cop::Lint::NonAtomicFileOperation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#75 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#76 def explicit_not_force?(param0); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#70 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#71 def force?(param0); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#79 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#80 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#65 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#66 def receiver_and_method_name(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#60 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#61 def send_exist_node(param0); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#96 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#97 def allowable_use_with_if?(if_node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#120 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#121 def autocorrect(corrector, node, range); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#131 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#132 def autocorrect_replace_method(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#148 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#151 def force_method?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#156 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#159 def force_method_name?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#152 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#155 def force_option?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#90 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#91 def if_node_child?(node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#111 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#112 def message_change_force_method(node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#115 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#116 def message_remove_file_exist_check(node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#100 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#101 def register_offense(node, exist_node); end - # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#138 + # source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#139 def replacement_method(node); end end -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#51 +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#50 RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_FORCE_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#52 +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#51 RuboCop::Cop::Lint::NonAtomicFileOperation::MAKE_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#50 +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#49 RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_CHANGE_FORCE_METHOD = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#48 +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#47 RuboCop::Cop::Lint::NonAtomicFileOperation::MSG_REMOVE_FILE_EXIST_CHECK = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#53 +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#54 +RuboCop::Cop::Lint::NonAtomicFileOperation::RECURSIVE_REMOVE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#52 RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_FORCE_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#54 +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#53 RuboCop::Cop::Lint::NonAtomicFileOperation::REMOVE_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#56 +# source://rubocop//lib/rubocop/cop/lint/non_atomic_file_operation.rb#55 RuboCop::Cop::Lint::NonAtomicFileOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # `Dir[...]` and `Dir.glob(...)` do not make any guarantees about @@ -20483,10 +20967,10 @@ RuboCop::Cop::Lint::NonAtomicFileOperation::RESTRICT_ON_SEND = T.let(T.unsafe(ni class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#174 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#172 def loop_variable(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#157 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#155 def method_require?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#65 @@ -20498,19 +20982,19 @@ class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#77 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#147 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#145 def unsorted_dir_block?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#152 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#150 def unsorted_dir_each?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#168 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#166 def unsorted_dir_each_pass?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#162 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#160 def unsorted_dir_glob_pass?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#179 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#177 def var_is_required?(param0, param1); end private @@ -20530,12 +21014,12 @@ class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#138 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#136 def unsorted_dir_loop?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#142 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#140 def unsorted_dir_pass?(node); end end @@ -20610,7 +21094,7 @@ RuboCop::Cop::Lint::NonLocalExitFromIterator::MSG = T.let(T.unsafe(nil), String) # # Conversion with `Integer`, `Float`, etc. will raise an `ArgumentError` # if given input that is not numeric (eg. an empty string), whereas -# `to_i`, etc. will try to convert regardless of input (`''.to_i => 0`). +# `to_i`, etc. will try to convert regardless of input (``''.to_i => 0``). # As such, this cop is disabled by default because it's not necessarily # always correct to raise if a value is not numeric. # @@ -20668,81 +21152,84 @@ class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#102 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#107 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#107 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#92 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#93 def to_method(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#97 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#98 def to_method_symbol(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#155 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#165 def allow_receiver?(receiver); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#167 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#177 def allowed_method_name?(name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#177 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#187 def conversion_method?(method_name); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#141 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#151 def correct_method(node, receiver); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#145 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#155 def correct_sym_method(to_method); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#124 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#134 def handle_as_symbol(node); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#109 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#115 def handle_conversion_method(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#185 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#195 def ignored_class?(name); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#181 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#191 def ignored_classes; end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#150 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#160 def remove_parentheses(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#171 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#181 def top_receiver(node); end end -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#88 +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#89 RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#78 +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#79 RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHOD_CLASS_MAPPING = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#89 +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#90 RuboCop::Cop::Lint::NumberConversion::METHODS = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#84 +# source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#85 RuboCop::Cop::Lint::NumberConversion::MSG = T.let(T.unsafe(nil), String) # Checks for uses of numbered parameter assignment. # It emulates the following warning in Ruby 2.7: # -# % ruby -ve '_1 = :value' +# $ ruby -ve '_1 = :value' # ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin19] # -e:1: warning: `_1' is reserved for numbered parameter; consider another name # # Assigning to a numbered parameter (from `_1` to `_9`) causes an error in Ruby 3.0. # -# % ruby -ve '_1 = :value' +# $ ruby -ve '_1 = :value' # ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19] # -e:1: _1 is reserved for numbered parameter # @@ -20820,24 +21307,24 @@ RuboCop::Cop::Lint::OrAssignmentToConstant::MSG = T.let(T.unsafe(nil), String) # # frozen_string_literal: true # p [''.frozen?, ''.encoding] #=> [true, #<Encoding:US-ASCII>] # -# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#33 +# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#32 class RuboCop::Cop::Lint::OrderedMagicComments < ::RuboCop::Cop::Base include ::RuboCop::Cop::FrozenStringLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#39 + # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#38 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#56 + # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#55 def autocorrect(corrector, encoding_line, frozen_string_literal_line); end - # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#64 + # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#63 def magic_comment_lines; end end -# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#37 +# source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#36 RuboCop::Cop::Lint::OrderedMagicComments::MSG = T.let(T.unsafe(nil), String) # Looks for references of Regexp captures that are out of range @@ -21463,6 +21950,79 @@ RuboCop::Cop::Lint::RedundantDirGlobSort::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#37 RuboCop::Cop::Lint::RedundantDirGlobSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks for redundant quantifiers inside Regexp literals. +# +# It is always allowed when interpolation is used in a regexp literal, +# because it's unknown what kind of string will be expanded as a result: +# +# [source,ruby] +# ---- +# /(?:a*#{interpolation})?/x +# ---- +# +# @example +# # bad +# /(?:x+)+/ +# +# # good +# /(?:x)+/ +# +# # good +# /(?:x+)/ +# +# # bad +# /(?:x+)?/ +# +# # good +# /(?:x)*/ +# +# # good +# /(?:x*)/ +# +# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#34 +class RuboCop::Cop::Lint::RedundantRegexpQuantifiers < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#42 + def on_regexp(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#83 + def character_set?(expr); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#61 + def each_redundantly_quantified_pair(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#87 + def mergeable_quantifier(expr); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#103 + def merged_quantifier(exp1, exp2); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#119 + def message(group, child, replacement); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#115 + def quantifier_range(group, child); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#75 + def redundant_group?(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#79 + def redundantly_quantifiable?(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb#38 +RuboCop::Cop::Lint::RedundantRegexpQuantifiers::MSG_REDUNDANT_QUANTIFIER = T.let(T.unsafe(nil), String) + # Checks for unnecessary `require` statement. # # The following features are unnecessary `require` statement because @@ -21492,45 +22052,52 @@ RuboCop::Cop::Lint::RedundantDirGlobSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # # good # require 'unloaded_feature' # -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#34 +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#38 class RuboCop::Cop::Lint::RedundantRequireStatement < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#52 + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#61 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#47 + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#57 + def pp_const?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#51 def redundant_require_statement?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#71 - def redundant_feature?(feature_name); end + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#91 + def need_to_require_pp?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#82 - def use_pretty_print_method?; end + # source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#80 + def redundant_feature?(feature_name); end end -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#38 +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#42 RuboCop::Cop::Lint::RedundantRequireStatement::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#41 +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#45 RuboCop::Cop::Lint::RedundantRequireStatement::PRETTY_PRINT_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#39 +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#43 RuboCop::Cop::Lint::RedundantRequireStatement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#40 +# source://rubocop//lib/rubocop/cop/lint/redundant_require_statement.rb#44 RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T.unsafe(nil), Array) # Checks for redundant safe navigation calls. -# `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, and `equal?` methods -# are checked by default. These are customizable with `AllowedMethods` option. +# Use cases where a constant, named in camel case for classes and modules is `nil` are rare, +# and an offense is not detected when the receiver is a snake case constant. +# +# For all receivers, the `instance_of?`, `kind_of?`, `is_a?`, `eql?`, `respond_to?`, +# and `equal?` methods are checked by default. +# These are customizable with `AllowedMethods` option. # # The `AllowedMethods` option specifies nil-safe methods, # in other words, it is a method that is allowed to skip safe navigation. @@ -21542,6 +22109,9 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # # @example # # bad +# CamelCaseConst&.do_something +# +# # bad # do_something if attrs&.respond_to?(:[]) # # # good @@ -21553,12 +22123,31 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # end # # # good +# CamelCaseConst.do_something +# +# # good # while node.is_a?(BeginNode) # node = node.parent # end # # # good - without `&.` this will always return `true` # foo&.respond_to?(:to_a) +# +# # bad - for `nil`s conversion methods return default values for the type +# foo&.to_h || {} +# foo&.to_h { |k, v| [k, v] } || {} +# foo&.to_a || [] +# foo&.to_i || 0 +# foo&.to_f || 0.0 +# foo&.to_s || '' +# +# # good +# foo.to_h +# foo.to_h { |k, v| [k, v] } +# foo.to_a +# foo.to_i +# foo.to_f +# foo.to_s # @example AllowedMethods: [nil_safe_method] # # bad # do_something if attrs&.nil_safe_method(:[]) @@ -21567,37 +22156,49 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # do_something if attrs.nil_safe_method(:[]) # do_something if attrs&.not_nil_safe_method(:[]) # -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#51 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#77 class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#65 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#95 + def conversion_with_default?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#107 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#61 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#117 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#90 def respond_to_nil_specific_method?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#75 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#134 def check?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#85 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#144 def condition?(parent, node); end end -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#56 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#82 RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#58 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#83 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_LITERAL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#85 RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsafe(nil), Set) +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#87 +RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) + # Checks for unneeded usages of splat expansion # # @example @@ -21745,7 +22346,7 @@ RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_I = T.let(T.unsafe(nil), St # source://rubocop//lib/rubocop/cop/lint/redundant_splat_expansion.rb#76 RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_W = T.let(T.unsafe(nil), String) -# Checks for string conversion in string interpolation, +# Checks for string conversion in string interpolation, `print`, `puts`, and `warn` arguments, # which is redundant. # # @example @@ -21753,30 +22354,47 @@ RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_W = T.let(T.unsafe(nil), St # # bad # # "result is #{something.to_s}" +# print something.to_s +# puts something.to_s +# warn something.to_s # @example # # # good # # "result is #{something}" +# print something +# puts something +# warn something # -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#20 +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#27 class RuboCop::Cop::Lint::RedundantStringCoercion < ::RuboCop::Cop::Base include ::RuboCop::Cop::Interpolation extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#30 + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#38 def on_interpolation(begin_node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#28 + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#46 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#36 def to_s_without_args?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#58 + def register_offense(node, context); end end -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#24 +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#31 RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#25 +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#32 RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#33 +RuboCop::Cop::Lint::RedundantStringCoercion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for redundant `with_index`. # # @example @@ -22250,20 +22868,25 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base # @param send_node [RuboCop::AST::SendNode] # @return [String] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#63 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#62 def add_safe_navigation_operator(offense_range:, send_node:); end # @param corrector [RuboCop::Cop::Corrector] # @param offense_range [Parser::Source::Range] # @param send_node [RuboCop::AST::SendNode] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#82 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#81 def autocorrect(corrector, offense_range:, send_node:); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#92 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#90 def brackets?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#94 + def require_parentheses?(send_node); end end # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33 @@ -22416,58 +23039,77 @@ RuboCop::Cop::Lint::ScriptPermission::SHEBANG = T.let(T.unsafe(nil), String) # foo = foo # foo, bar = foo, bar # Foo = Foo +# hash['foo'] = hash['foo'] +# obj.attr = obj.attr # # # good # foo = bar # foo, bar = bar, foo # Foo = Bar +# hash['foo'] = hash['bar'] +# obj.attr = obj.attr2 +# +# # good (method calls possibly can return different results) +# hash[foo] = hash[foo] # -# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#19 +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#26 class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#53 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#69 def on_and_asgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#41 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#57 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#36 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 def on_cvasgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 def on_gvasgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 def on_ivasgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#49 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#65 def on_masgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#53 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#69 def on_or_asgn(node); end + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#36 + def on_send(node); end + private + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#103 + def handle_attribute_assignment(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#92 + def handle_key_assignment(node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#61 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#77 def multiple_self_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#71 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#87 def rhs_matches_lhs?(rhs, lhs); end end -# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#22 +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 RuboCop::Cop::Lint::SelfAssignment::ASSIGNMENT_TYPE_TO_RHS_TYPE = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#20 +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#27 RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String) -# This cop checks for `send`, `public_send`, and `__send__` methods +# Checks for `send`, `public_send`, and `__send__` methods # when using mix-in. # # `include` and `prepend` methods were private methods until Ruby 2.0, @@ -22497,41 +23139,41 @@ RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String) # Foo.prepend Bar # Foo.extend Bar # -# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#37 +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#36 class RuboCop::Cop::Lint::SendWithMixinArgument < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#54 + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#53 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#47 + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#46 def send_with_mixin_argument?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#68 + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#67 def bad_location(node); end - # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#74 + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#73 def message(method, module_name, bad_method); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#78 + # source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#77 def mixin_method?(node); end end -# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#42 +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#41 RuboCop::Cop::Lint::SendWithMixinArgument::MIXIN_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#41 +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#40 RuboCop::Cop::Lint::SendWithMixinArgument::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#44 +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#43 RuboCop::Cop::Lint::SendWithMixinArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#43 +# source://rubocop//lib/rubocop/cop/lint/send_with_mixin_argument.rb#42 RuboCop::Cop::Lint::SendWithMixinArgument::SEND_METHODS = T.let(T.unsafe(nil), Array) # Checks for shadowed arguments. @@ -22604,7 +23246,7 @@ class RuboCop::Cop::Lint::ShadowedArgument < ::RuboCop::Cop::Base # Get argument references without assignments' references # - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#160 + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#161 def argument_references(argument); end # Find the first argument assignment, which doesn't reference the @@ -22620,17 +23262,17 @@ class RuboCop::Cop::Lint::ShadowedArgument < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#170 + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#171 def ignore_implicit_references?; end # Check whether the given node is nested into block or conditional. # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#151 + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#152 def node_within_block_or_conditional?(node, stop_search_node); end - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#143 + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#144 def reference_pos(node); end # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#95 @@ -22721,7 +23363,7 @@ class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#119 def evaluate_exceptions(group); end - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#158 + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#152 def find_shadowing_rescue(rescues); end # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#84 @@ -22732,7 +23374,7 @@ class RuboCop::Cop::Lint::ShadowedException < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#143 + # source://rubocop//lib/rubocop/cop/lint/shadowed_exception.rb#137 def sorted?(rescued_groups); end # @return [Boolean] @@ -22791,6 +23433,11 @@ class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#93 def find_conditional_node_from_ascendant(node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#100 + def node_or_its_ascendant_conditional?(node); end + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49 def ractor_block?(param0 = T.unsafe(nil)); end @@ -22983,6 +23630,7 @@ RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) # 'underscored_string'.to_sym # :'underscored_symbol' # 'hyphenated-string'.to_sym +# "string_#{interpolation}".to_sym # # # good # :string @@ -22990,6 +23638,7 @@ RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) # :underscored_string # :underscored_symbol # :'hyphenated-string' +# :"string_#{interpolation}" # @example EnforcedStyle: strict (default) # # # bad @@ -23025,60 +23674,60 @@ RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) # b: 2 # } # -# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#66 +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#68 class RuboCop::Cop::Lint::SymbolConversion < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::SymbolHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#100 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#105 def on_hash(node); end - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#76 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#78 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#83 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#88 def on_sym(node); end private - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#142 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#147 def correct_hash_key(node); end - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#161 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#166 def correct_inconsistent_hash_keys(keys); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#134 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#139 def in_alias?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#138 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#143 def in_percent_literal_array?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#121 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#126 def properly_quoted?(source, value); end - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#117 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#122 def register_offense(node, correction:, message: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#130 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#135 def requires_quotes?(sym_node); end end -# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#71 +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#73 RuboCop::Cop::Lint::SymbolConversion::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#72 +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#74 RuboCop::Cop::Lint::SymbolConversion::MSG_CONSISTENCY = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#74 +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#76 RuboCop::Cop::Lint::SymbolConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Repacks Parser's diagnostics/errors @@ -23094,13 +23743,13 @@ class RuboCop::Cop::Lint::Syntax < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/syntax.rb#19 def add_offense_from_diagnostic(diagnostic, ruby_version); end - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#26 + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#29 def add_offense_from_error(error); end - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#31 + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#34 def beautify_message(message); end - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#37 + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#40 def find_severity(_range, _severity); end end @@ -23199,27 +23848,39 @@ RuboCop::Cop::Lint::ToJSON::MSG = T.let(T.unsafe(nil), String) # always ignored. This is detected automatically since Ruby 2.7. # # @example +# # bad +# return 1 # -# # Detected since Ruby 2.7 -# return 1 # 1 is always ignored. +# # good +# return # -# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#14 +# source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#16 class RuboCop::Cop::Lint::TopLevelReturnWithArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#21 def on_return(return_node); end private + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#35 + def remove_arguments(corrector, return_node); end + + # This cop works by validating the ancestors of the return node. A + # top-level return node's ancestors should not be of block, def, or + # defs type. + # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#27 - def ancestors_valid?(return_node); end + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#42 + def top_level_return?(return_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#31 + def top_level_return_with_any_argument?(return_node); end end -# This cop works by validating the ancestors of the return node. A -# top-level return node's ancestors should not be of block, def, or -# defs type. -# # source://rubocop//lib/rubocop/cop/lint/top_level_return_with_argument.rb#19 RuboCop::Cop::Lint::TopLevelReturnWithArgument::MSG = T.let(T.unsafe(nil), String) @@ -24024,7 +24685,7 @@ class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base def message(variable); end class << self - # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#71 + # source://rubocop-performance/1.20.2/lib/rubocop-performance.rb#15 def autocorrect_incompatible_with; end # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#75 @@ -24322,12 +24983,18 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) # scope. # The basic idea for this cop was from the warning of `ruby -cw`: # -# assigned but unused variable - foo +# [source,console] +# ---- +# assigned but unused variable - foo +# ---- # # Currently this cop has advanced logic that detects unreferenced # reassignments and properly handles varied cases such as branch, loop, # rescue, ensure, etc. # +# NOTE: Given the assignment `foo = 1, bar = 2`, removing unused variables +# can lead to a syntax error, so this case is not autocorrected. +# # @example # # # bad @@ -24345,49 +25012,83 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) # do_something(some_var) # end # -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#33 +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#40 + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56 def after_leaving_scope(scope, _variable_table); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#44 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162 + def autocorrect(corrector, assignment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103 + def chained_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#61 def check_for_unused_assignments(variable); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#108 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#146 def collect_variable_like_names(scope); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#62 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#79 def message_for_useless_assignment(assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#68 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#107 def message_specification(assignment, variable); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#78 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#117 def multiple_assignment_message(variable_name); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#83 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#85 + def offense_range(assignment); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#122 def operator_assignment_message(scope, assignment); end + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#179 + def remove_exception_assignment_part(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#203 + def remove_local_variable_assignment_part(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#192 + def remove_trailing_character_from_operator(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#188 + def rename_variable_with_underscore(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#196 + def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end + # TODO: More precise handling (rescue, ensure, nested begin, etc.) # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#98 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136 def return_value_node_of_scope(scope); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#91 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#93 + def sequential_assignment?(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129 def similar_name_message(variable); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#117 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#155 def variable_like_method_invocation?(node); end class << self - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#36 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#52 def joining_forces; end end end -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#34 +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50 RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # Checks for useless `else` in `begin..end` without `rescue`. @@ -24730,7 +25431,7 @@ class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker end # Checks for uses of `Integer#times` that will never yield -# (when the integer <= 0) or that will only ever yield once +# (when the integer ``<= 0``) or that will only ever yield once # (`1.times`). # # @example @@ -24798,6 +25499,16 @@ RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for operators, variables, literals, lambda, proc and nonmutating # methods used in void context. # +# `each` blocks are allowed to prevent false positives. +# For example, the expression inside the `each` block below. +# It's not void, especially when the receiver is an `Enumerator`: +# +# [source,ruby] +# ---- +# enumerator = [1, 2, 3].filter +# enumerator.each { |item| item >= 2 } #=> [2, 3] +# ---- +# # @example CheckForMethodsWithNoSideEffects: false (default) # # bad # def some_method @@ -24832,89 +25543,109 @@ RuboCop::Cop::Lint::UselessTimes::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # do_something(some_array) # end # -# source://rubocop//lib/rubocop/cop/lint/void.rb#43 +# source://rubocop//lib/rubocop/cop/lint/void.rb#53 class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/void.rb#76 + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/void.rb#92 def on_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#67 + # source://rubocop//lib/rubocop/cop/lint/void.rb#82 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#76 + # source://rubocop//lib/rubocop/cop/lint/void.rb#92 def on_kwbegin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#67 + # source://rubocop//lib/rubocop/cop/lint/void.rb#82 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/lint/void.rb#83 + # source://rubocop//lib/rubocop/cop/lint/void.rb#212 + def autocorrect_nonmutating_send(corrector, node, suggestion); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#208 + def autocorrect_void_expression(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#196 + def autocorrect_void_op(corrector, node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#99 def check_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#89 + # source://rubocop//lib/rubocop/cop/lint/void.rb#108 def check_expression(expr); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#112 + # source://rubocop//lib/rubocop/cop/lint/void.rb#146 def check_literal(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#130 + # source://rubocop//lib/rubocop/cop/lint/void.rb#170 def check_nonmutating(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#118 + # source://rubocop//lib/rubocop/cop/lint/void.rb#154 def check_self(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#106 + # source://rubocop//lib/rubocop/cop/lint/void.rb#128 def check_var(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#124 + # source://rubocop//lib/rubocop/cop/lint/void.rb#162 def check_void_expression(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#100 - def check_void_op(node); end + # source://rubocop//lib/rubocop/cop/lint/void.rb#118 + def check_void_op(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#145 + # source://rubocop//lib/rubocop/cop/lint/void.rb#221 + def entirely_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#188 def in_void_context?(node); end end -# source://rubocop//lib/rubocop/cop/lint/void.rb#51 +# source://rubocop//lib/rubocop/cop/lint/void.rb#66 RuboCop::Cop::Lint::Void::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#48 +# source://rubocop//lib/rubocop/cop/lint/void.rb#60 +RuboCop::Cop::Lint::Void::CONST_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/void.rb#63 RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#46 +# source://rubocop//lib/rubocop/cop/lint/void.rb#61 RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#62 +# source://rubocop//lib/rubocop/cop/lint/void.rb#77 RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#64 +# source://rubocop//lib/rubocop/cop/lint/void.rb#79 RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#55 +# source://rubocop//lib/rubocop/cop/lint/void.rb#70 RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#49 +# source://rubocop//lib/rubocop/cop/lint/void.rb#64 RuboCop::Cop::Lint::Void::NONMUTATING_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#53 +# source://rubocop//lib/rubocop/cop/lint/void.rb#68 RuboCop::Cop::Lint::Void::OPERATORS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#44 +# source://rubocop//lib/rubocop/cop/lint/void.rb#58 RuboCop::Cop::Lint::Void::OP_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#47 +# source://rubocop//lib/rubocop/cop/lint/void.rb#62 RuboCop::Cop::Lint::Void::SELF_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#52 +# source://rubocop//lib/rubocop/cop/lint/void.rb#67 RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#45 +# source://rubocop//lib/rubocop/cop/lint/void.rb#59 RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#54 +# source://rubocop//lib/rubocop/cop/lint/void.rb#69 RuboCop::Cop::Lint::Void::VOID_CONTEXT_TYPES = T.let(T.unsafe(nil), Array) # Common functionality for obtaining source ranges from regexp matches @@ -25126,9 +25857,9 @@ module RuboCop::Cop::Metrics; end # # Interpreting ABC size: # -# * <= 17 satisfactory -# * 18..30 unsatisfactory -# * > 30 dangerous +# * ``<= 17`` satisfactory +# * `18..30` unsatisfactory +# * `>` 30 dangerous # # You can have repeated "attributes" calls count as a single "branch". # For this purpose, attributes are any method with no argument; no attempt @@ -25177,13 +25908,12 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct # will be counted as one line regardless of its actual size. # +# NOTE: This cop does not apply for `Struct` definitions. # # NOTE: The `ExcludedMethods` configuration is deprecated and only kept # for backwards compatibility. Please use `AllowedMethods` and `AllowedPatterns` # instead. By default, there are no methods to allowed. # -# NOTE: This cop does not apply for `Struct` definitions. -# # @example CountAsOne: ['array', 'heredoc', 'method_call'] # # something do @@ -25309,15 +26039,18 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#46 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#52 def on_casgn(node); end # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#42 def on_class(node); end + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#46 + def on_sclass(node); end + private - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#64 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#70 def message(length, max_length); end end @@ -25745,7 +26478,7 @@ class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#128 + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#127 def argument?(node); end # @return [Boolean] @@ -25755,7 +26488,7 @@ class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#124 + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#123 def branch?(node); end # @return [Boolean] @@ -25768,7 +26501,7 @@ class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#132 + # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#131 def condition?(node); end # @return [Boolean] @@ -25821,18 +26554,18 @@ class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#175 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#182 def another_args?(node); end # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#42 def build_foldable_checks(types); end - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#83 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#90 def classlike_code_length(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#131 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#138 def classlike_node?(node); end # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#66 @@ -25840,53 +26573,61 @@ class RuboCop::Cop::Metrics::Utils::CodeLengthCalculator # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#156 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#163 def count_comments?; end - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#119 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#126 def each_top_level_descendant(node, types, &block); end - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#139 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#146 def extract_body(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#135 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#142 def foldable_node?(node); end - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#114 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#121 def heredoc_length(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#79 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#86 def heredoc_node?(node); end # Returns true for lines that shall not be included in the count. # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#152 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#159 def irrelevant_line?(source_line); end - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#103 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#110 def line_numbers_of_inner_nodes(node, *types); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#99 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#106 def namespace_module?(node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#186 + def node_with_heredoc?(node); end + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#60 def normalize_foldable_types(types); end - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#160 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#167 def omit_length(descendant); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#171 + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#178 def parenthesized?(node); end + + # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#190 + def source_from_node_with_heredoc(node); end end # source://rubocop//lib/rubocop/cop/metrics/utils/code_length_calculator.rb#13 @@ -26184,18 +26925,21 @@ end # # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#7 module RuboCop::Cop::MultilineExpressionIndentation + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#14 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#14 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#131 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#132 def argument_in_method_call(node, kind); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#187 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#188 def assignment_rhs(node); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#64 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#65 def check(range, node, lhs, rhs); end # The correct indentation of `node` is usually `IndentationWidth`, with @@ -26215,62 +26959,62 @@ module RuboCop::Cop::MultilineExpressionIndentation # bar # normal indentation, not special # ``` # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#54 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#55 def correct_indentation(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#159 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#160 def disqualified_rhs?(candidate, ancestor); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#203 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#204 def grouped_expression?(node); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#72 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#73 def incorrect_style_detected(range, node, lhs, rhs); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#84 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#85 def indentation(node); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#121 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#122 def indented_keyword_expression(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#207 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#208 def inside_arg_list_parentheses?(node, ancestor); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#98 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#99 def keyword_message_tail(node); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#106 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#107 def kw_node_with_special_indentation(node); end - # In a chain of method calls, we regard the top send node as the base + # In a chain of method calls, we regard the top call node as the base # for indentation of all lines following the first. For example: # a. # b c { block }. <-- b is indented relative to a # d <-- d is indented relative to a # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#31 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#32 def left_hand_side(lhs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#197 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#198 def not_for_this_cop?(node); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#88 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#89 def operation_description(node, rhs); end - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#145 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#146 def part_of_assignment_rhs(node, candidate); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#183 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#184 def part_of_block_body?(candidate, block_node); end # Returns true if `node` is a conditional whose `body` and `condition` @@ -26278,29 +27022,29 @@ module RuboCop::Cop::MultilineExpressionIndentation # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#216 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#217 def postfix_conditional?(node); end # The []= operator and setters (a.b = c) are parsed as :send nodes. # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#175 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#176 def valid_method_rhs_candidate?(candidate, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#164 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#165 def valid_rhs?(candidate, ancestor); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#179 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#180 def valid_rhs_candidate?(candidate, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#220 + # source://rubocop//lib/rubocop/cop/mixin/multiline_expression_indentation.rb#221 def within_node?(inner, outer); end end @@ -26703,43 +27447,43 @@ class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#55 def on_def(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#55 def on_defs(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#87 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#95 def anonymous_block_argument?(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#119 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#127 def block_forwarding_name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#73 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#81 def expected_block_forwarding_style?(node, last_argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#91 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#99 def explicit_block_argument?(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#95 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#103 def register_offense(block_argument, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#111 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#119 def use_block_argument_as_local_variable?(node, last_argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#83 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#91 def use_kwarg_in_method_definition?(node); end class << self @@ -26848,7 +27592,7 @@ class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#27 def class_or_struct_return_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#69 + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#68 def literal_receiver?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#33 @@ -26863,7 +27607,7 @@ class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#74 + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#73 def allowed_conditional_expression_on_rhs?(node); end # @return [Boolean] @@ -26873,7 +27617,7 @@ class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#78 + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#77 def contains_constant?(node); end end @@ -27112,12 +27856,12 @@ class RuboCop::Cop::Naming::HeredocDelimiterNaming < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#49 + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#51 def forbidden_delimiters; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#39 + # source://rubocop//lib/rubocop/cop/naming/heredoc_delimiter_naming.rb#41 def meaningful_delimiters?(node); end end @@ -27447,54 +28191,55 @@ end # @_foo ||= calculate_expensive_thing # end # -# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#147 +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#148 class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#189 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#197 def defined_memoized?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#157 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#160 def method_definition?(param0 = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#197 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#205 def on_defined?(node); end - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#166 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#170 def on_or_asgn(node); end private - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#227 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#242 def find_definition(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#238 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#253 def matches?(method_name, ivar_assign); end - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#248 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#263 def message(variable); end - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#223 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#238 def style_parameter_name; end - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#256 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#271 def suggested_var(method_name); end - # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#262 + # source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#277 def variable_name_candidates(method_name); end end -# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#154 +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#157 RuboCop::Cop::Naming::MemoizedInstanceVariableName::DYNAMIC_DEFINE_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#150 +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#153 RuboCop::Cop::Naming::MemoizedInstanceVariableName::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#152 +# source://rubocop//lib/rubocop/cop/naming/memoized_instance_variable_name.rb#155 RuboCop::Cop::Naming::MemoizedInstanceVariableName::UNDERSCORE_REQUIRED = T.let(T.unsafe(nil), String) # Makes sure that all methods use the configured style, @@ -27766,36 +28511,39 @@ class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#108 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#96 + def autocorrect(corrector, node, range, offending_name, preferred_name); end + + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#116 def correct_node(corrector, node, offending_name, preferred_name); end # If the exception variable is reassigned, that assignment needs to be corrected. # Further `lvar` nodes will not be corrected though since they now refer to a # different variable. # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#126 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#134 def correct_reassignment(corrector, node, offending_name, preferred_name); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#151 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#159 def message(node); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#93 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#91 def offense_range(resbody); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#135 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#143 def preferred_name(variable_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#157 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#165 def shadowed_variable_name?(node); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#144 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#152 def variable_name(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#98 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#106 def variable_name_matches?(node, name); end end @@ -27817,11 +28565,14 @@ RuboCop::Cop::Naming::RescuedExceptionsVariableName::MSG = T.let(T.unsafe(nil), # # # good # fooBar = 1 +# @example AllowedIdentifiers: ['fooBar'] +# # good (with EnforcedStyle: snake_case) +# fooBar = 1 # @example AllowedPatterns: ['_v\d+\z'] -# # good +# # good (with EnforcedStyle: camelCase) # :release_v1 # -# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#26 +# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#31 class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedIdentifiers include ::RuboCop::Cop::ConfigurableEnforcedStyle @@ -27829,51 +28580,51 @@ class RuboCop::Cop::Naming::VariableName < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableNaming include ::RuboCop::Cop::AllowedPattern - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 def on_arg(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 def on_blockarg(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 def on_cvasgn(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 def on_ivasgn(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 def on_kwarg(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 def on_kwoptarg(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 def on_kwrestarg(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 def on_lvar(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 def on_optarg(node); end - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#37 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#42 def on_restarg(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#33 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#38 def valid_name?(node, name, given_style = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#57 + # source://rubocop//lib/rubocop/cop/naming/variable_name.rb#62 def message(style); end end -# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#31 +# source://rubocop//lib/rubocop/cop/naming/variable_name.rb#36 RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) # Makes sure that all numbered variables use the @@ -28640,25 +29391,20 @@ module RuboCop::Cop::PrecedingFollowingAlignment # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#95 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#93 def aligned_assignment?(range, line); end - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#91 - def aligned_char?(range, line); end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#70 def aligned_comment_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#107 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#105 def aligned_identical?(range, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#83 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#81 def aligned_operator?(range, line); end # @return [Boolean] @@ -28683,10 +29429,10 @@ module RuboCop::Cop::PrecedingFollowingAlignment # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#100 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#98 def aligned_with_append_operator?(range, line); end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#111 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#109 def aligned_with_assignment(token, line_range); end # @return [Boolean] @@ -28712,7 +29458,7 @@ module RuboCop::Cop::PrecedingFollowingAlignment # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#87 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#85 def aligned_words?(range, line); end # @return [Boolean] @@ -28720,16 +29466,16 @@ module RuboCop::Cop::PrecedingFollowingAlignment # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#10 def allow_for_alignment?; end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#129 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#127 def assignment_lines; end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#133 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#131 def assignment_tokens; end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#149 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#147 def relevant_assignment_lines(line_range); end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#176 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#174 def remove_optarg_equals(asgn_tokens, processed_source); end end @@ -29360,6 +30106,7 @@ RuboCop::Cop::Security::MarshalLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # bad # open(something) # open("| #{something}") +# open("| foo") # URI.open(something) # # # good @@ -29369,7 +30116,6 @@ RuboCop::Cop::Security::MarshalLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # # good (literal strings) # open("foo.text") -# open("| foo") # URI.open("http://example.com") # # source://rubocop//lib/rubocop/cop/security/open.rb#37 @@ -29934,29 +30680,29 @@ class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#71 def check(send_node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#110 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#114 def class_send_elements(class_node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#153 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#157 def group_accessors(node, accessors); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#95 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#96 def groupable_accessor?(node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#130 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#134 def groupable_sibling_accessors(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#122 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#126 def grouped_style?; end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#139 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#143 def message(send_node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#144 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#148 def preferred_accessors(node); end # @return [Boolean] @@ -29964,12 +30710,12 @@ class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#91 def previous_line_comment?(node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#159 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#163 def separate_accessors(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#126 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#130 def separated_style?; end end @@ -30008,9 +30754,6 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/alias.rb#150 - def identifier(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#51 def on_alias(node); end @@ -30046,9 +30789,12 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/alias.rb#135 def correct_alias_to_alias_method(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#144 + # source://rubocop//lib/rubocop/cop/style/alias.rb#142 def correct_alias_with_symbol_args(corrector, node); end + # source://rubocop//lib/rubocop/cop/style/alias.rb#147 + def identifier(node); end + # source://rubocop//lib/rubocop/cop/style/alias.rb#113 def lexical_scope_type(node); end @@ -30180,22 +30926,50 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # This cop identifies places where `do_something(*args, &block)` # can be replaced by `do_something(...)`. # -# @example -# # bad -# def foo(*args, &block) -# bar(*args, &block) +# In Ruby 3.2, anonymous args/kwargs forwarding has been added. +# +# This cop also identifies places where `use_args(*args)`/`use_kwargs(**kwargs)` can be +# replaced by `use_args(*)`/`use_kwargs(**)`; if desired, this functionality can be disabled +# by setting `UseAnonymousForwarding: false`. +# +# And this cop has `RedundantRestArgumentNames`, `RedundantKeywordRestArgumentNames`, +# and `RedundantBlockArgumentNames` options. This configuration is a list of redundant names +# that are sufficient for anonymizing meaningless naming. +# +# Meaningless names that are commonly used can be anonymized by default: +# e.g., `*args`, `**options`, `&block`, and so on. +# +# Names not on this list are likely to be meaningful and are allowed by default. +# +# @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default) +# # bad - But it is good with `EnforcedStyle: explicit` set for `Naming/BlockForwarding`. +# def foo(&block) +# bar(&block) # end # +# # good +# def foo(&) +# bar(&) +# end +# @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2) # # bad -# def foo(*args, **kwargs, &block) -# bar(*args, **kwargs, &block) +# def foo(*args, **kwargs) +# args_only(*args) +# kwargs_only(**kwargs) # end # # # good -# def foo(...) -# bar(...) +# def foo(*, **) +# args_only(*) +# kwargs_only(**) # end -# @example AllowOnlyRestArgument: true (default) +# @example UseAnonymousForwarding: false (only relevant for Ruby >= 3.2) +# # good +# def foo(*args, **kwargs) +# args_only(*args) +# kwargs_only(**kwargs) +# end +# @example AllowOnlyRestArgument: true (default, only relevant for Ruby < 3.2) # # good # def foo(*args) # bar(*args) @@ -30204,7 +30978,7 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # def foo(**kwargs) # bar(**kwargs) # end -# @example AllowOnlyRestArgument: false +# @example AllowOnlyRestArgument: false (only relevant for Ruby < 3.2) # # bad # # The following code can replace the arguments with `...`, # # but it will change the behavior. Because `...` forwards block also. @@ -30215,60 +30989,260 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # def foo(**kwargs) # bar(**kwargs) # end +# @example RedundantRestArgumentNames: ['args', 'arguments'] (default) +# # bad +# def foo(*args) +# bar(*args) +# end +# +# # good +# def foo(*) +# bar(*) +# end +# @example RedundantKeywordRestArgumentNames: ['kwargs', 'options', 'opts'] (default) +# # bad +# def foo(**kwargs) +# bar(**kwargs) +# end # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#49 +# # good +# def foo(**) +# bar(**) +# end +# @example +# # bad +# def foo(*args, &block) +# bar(*args, &block) +# end +# +# # bad +# def foo(*args, **kwargs, &block) +# bar(*args, **kwargs, &block) +# end +# +# # good +# def foo(...) +# bar(...) +# end +# +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#116 class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#72 - def forwarding_method_arguments?(param0 = T.unsafe(nil), param1, param2, param3); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#84 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#135 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#84 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#135 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#64 - def only_rest_arguments?(param0 = T.unsafe(nil), param1); end + private - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#59 - def use_rest_arguments?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#176 + def add_forward_all_offenses(node, send_classifications, forwardable_args); end - private + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#329 + def add_parens_if_missing(node, corrector); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#199 + def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#116 - def all_lvars_as_forwarding_method_arguments?(def_node, forwarding_method); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#321 + def allow_only_rest_arguments?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#313 + def arguments_range(node, first_node); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#242 + def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#227 + def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#149 - def allow_only_rest_arguments?; end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#473 + def explicit_block_name?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#143 - def arguments_range(node); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#159 + def extract_forwardable_args(args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#103 - def extract_argument_names_from(args); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#217 + def non_splat_or_block_pass_lvar_references(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#110 - def forwarding_method?(node, rest_arg, kwargs, block_arg); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#171 + def only_forwards_all?(send_classifications); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#271 + def outside_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#163 + def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#125 - def register_offense_to_forwarding_method_arguments(forwarding_method); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#261 + def redundant_named_arg(arg, config_name, keyword); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#134 - def register_offense_to_method_definition_arguments(method_definition); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#303 + def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#277 + def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#293 + def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#285 + def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#325 + def use_anonymous_forwarding?; end + + class << self + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#131 + def autocorrect_incompatible_with; end + end end -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#56 -RuboCop::Cop::Style::ArgumentsForwarding::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#124 +RuboCop::Cop::Style::ArgumentsForwarding::ADDITIONAL_ARG_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#127 +RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#129 +RuboCop::Cop::Style::ArgumentsForwarding::BLOCK_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#123 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#126 +RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#128 +RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String) + +# Classifies send nodes for possible rest/kwrest/all (including block) forwarding. +# +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#336 +class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier + extend ::RuboCop::AST::NodePattern::Macros + + # @return [SendNodeClassifier] a new instance of SendNodeClassifier + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#348 + def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#376 + def classification; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#343 + def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#370 + def forwarded_block_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#346 + def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#364 + def forwarded_kwrest_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358 + def forwarded_rest_arg; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#340 + def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#444 + def additional_kwargs?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#440 + def additional_kwargs_or_forwarded_kwargs?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#454 + def allow_offense_for_no_block?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#425 + def any_arg_referenced?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#409 + def arguments; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#388 + def can_forward_all?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#448 + def forward_additional_kwargs?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#405 + def forwarded_rest_and_kwrest_args; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#467 + def missing_rest_arg_or_kwrest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#458 + def no_additional_args?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#433 + def no_post_splat_args?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#401 + def offensive_block_forwarding?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#421 + def referenced_block_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#417 + def referenced_kwrest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#413 + def referenced_rest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#397 + def ruby_32_missing_rest_or_kwest?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#429 + def target_ruby_version; end +end # Enforces the use of `Array()` instead of explicit `Array` check or `[*var]`. # @@ -30308,6 +31282,46 @@ RuboCop::Cop::Style::ArrayCoercion::CHECK_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#44 RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String) +# Identifies usages of `arr[0]` and `arr[-1]` and suggests to change +# them to use `arr.first` and `arr.last` instead. +# +# The cop is disabled by default due to safety concerns. +# +# @example +# # bad +# arr[0] +# arr[-1] +# +# # good +# arr.first +# arr.last +# arr[0] = 2 +# arr[0][-2] +# +# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#28 +class RuboCop::Cop::Style::ArrayFirstLast < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#35 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#58 + def brace_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#53 + def innermost_braces_node(node); end +end + +# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#31 +RuboCop::Cop::Style::ArrayFirstLast::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#32 +RuboCop::Cop::Style::ArrayFirstLast::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # In Ruby 3.1, `Array#intersect?` has been added. # # This cop identifies places where `(array1 & array2).any?` @@ -30316,6 +31330,15 @@ RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String) # The `array1.intersect?(array2)` method is faster than # `(array1 & array2).any?` and is more readable. # +# In cases like the following, compatibility is not ensured, +# so it will not be detected when using block argument. +# +# [source,ruby] +# ---- +# ([1] & [1,2]).any? { |x| false } # => false +# [1].intersect?([1,2]) { |x| false } # => true +# ---- +# # @example # # bad # (array1 & array2).any? @@ -30337,46 +31360,46 @@ RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String) # array1.intersect?(array2) # !array1.intersect?(array2) # -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#40 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#49 class RuboCop::Cop::Style::ArrayIntersect < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#56 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#65 def active_support_bad_intersection_check?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#70 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#79 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#47 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#56 def regular_bad_intersection_check?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#86 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#94 def bad_intersection_check?(node); end - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#98 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#106 def message(receiver, argument, method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#94 + # source://rubocop//lib/rubocop/cop/style/array_intersect.rb#102 def straight?(method_name); end end -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#64 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#73 RuboCop::Cop::Style::ArrayIntersect::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#67 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#76 RuboCop::Cop::Style::ArrayIntersect::NEGATED_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#68 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#77 RuboCop::Cop::Style::ArrayIntersect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#66 +# source://rubocop//lib/rubocop/cop/style/array_intersect.rb#75 RuboCop::Cop::Style::ArrayIntersect::STRAIGHT_METHODS = T.let(T.unsafe(nil), Array) # Checks for uses of "*" as a substitute for _join_. @@ -30453,7 +31476,7 @@ class RuboCop::Cop::Style::Attr < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/attr.rb#64 + # source://rubocop//lib/rubocop/cop/style/attr.rb#74 def class_eval?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/style/attr.rb#24 @@ -30461,13 +31484,23 @@ class RuboCop::Cop::Style::Attr < ::RuboCop::Cop::Base private + # @return [Boolean] + # # source://rubocop//lib/rubocop/cop/style/attr.rb#37 + def allowed_context?(node); end + + # source://rubocop//lib/rubocop/cop/style/attr.rb#47 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/attr.rb#49 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/attr.rb#43 + def define_attr_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/attr.rb#59 def message(node); end - # source://rubocop//lib/rubocop/cop/style/attr.rb#53 + # source://rubocop//lib/rubocop/cop/style/attr.rb#63 def replacement_method(node); end end @@ -30491,28 +31524,36 @@ RuboCop::Cop::Style::Attr::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # ... # end # -# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#19 +# # bad +# f = Tempfile.open('temp') +# +# # good +# Tempfile.open('temp') do |f| +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#27 class RuboCop::Cop::Style::AutoResourceCleanup < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#26 + # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#32 + def file_open_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#36 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#41 + # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#46 def cleanup?(node); end end -# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#20 +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#28 RuboCop::Cop::Style::AutoResourceCleanup::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#24 +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#29 RuboCop::Cop::Style::AutoResourceCleanup::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#22 -RuboCop::Cop::Style::AutoResourceCleanup::TARGET_METHODS = T.let(T.unsafe(nil), Hash) - # Checks if usage of %() or %Q() matches configuration. # # @example EnforcedStyle: bare_percent (default) @@ -30565,19 +31606,19 @@ end # source://rubocop//lib/rubocop/cop/style/bare_percent_literals.rb#30 RuboCop::Cop::Style::BarePercentLiterals::MSG = T.let(T.unsafe(nil), String) -# This cop checks for BEGIN blocks. +# Checks for BEGIN blocks. # # @example # # bad # BEGIN { test } # -# source://rubocop//lib/rubocop/cop/style/begin_block.rb#13 +# source://rubocop//lib/rubocop/cop/style/begin_block.rb#12 class RuboCop::Cop::Style::BeginBlock < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/begin_block.rb#16 + # source://rubocop//lib/rubocop/cop/style/begin_block.rb#15 def on_preexe(node); end end -# source://rubocop//lib/rubocop/cop/style/begin_block.rb#14 +# source://rubocop//lib/rubocop/cop/style/begin_block.rb#13 RuboCop::Cop::Style::BeginBlock::MSG = T.let(T.unsafe(nil), String) # Checks for places where `attr_reader` and `attr_writer` @@ -30950,7 +31991,7 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#458 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#459 def array_or_range?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#208 @@ -30958,7 +31999,7 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#462 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#463 def begin_required?(block_node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#236 @@ -30966,7 +32007,7 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#399 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#400 def braces_for_chaining_style?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#248 @@ -30974,25 +32015,25 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#376 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#377 def braces_required_method?(method_name); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#380 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#381 def braces_required_methods; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#409 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#410 def braces_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#454 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#455 def conditional?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#413 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#414 def correction_would_break_code?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#309 @@ -31000,12 +32041,12 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#423 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#424 def functional_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#419 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#420 def functional_method?(method_name); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#326 @@ -31013,7 +32054,7 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#384 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#385 def line_count_based_block_style?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#218 @@ -31027,12 +32068,12 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#431 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#432 def procedural_method?(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#427 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#428 def procedural_oneliners_may_have_braces?; end # @return [Boolean] @@ -31056,17 +32097,17 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#447 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#448 def return_value_of_scope?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#435 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#436 def return_value_used?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#388 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#389 def semantic_block_style?(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#226 @@ -31106,27 +32147,27 @@ RuboCop::Cop::Style::BlockDelimiters::BRACES_REQUIRED_MESSAGE = T.let(T.unsafe(n # Corrector to correct conditional assignment in `case` statements. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#603 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#605 class RuboCop::Cop::Style::CaseCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#608 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#610 def correct(corrector, cop, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#618 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#620 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#638 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#640 def extract_branches(case_node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#632 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#634 def extract_tail_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#648 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#650 def move_branch_inside_condition(corrector, branch, condition, assignment, column); end end end @@ -31490,9 +32531,12 @@ class RuboCop::Cop::Style::ClassCheck < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/class_check.rb#44 + # source://rubocop//lib/rubocop/cop/style/class_check.rb#45 def message(node); end + # source://rubocop//lib/rubocop/cop/style/class_check.rb#33 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/class_check.rb#33 def on_send(node); end end @@ -31505,7 +32549,7 @@ RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Enforces the use of `Object#instance_of?` instead of class comparison # for equality. -# `==`, `equal?`, and `eql?` methods are allowed by default. +# `==`, `equal?`, and `eql?` custom method definitions are allowed by default. # These are customizable with `AllowedMethods` option. # # @example @@ -31517,85 +32561,77 @@ RuboCop::Cop::Style::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # var.instance_of?(Date) -# @example AllowedMethods: [] (default) +# @example AllowedMethods: ['==', 'equal?', 'eql?'] (default) # # good -# var.instance_of?(Date) +# def ==(other) +# self.class == other.class && name == other.name +# end # -# # bad -# var.class == Date -# var.class.equal?(Date) -# var.class.eql?(Date) -# var.class.name == 'Date' -# var.class.to_s == 'Date' -# var.class.inspect == 'Date' -# @example AllowedMethods: [`==`] -# # good -# var.instance_of?(Date) -# var.class == Date -# var.class.name == 'Date' -# var.class.to_s == 'Date' -# var.class.inspect == 'Date' +# def equal?(other) +# self.class.equal?(other.class) && name.equal?(other.name) +# end # -# # bad -# var.class.equal?(Date) -# var.class.eql?(Date) +# def eql?(other) +# self.class.eql?(other.class) && name.eql?(other.name) +# end # @example AllowedPatterns: [] (default) -# # good -# var.instance_of?(Date) -# # # bad -# var.class == Date -# var.class.equal?(Date) -# var.class.eql?(Date) -# var.class.name == 'Date' -# var.class.to_s == 'Date' -# var.class.inspect == 'Date' +# def eq(other) +# self.class.eq(other.class) && name.eq(other.name) +# end # @example AllowedPatterns: ['eq'] # # good -# var.instance_of?(Date) -# var.class.equal?(Date) -# var.class.eql?(Date) -# -# # bad -# var.class == Date -# var.class.name == 'Date' -# var.class.to_s == 'Date' -# var.class.inspect == 'Date' +# def eq(other) +# self.class.eq(other.class) && name.eq(other.name) +# end # -# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#69 +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#52 class RuboCop::Cop::Style::ClassEqualityComparison < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#81 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#64 def class_comparison_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#87 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#70 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#105 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#92 def class_name(class_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#119 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#112 def class_name_method?(method_name); end - # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#123 + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#128 def offense_range(receiver_node, node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#116 + def require_cbase?(class_node); end + + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#124 + def trim_string_quotes(class_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#120 + def unable_to_determine_type?(class_node); end end -# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#78 +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#61 RuboCop::Cop::Style::ClassEqualityComparison::CLASS_NAME_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#75 +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#58 RuboCop::Cop::Style::ClassEqualityComparison::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#77 +# source://rubocop//lib/rubocop/cop/style/class_equality_comparison.rb#60 RuboCop::Cop::Style::ClassEqualityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for uses of the class/module name instead of @@ -31802,8 +32838,12 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # @example # # bad # array.reject(&:nil?) +# array.delete_if(&:nil?) # array.reject { |e| e.nil? } +# array.delete_if { |e| e.nil? } # array.select { |e| !e.nil? } +# array.grep_v(nil) +# array.grep_v(NilClass) # # # good # array.compact @@ -31815,48 +32855,59 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # hash.compact! +# @example AllowedReceivers: ['params'] +# # good +# params.reject(&:nil?) # -# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#36 +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#44 class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedReceivers include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#72 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#85 + def grep_v_with_nil?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#89 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#89 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#52 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#64 def reject_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#45 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#57 def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#62 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#74 def select_method?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#106 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#129 def good_method_name(node); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#84 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#106 def offense_range(node); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#114 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#137 def range(begin_pos_node, end_pos_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#100 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#123 def to_enum_method?(node); end end -# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#40 +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#50 RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#41 +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#51 RuboCop::Cop::Style::CollectionCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#42 +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#52 RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), Array) # Enforces the use of consistent method names @@ -31876,6 +32927,7 @@ RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), A # # bad # items.collect # items.collect! +# items.collect_concat # items.inject # items.detect # items.find_all @@ -31884,50 +32936,51 @@ RuboCop::Cop::Style::CollectionCompact::TO_ENUM_METHODS = T.let(T.unsafe(nil), A # # good # items.map # items.map! +# items.flat_map # items.reduce # items.find # items.select # items.include? # -# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#41 +# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#43 class RuboCop::Cop::Style::CollectionMethods < ::RuboCop::Cop::Base include ::RuboCop::Cop::MethodPreference extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#53 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#55 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#61 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#63 def check_method_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#70 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#72 def implicit_block?(node); end - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#78 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#80 def message(node); end # Some enumerable methods accept a bare symbol (ie. _not_ Symbol#to_proc) instead # of a block. # - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#84 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#86 def methods_accepting_symbol; end end -# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#45 +# source://rubocop//lib/rubocop/cop/style/collection_methods.rb#47 RuboCop::Cop::Style::CollectionMethods::MSG = T.let(T.unsafe(nil), String) -# Checks for methods invoked via the :: operator instead -# of the . operator (like FileUtils::rmdir instead of FileUtils.rmdir). +# Checks for methods invoked via the `::` operator instead +# of the `.` operator (like `FileUtils::rmdir` instead of `FileUtils.rmdir`). # # @example # # bad @@ -32037,29 +33090,42 @@ RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#59 class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#62 + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#71 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#77 def on_for(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#62 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64 def on_numblock(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#80 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#88 def collection_looping_method?(node); end + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#105 + def combine_with_left_sibling(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#112 + def correct_end_of_block(corrector, node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#86 - def same_collection_looping?(node, sibling); end + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#93 + def same_collection_looping_block?(node, sibling); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#101 + def same_collection_looping_for?(node, sibling); end end -# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#60 +# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#62 RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String) # Enforces using `` or %x around command literals. @@ -32463,20 +33529,23 @@ RuboCop::Cop::Style::ComparableClamp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar class RuboCop::Cop::Style::ConcatArrayLiterals < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#34 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#34 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#69 + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#70 def offense_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#86 + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#87 def percent_literals_includes_only_basic_literals?(node); end - # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#73 + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#74 def preferred_method(node); end end @@ -32829,22 +33898,22 @@ RuboCop::Cop::Style::ConditionalAssignmentHelper::KEYWORD = T.let(T.unsafe(nil), # # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#440 module RuboCop::Cop::Style::ConditionalCorrectorHelper - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#459 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#461 def assignment(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#489 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#491 def correct_branches(corrector, branches); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#466 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#468 def correct_if_branches(corrector, cop, node); end # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#441 def remove_whitespace_in_branches(corrector, branch, condition, column); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#476 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#478 def replace_branch_assignment(corrector, branch); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#452 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#454 def white_space_range(node, column); end end @@ -32929,53 +33998,53 @@ end # source://rubocop//lib/rubocop/cop/style/constant_visibility.rb#48 RuboCop::Cop::Style::ConstantVisibility::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/copyright.rb#18 +# source://rubocop//lib/rubocop/cop/style/copyright.rb#21 class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/copyright.rb#25 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#28 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/style/copyright.rb#44 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#47 def autocorrect_notice; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#75 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#78 def encoding_token?(processed_source, token_index); end - # source://rubocop//lib/rubocop/cop/style/copyright.rb#61 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#64 def insert_notice_before(processed_source); end - # source://rubocop//lib/rubocop/cop/style/copyright.rb#40 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#43 def notice; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#82 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#85 def notice_found?(processed_source); end - # source://rubocop//lib/rubocop/cop/style/copyright.rb#48 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#51 def offense_range; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#68 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#71 def shebang_token?(processed_source, token_index); end # @raise [Warning] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#52 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#55 def verify_autocorrect_notice!; end end -# source://rubocop//lib/rubocop/cop/style/copyright.rb#23 +# source://rubocop//lib/rubocop/cop/style/copyright.rb#26 RuboCop::Cop::Style::Copyright::AUTOCORRECT_EMPTY_WARNING = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/copyright.rb#22 +# source://rubocop//lib/rubocop/cop/style/copyright.rb#25 RuboCop::Cop::Style::Copyright::MSG = T.let(T.unsafe(nil), String) # Checks for inheritance from `Data.define` to avoid creating the anonymous parent class. @@ -33066,6 +34135,9 @@ class RuboCop::Cop::Style::DateTime < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/date_time.rb#61 def historic_date?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/date_time.rb#70 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/date_time.rb#70 def on_send(node); end @@ -33074,12 +34146,12 @@ class RuboCop::Cop::Style::DateTime < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/date_time.rb#85 + # source://rubocop//lib/rubocop/cop/style/date_time.rb#86 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/date_time.rb#81 + # source://rubocop//lib/rubocop/cop/style/date_time.rb#82 def disallow_coercion?; end end @@ -33139,7 +34211,7 @@ end # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String) -# Checks for places where the `#__dir__` method can replace more +# Checks for places where the `#\_\_dir\_\_` method can replace more # complex constructs to retrieve a canonicalized absolute path to the # current file. # @@ -33198,12 +34270,12 @@ class RuboCop::Cop::Style::DirEmpty < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#28 def offensive?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#39 + # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#37 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#51 + # source://rubocop//lib/rubocop/cop/style/dir_empty.rb#48 def bang(node); end end @@ -33822,7 +34894,7 @@ class RuboCop::Cop::Style::EachForSimpleLoop < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#48 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#46 def offending?(node); end end @@ -33979,30 +35051,33 @@ class RuboCop::Cop::Style::EmptyCaseCondition < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#44 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#46 def on_case(case_node); end private - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#58 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#63 def autocorrect(corrector, case_node); end - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#65 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#70 def correct_case_when(corrector, case_node, when_nodes); end - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#77 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#82 def correct_when_conditions(corrector, when_nodes); end - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#92 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#97 def keep_first_when_comment(case_range, corrector); end - # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#102 + # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#107 def replace_then_with_line_break(corrector, conditions, when_node); end end # source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#42 RuboCop::Cop::Style::EmptyCaseCondition::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/empty_case_condition.rb#43 +RuboCop::Cop::Style::EmptyCaseCondition::NOT_SUPPORTED_PARENT_TYPES = T.let(T.unsafe(nil), Array) + # Checks for empty else-clauses, possibly including comments and/or an # explicit `nil` depending on the EnforcedStyle. # @@ -34622,12 +35697,12 @@ RuboCop::Cop::Style::EnvHome::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Ensures that eval methods (`eval`, `instance_eval`, `class_eval` -# and `module_eval`) are given filename and line number values (`__FILE__` -# and `__LINE__`). This data is used to ensure that any errors raised +# and `module_eval`) are given filename and line number values (`\_\_FILE\_\_` +# and `\_\_LINE\_\_`). This data is used to ensure that any errors raised # within the evaluated code will be given the correct identification # in a backtrace. # -# The cop also checks that the line number given relative to `__LINE__` is +# The cop also checks that the line number given relative to `\_\_LINE\_\_` is # correct. # # This cop will autocorrect incorrect or missing filename and line number @@ -34685,40 +35760,40 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#195 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#184 def add_offense_for_different_line(node, line_node, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#142 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#131 def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#210 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#199 def add_offense_for_missing_line(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#217 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#206 def add_offense_for_missing_location(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#189 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#178 def add_offense_for_same_line(node, line_node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#154 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#143 def check_file(node, file_node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#167 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#156 def check_line(node, code); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#95 def check_location(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#202 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#191 def expected_line(sign, line_diff); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#122 def file_and_line(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#177 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#166 def line_difference(line_node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#229 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#218 def missing_line(node, code); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#109 @@ -34734,20 +35809,13 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#118 def special_line_keyword?(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#181 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#170 def string_first_line(str_node); end # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#127 def with_binding?(node); end - - # FIXME: It's a Style/ConditionalAssignment's false positive. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#133 - def with_lineno?(node); end end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#59 @@ -34800,6 +35868,55 @@ RuboCop::Cop::Style::EvenOdd::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/even_odd.rb#22 RuboCop::Cop::Style::EvenOdd::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks for exact regexp match inside Regexp literals. +# +# @example +# +# # bad +# string =~ /\Astring\z/ +# string === /\Astring\z/ +# string.match(/\Astring\z/) +# string.match?(/\Astring\z/) +# +# # good +# string == 'string' +# +# # bad +# string !~ /\Astring\z/ +# +# # good +# string != 'string' +# +# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#25 +class RuboCop::Cop::Style::ExactRegexpMatch < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#32 + def exact_regexp_match(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#40 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#40 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#56 + def exact_match_pattern?(parsed_regexp); end + + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#63 + def new_method(node); end +end + +# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#28 +RuboCop::Cop::Style::ExactRegexpMatch::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#29 +RuboCop::Cop::Style::ExactRegexpMatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for use of the `File.expand_path` arguments. # Likewise, it also checks for the `Pathname.new` argument. # @@ -35531,13 +36648,25 @@ RuboCop::Cop::Style::For::PREFER_EACH = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) # Enforces the use of a single string formatting utility. -# Valid options include Kernel#format, Kernel#sprintf and String#%. +# Valid options include `Kernel#format`, `Kernel#sprintf`, and `String#%`. # -# The detection of String#% cannot be implemented in a reliable +# The detection of `String#%` cannot be implemented in a reliable # manner for all cases, so only two scenarios are considered - # if the first argument is a string literal and if the second # argument is an array literal. # +# Autocorrection will be applied when using argument is a literal or known built-in conversion +# methods such as `to_d`, `to_f`, `to_h`, `to_i`, `to_r`, `to_s`, and `to_sym` on variables, +# provided that their return value is not an array. For example, when using `to_s`, +# `'%s' % [1, 2, 3].to_s` can be autocorrected without any incompatibility: +# +# [source,ruby] +# ---- +# '%s' % [1, 2, 3] #=> '1' +# format('%s', [1, 2, 3]) #=> '[1, 2, 3]' +# '%s' % [1, 2, 3].to_s #=> '[1, 2, 3]' +# ---- +# # @example EnforcedStyle: format (default) # # bad # puts sprintf('%10s', 'hoge') @@ -35560,45 +36689,55 @@ RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) # # good # puts '%10s' % 'hoge' # -# source://rubocop//lib/rubocop/cop/style/format_string.rb#38 +# source://rubocop//lib/rubocop/cop/style/format_string.rb#50 class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/format_string.rb#46 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#61 def formatter(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/format_string.rb#59 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#74 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/format_string.rb#55 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#70 def variable_argument?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/format_string.rb#81 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#102 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/format_string.rb#97 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#118 def autocorrect_from_percent(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/format_string.rb#111 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#132 def autocorrect_to_percent(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/format_string.rb#124 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/format_string.rb#88 + def autocorrectable?(node); end + + # source://rubocop//lib/rubocop/cop/style/format_string.rb#145 def format_single_parameter(arg); end - # source://rubocop//lib/rubocop/cop/style/format_string.rb#73 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#94 def message(detected_style); end - # source://rubocop//lib/rubocop/cop/style/format_string.rb#77 + # source://rubocop//lib/rubocop/cop/style/format_string.rb#98 def method_name(style_name); end end -# source://rubocop//lib/rubocop/cop/style/format_string.rb#42 +# Known conversion methods whose return value is not an array. +# +# source://rubocop//lib/rubocop/cop/style/format_string.rb#58 +RuboCop::Cop::Style::FormatString::AUTOCORRECTABLE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/format_string.rb#54 RuboCop::Cop::Style::FormatString::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/format_string.rb#43 +# source://rubocop//lib/rubocop/cop/style/format_string.rb#55 RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Use a consistent style for named format string tokens. @@ -35824,10 +36963,10 @@ class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#176 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#178 def disabled_offense(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#188 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#190 def enable_comment(corrector); end # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#120 @@ -35839,34 +36978,34 @@ class RuboCop::Cop::Style::FrozenStringLiteralComment < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#114 def ensure_no_comment(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#212 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#214 def following_comment; end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#150 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#152 def frozen_string_literal_comment(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#194 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#196 def insert_comment(corrector); end # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#137 def last_special_comment(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#204 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#206 def line_range(line); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#156 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#158 def missing_offense(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#162 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#164 def missing_true_offense(processed_source); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#208 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#210 def preceding_comment; end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#184 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#186 def remove_comment(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#168 + # source://rubocop//lib/rubocop/cop/style/frozen_string_literal_comment.rb#170 def unnecessary_comment_offense(processed_source); end end @@ -36031,6 +37170,25 @@ RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String) # # good # foo || raise('exception') if something # ok +# +# # bad +# define_method(:test) do +# if something +# work +# end +# end +# +# # good +# define_method(:test) do +# return unless something +# +# work +# end +# +# # also good +# define_method(:test) do +# work if something +# end # @example AllowConsecutiveConditionals: false (default) # # bad # def test @@ -36067,7 +37225,7 @@ RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String) # end # end # -# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#95 +# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#114 class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp @@ -36076,83 +37234,89 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#104 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#132 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#123 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#104 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#123 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#113 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#139 def on_if(node); end + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#132 + def on_numblock(node); end + private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#247 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#275 def accepted_form?(node, ending: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#255 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#283 def accepted_if?(node, ending); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#269 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#297 def allowed_consecutive_conditionals?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#237 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#265 def and_or_guard_clause?(guard_clause); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#184 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#210 def autocorrect(corrector, node, condition, replacement, guard); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#208 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#236 def autocorrect_heredoc_argument(corrector, node, heredoc_branch, leave_branch, guard); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#133 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#159 def check_ending_body(body); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#144 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#170 def check_ending_if(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#154 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#180 def consecutive_conditionals?(parent, node); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#229 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#257 def guard_clause_source(guard_clause); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#204 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#232 def heredoc?(argument); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#220 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#248 def range_of_branch_to_remove(node, guard); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#162 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#188 def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#265 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#293 def remove_whole_lines(corrector, range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#242 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#270 def too_long_for_single_line?(node, example); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#251 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#279 def trivial?(node); end end -# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#101 +# source://rubocop//lib/rubocop/cop/style/guard_clause.rb#120 RuboCop::Cop::Style::GuardClause::MSG = T.let(T.unsafe(nil), String) # Checks for presence or absence of braces around hash literal as a last @@ -36245,62 +37409,62 @@ end # # bad # Hash[*ary] # -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#34 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#44 class RuboCop::Cop::Style::HashConversion < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#44 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#54 def hash_from_array?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#46 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#56 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#128 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#138 def allowed_splat_argument?; end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#121 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#131 def args_to_hash(args); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#108 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#118 def multi_argument(node); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#84 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#94 def register_offense_for_hash(node, hash_argument); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#93 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#103 def register_offense_for_zip_method(node, zip_method); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#103 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#113 def requires_parens?(node); end - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#61 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#71 def single_argument(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#78 + # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#88 def use_zip_method_without_argument?(first_argument); end end -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#39 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#49 RuboCop::Cop::Style::HashConversion::MSG_LITERAL_HASH_ARG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#38 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#48 RuboCop::Cop::Style::HashConversion::MSG_LITERAL_MULTI_ARG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#40 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#50 RuboCop::Cop::Style::HashConversion::MSG_SPLAT = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#37 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#47 RuboCop::Cop::Style::HashConversion::MSG_TO_H = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#41 +# source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#51 RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for uses of `each_key` and `each_value` Hash methods. @@ -36312,82 +37476,114 @@ RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # @example # # bad # hash.keys.each { |k| p k } -# hash.values.each { |v| p v } +# hash.each { |k, unused_value| p k } # # # good # hash.each_key { |k| p k } +# +# # bad +# hash.values.each { |v| p v } +# hash.each { |unused_key, v| p v } +# +# # good # hash.each_value { |v| p v } # @example AllowedReceivers: ['execute'] # # good # execute(sql).keys.each { |v| p v } # execute(sql).values.each { |v| p v } # -# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#30 +# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#36 class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedReceivers include ::RuboCop::Cop::Lint::UnusedArgument extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#37 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#74 + def check_unused_block_args(node, key, value); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#51 + def each_arguments(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#46 def kv_each(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#42 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#56 def kv_each_with_block_pass(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#46 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#60 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#54 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#95 def on_block_pass(node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#46 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#60 def on_numblock(node); end private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#120 - def allowed_receiver?(receiver); end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#138 - def allowed_receivers; end - - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#85 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#180 def check_argument(variable); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#109 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#204 def correct_args(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#95 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#190 def correct_implicit(node, corrector, method_name); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#100 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#195 def correct_key_value_each(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#81 - def format_message(method_name); end + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#176 + def format_message(method_name, current); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#103 + def handleable?(node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#116 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#211 def kv_range(outer_node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#126 - def receiver_name(receiver); end + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#133 + def message(prefer, method_name, unused_code); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#62 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#139 + def register_each_args_offense(node, message, prefer, unused_range); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#110 def register_kv_offense(target, method); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#71 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#146 def register_kv_with_block_pass_offense(node, target, method); end + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#167 + def root_receiver(node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#91 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#121 + def unused_block_arg_exist?(node, block_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#157 + def use_array_converter_method_as_preceding?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#186 def used?(arg); end end -# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#34 +# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#43 +RuboCop::Cop::Style::HashEachMethods::ARRAY_CONVERTER_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#41 RuboCop::Cop::Style::HashEachMethods::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#42 +RuboCop::Cop::Style::HashEachMethods::UNUSED_BLOCK_ARG_MSG = T.let(T.unsafe(nil), String) + # Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods # that can be replaced with `Hash#except` method. # @@ -36423,6 +37619,9 @@ class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/hash_except.rb#44 def bad_method_with_poro?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#75 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#75 def on_send(node); end @@ -36430,42 +37629,42 @@ class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#92 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#94 def bad_method?(block); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#154 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#166 def decorate_source(value); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#162 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#174 def except_key(node); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#141 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#153 def except_key_source(key); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#135 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#147 def extract_body_if_negated(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#116 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#128 def included?(negated, body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#120 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#132 def not_included?(negated, body); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#171 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#183 def offense_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#124 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#136 def safe_to_register_offense?(block, except_key); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#100 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#112 def semantically_except_method?(send, block); end end @@ -36708,8 +37907,8 @@ RuboCop::Cop::Style::HashSyntax::MSG_HASH_ROCKETS = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#120 RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String) -# Looks for uses of `_.each_with_object({}) {...}`, -# `_.map {...}.to_h`, and `Hash[_.map {...}]` that are actually just +# Looks for uses of `\_.each_with_object({}) {...}`, +# `\_.map {...}.to_h`, and `Hash[\_.map {...}]` that are actually just # transforming the keys of a hash, and tries to use a simpler & faster # call to `transform_keys` instead. # It should only be enabled on Ruby version 2.5 or newer. @@ -36753,8 +37952,8 @@ class RuboCop::Cop::Style::HashTransformKeys < ::RuboCop::Cop::Base def new_method_name; end end -# Looks for uses of `_.each_with_object({}) {...}`, -# `_.map {...}.to_h`, and `Hash[_.map {...}]` that are actually just +# Looks for uses of `\_.each_with_object({}) {...}`, +# `\_.map {...}.to_h`, and `Hash[\_.map {...}]` that are actually just # transforming the values of a hash, and tries to use a simpler & faster # call to `transform_values` instead. # @@ -36899,40 +38098,43 @@ class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base private + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#184 + def assignable_condition_value(node); end + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#140 def check_branches(node, branches); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#167 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#193 def check_expressions(node, expressions, insert_position); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#156 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#173 def duplicated_expressions?(node, expressions); end # `elsif` branches show up in the if node as nested `else` branches. We # need to recursively iterate over all `else` branches. # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#204 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#233 def expand_elses(branch); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#219 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#248 def head(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#188 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#217 def last_child_of_parent?(node); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#198 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#227 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#194 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#223 def single_child_branch?(branch_node); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#215 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#244 def tail(node); end end @@ -36941,24 +38143,24 @@ RuboCop::Cop::Style::IdenticalConditionalBranches::MSG = T.let(T.unsafe(nil), St # Corrector to correct conditional assignment in `if` statements. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#558 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#560 class RuboCop::Cop::Style::IfCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#563 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#565 def correct(corrector, cop, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#567 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#569 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#581 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#583 def extract_tail_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#588 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#590 def move_branch_inside_condition(corrector, branch, condition, assignment, column); end end end @@ -37021,43 +38223,43 @@ class RuboCop::Cop::Style::IfInsideElse < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#67 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#69 def on_if(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#144 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#150 def allow_if_modifier?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#140 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#146 def allow_if_modifier_in_else_branch?(else_branch); end - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#82 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#88 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#111 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#117 def correct_to_elsif_from_if_inside_else_form(corrector, node, condition); end - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#103 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#109 def correct_to_elsif_from_modifier_form(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#129 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#135 def find_end_range(node); end - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#136 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#142 def if_condition_range(node, condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#125 + # source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#131 def then?(node); end end -# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#65 +# source://rubocop//lib/rubocop/cop/style/if_inside_else.rb#66 RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String) # Checks for `if` and `unless` statements that would fit on one line if @@ -37133,103 +38335,103 @@ class RuboCop::Cop::Style::IfUnlessModifier < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#168 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#171 def allowed_patterns; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#228 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#231 def another_statement_on_same_line?(node); end - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#129 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#132 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#282 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#285 def comment_on_node_line(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#101 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#104 def defined_argument_is_undefined?(if_node, defined_node); end - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#93 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#96 def defined_nodes(condition); end - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#269 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#272 def extract_heredoc_from(last_argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#212 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#215 def line_length_enabled_at_line?(line); end - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#121 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#124 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#216 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#219 def named_capture_in_condition?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#220 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#223 def non_eligible_node?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#224 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#227 def non_simple_if_unless?(node); end - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#111 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#114 def pattern_matching_nodes(condition); end - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#286 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#289 def remove_comment(corrector, _node, comment); end - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#276 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#279 def remove_heredoc(corrector, heredoc); end - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#138 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#141 def replacement_for_modifier_form(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#262 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#265 def to_modifier_form_with_move_comment(node, indentation, comment); end - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#242 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#245 def to_normal_form(node, indentation); end - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#250 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#253 def to_normal_form_with_heredoc(node, indentation, heredoc); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#162 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#165 def too_long_due_to_comment_after_modifier?(node, comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#157 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#160 def too_long_due_to_modifier?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#203 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#206 def too_long_line_based_on_allow_uri?(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#186 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#189 def too_long_line_based_on_config?(range, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#195 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#198 def too_long_line_based_on_ignore_cop_directives?(range, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#173 + # source://rubocop//lib/rubocop/cop/style/if_unless_modifier.rb#176 def too_long_single_line?(node); end class << self @@ -37629,10 +38831,13 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#61 def inverse_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#91 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#91 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#78 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92 def on_numblock(node); end # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#78 @@ -37642,39 +38847,39 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#176 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#177 def camel_case_constant?(node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#120 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#121 def correct_inverse_block(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#111 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#112 def correct_inverse_method(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#127 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#128 def correct_inverse_selector(block, corrector); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#180 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#181 def dot_range(loc); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#163 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#164 def end_parentheses(node, method_call); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#149 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#150 def inverse_blocks; end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#144 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#145 def inverse_methods; end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#190 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#191 def message(method, inverse); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#153 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#154 def negated?(node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#157 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#158 def not_to_receiver(node, method_call); end # When comparing classes, `!(Integer < Numeric)` is not the same as @@ -37682,10 +38887,10 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#171 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#172 def possible_class_hierarchy_check?(lhs, rhs, method); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#184 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#185 def remove_end_parenthesis(corrector, node, method, method_call); end class << self @@ -37719,12 +38924,16 @@ RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # Methods that can be inverted should be defined in `InverseMethods`. Note that # the relationship of inverse methods needs to be defined in both directions. # For example, -# InverseMethods: -# :!=: :== -# :even?: :odd? -# :odd?: :even? # -# will suggest both `even?` and `odd?` to be inverted, but only `!=` (and not `==`). +# [source,yaml] +# ---- +# InverseMethods: +# :!=: :== +# :even?: :odd? +# :odd?: :even? +# ---- +# +# will suggest both `even?` and `odd?` to be inverted, but only `!=` (and not `==`). # # @example # # bad (simple condition) @@ -37748,36 +38957,45 @@ RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # good (if) # foo if !condition # -# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#47 +# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#51 class RuboCop::Cop::Style::InvertibleUnlessCondition < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#52 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#56 def on_if(node); end private - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#87 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#128 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#100 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#141 def autocorrect_send_node(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#81 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#88 def inheritance_check?(node); end - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#108 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#149 def inverse_methods; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#66 + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#73 def invertible?(node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#94 + def preferred_condition(node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#121 + def preferred_logical_condition(node); end + + # source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#102 + def preferred_send_condition(node); end end -# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#50 +# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#54 RuboCop::Cop::Style::InvertibleUnlessCondition::MSG = T.let(T.unsafe(nil), String) # Checks for hardcoded IP addresses, which can make code @@ -37997,34 +39215,34 @@ class RuboCop::Cop::Style::LambdaCall < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#28 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#29 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#62 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#67 def explicit_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#58 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#63 def implicit_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#46 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#51 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#50 + # source://rubocop//lib/rubocop/cop/style/lambda_call.rb#55 def prefer(node); end end -# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#25 +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#26 RuboCop::Cop::Style::LambdaCall::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#26 +# source://rubocop//lib/rubocop/cop/style/lambda_call.rb#27 RuboCop::Cop::Style::LambdaCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for string literal concatenation at @@ -38301,10 +39519,10 @@ class RuboCop::Cop::Style::MagicCommentFormat::CommentRange # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#125 def directives; end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def loc(*args, **_arg1, &block); end - # source://forwardable/1.3.3/forwardable.rb#231 + # source://forwardable/1.3.2/forwardable.rb#229 def text(*args, **_arg1, &block); end # A magic comment can contain one value (normal style) or @@ -38373,32 +39591,35 @@ class RuboCop::Cop::Style::MapCompactWithConditionalBlock < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#46 def map_and_compact?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#72 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#72 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#125 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#126 def range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#91 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#92 def returns_block_argument?(block_argument_node, return_value_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#95 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#96 def truthy_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#115 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#116 def truthy_branch_for_guard?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#105 + # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#106 def truthy_branch_for_if?(node); end end @@ -38432,15 +39653,23 @@ class RuboCop::Cop::Style::MapToHash < ::RuboCop::Cop::Base extend ::RuboCop::Cop::TargetRubyVersion # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#41 - def map_to_h?(param0 = T.unsafe(nil)); end + def map_to_h(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#52 + def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#48 + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#52 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#62 + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#68 def autocorrect(corrector, to_h, map); end + + class << self + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#48 + def autocorrect_incompatible_with; end + end end # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#37 @@ -38689,23 +39918,20 @@ class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 - def on_super(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 def on_yield(node); end private - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#226 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#225 def args_begin(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#235 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#233 def args_end(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#239 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#237 def args_parenthesized?(node); end class << self @@ -38727,12 +39953,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#159 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#174 def allowed_chained_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#155 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#170 def allowed_multiline_call_with_parentheses?(node); end # @return [Boolean] @@ -38742,17 +39968,17 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#168 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#183 def ambiguous_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#197 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212 def assigned_before?(node, target); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#205 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#220 def assignment_in_condition?(node); end # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#31 @@ -38760,52 +39986,62 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#142 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#151 def call_as_argument_or_chain?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#99 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#144 + def call_in_argument_with_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#100 def call_in_literals?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#110 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#111 def call_in_logical_operators?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#119 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#157 + def call_in_match_pattern?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#120 def call_in_optional_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#123 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#124 def call_in_single_line_inheritance?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#127 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#128 def call_with_ambiguous_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#137 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#140 def call_with_braced_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#215 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#230 def forwards_anonymous_rest_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#184 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#199 def hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#148 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#163 def hash_literal_in_arguments?(node); end # @return [Boolean] @@ -38815,7 +40051,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#201 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#216 def inside_string_interpolation?(node); end # Require hash value omission be enclosed in parentheses to prevent the following issue: @@ -38833,7 +40069,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#180 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#195 def logical_operator?(node); end # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#40 @@ -38849,7 +40085,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#188 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#203 def regexp_slash_literal?(node); end # @return [Boolean] @@ -38859,7 +40095,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#172 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#187 def splat?(node); end # @return [Boolean] @@ -38874,12 +40110,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#176 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#191 def ternary_if?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#192 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#207 def unary_literal?(node); end end @@ -38925,6 +40161,9 @@ RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_ # This cop can be customized allowed methods with `AllowedMethods`. # By default, there are no methods to allowed. # +# NOTE: This cop allows the use of `it()` without arguments in blocks, +# as in `0.times { it() }`, following `Lint/ItWithoutArgumentsInBlock` cop. +# # @example # # bad # object.some_method() @@ -38938,55 +40177,66 @@ RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_ # # good # object.foo() # -# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#26 +# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#29 class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#33 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#37 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#60 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#66 def allowed_method_name?(name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#74 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#94 def any_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#56 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#62 def default_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#52 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#58 def ineligible_node?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#97 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#117 def offense_range(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#45 + # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: + # + # $ ruby -e '0.times { begin; it; end }' + # -e:1: warning: `it` calls without arguments will refer to the first block param in + # Ruby 3.4; use it() or self.it + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#86 + def parenthesized_it_method_in_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#51 def register_offense(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#64 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#70 def same_name_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#90 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#110 def variable_in_mass_assignment?(variable_name, node); end end -# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#31 +# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#34 RuboCop::Cop::Style::MethodCallWithoutArgsParentheses::MSG = T.let(T.unsafe(nil), String) # Checks for methods called on a do...end block. The point of @@ -39425,12 +40675,12 @@ RuboCop::Cop::Style::MissingElse::MSG_NIL = T.let(T.unsafe(nil), String) # defining `respond_to_missing?`. # # @example -# #bad +# # bad # def method_missing(name, *args) # # ... # end # -# #good +# # good # def respond_to_missing?(name, include_private) # # ... # end @@ -39962,33 +41212,33 @@ class RuboCop::Cop::Style::MultilineMethodSignature < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#57 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#60 def arguments_range(node); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#38 - def autocorrect(corrector, node); end + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#41 + def autocorrect(corrector, node, begin_of_arguments); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#69 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#72 def closing_line(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#73 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#76 def correction_exceeds_max_line_length?(node); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#81 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#84 def definition_width(node); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#77 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#80 def indentation_width(node); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#53 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#56 def last_line_source_of_arguments(arguments); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#85 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#88 def max_line_length; end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#65 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#68 def opening_line(node); end end @@ -40038,12 +41288,12 @@ class RuboCop::Cop::Style::MultilineTernaryOperator < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#60 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#84 + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#82 def comments_in_condition(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#90 + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#88 def enforce_single_line_ternary_operator?(node); end # @return [Boolean] @@ -40051,12 +41301,12 @@ class RuboCop::Cop::Style::MultilineTernaryOperator < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#56 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#70 + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#68 def replacement(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#94 + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#92 def use_assignment_method?(node); end end @@ -40155,70 +41405,79 @@ RuboCop::Cop::Style::MultilineWhenThen::MSG = T.let(T.unsafe(nil), String) # # # good # foo if [b.lightweight, b.heavyweight].include?(a) +# @example ComparisonsThreshold: 2 (default) +# # bad +# foo if a == 'a' || a == 'b' +# @example ComparisonsThreshold: 3 +# # good +# foo if a == 'a' || a == 'b' # -# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#43 +# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#52 class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#49 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#58 def on_new_investigation; end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#53 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#62 def on_or(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#78 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#88 def simple_comparison_lhs?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#83 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#93 def simple_comparison_rhs?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#75 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#85 def simple_double_comparison?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#151 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#161 def allow_method_comparison?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#126 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#136 def comparison?(node); end + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#165 + def comparisons_threshold; end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#118 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#128 def nested_comparison?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#87 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#97 def nested_variable_comparison?(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#146 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#156 def reset_comparison; end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#130 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#140 def root_of_or_node(or_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#140 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#150 def switch_comparison?(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#114 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#124 def variable_name(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#93 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#103 def variables_in_node(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#101 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#111 def variables_in_simple_node(node); end end -# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#46 +# source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#55 RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String) # Checks whether some constant value isn't a @@ -40290,14 +41549,14 @@ RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String) # # shareable_constant_value: literal # CONST = [1, 2, 3] # -# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#83 +# source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#87 class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::Style::MutableConstant::ShareableConstantValue include ::RuboCop::Cop::FrozenStringLiteral include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet/0.7.0/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#15 + # source://rubocop-sorbet/0.7.7/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 def on_assignment(value); end # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#127 @@ -40315,7 +41574,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#217 def splat_value(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet/0.7.0/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#10 + # source://rubocop-sorbet/0.7.7/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 def t_let(param0 = T.unsafe(nil)); end private @@ -40854,16 +42113,13 @@ class RuboCop::Cop::Style::NestedTernaryOperator < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#48 + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#40 def autocorrect(corrector, if_node); end - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#41 - def if_node(node); end - - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#55 + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#47 def remove_parentheses(source); end - # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#61 + # source://rubocop//lib/rubocop/cop/style/nested_ternary_operator.rb#53 def replace_loc_and_whitespace(corrector, range, replacement); end end @@ -41851,8 +43107,8 @@ end RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String) # Checks for redundant dot before operator method call. -# The target operator methods are `|`, `^`, `&`, `<=>`, `==`, `===`, `=~`, `>`, `>=`, `<`, -# `<=`, `<<`, `>>`, `+`, `-`, `*`, `/`, `%`, `**`, `~`, `!`, `!=`, and `!~`. +# The target operator methods are `|`, `^`, `&`, ``<=>``, `==`, `===`, `=~`, `>`, `>=`, `<`, +# ``<=``, `<<`, `>>`, `+`, `-`, `*`, `/`, `%`, `**`, `~`, `!`, `!=`, and `!~`. # # @example # @@ -41868,24 +43124,24 @@ RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::OperatorMethodCall < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#26 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#27 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#48 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#53 def anonymous_forwarding?(argument); end # Checks for an acceptable case of `foo.+(bar).baz`. # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#42 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#47 def method_call_with_parenthesized_arg?(argument); end - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#55 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#60 def wrap_in_parentheses_if_chained(corrector, node); end end @@ -42102,7 +43358,7 @@ class RuboCop::Cop::Style::ParallelAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::RescueNode extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#115 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#124 def implicit_self_getter?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#31 @@ -42114,55 +43370,55 @@ class RuboCop::Cop::Style::ParallelAssignment < ::RuboCop::Cop::Base # This makes the sorting algorithm work for expressions such as # `self.a, self.b = b, a`. # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#108 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#117 def add_self_to_getters(right_elements); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#60 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#64 def allowed_lhs?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#54 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#58 def allowed_masign?(lhs_elements, rhs_elements); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#68 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#72 def allowed_rhs?(node); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#80 - def assignment_corrector(node, order); end + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#84 + def assignment_corrector(node, rhs, order); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#44 - def autocorrect(corrector, node); end + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#49 + def autocorrect(corrector, node, lhs, rhs); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#91 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#100 def find_valid_order(left_elements, right_elements); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#174 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#183 def modifier_statement?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#76 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#80 def return_of_method_call?(node); end end # Helper class necessitated by silly design of TSort prior to Ruby 2.1 # Newer versions have a better API, but that doesn't help us # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#119 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#128 class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter include ::TSort extend ::RuboCop::AST::NodePattern::Macros # @return [AssignmentSorter] a new instance of AssignmentSorter # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#132 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#141 def initialize(assignments); end # `lhs` is an assignment method call like `obj.attr=` or `ary[idx]=`. @@ -42170,71 +43426,81 @@ class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#161 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#170 def accesses?(rhs, lhs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#154 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#163 def dependency?(lhs, rhs); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#130 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#139 def matching_calls(param0, param1, param2); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#140 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#149 def tsort_each_child(assignment); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#136 - def tsort_each_node(&block); end + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#145 + def tsort_each_node(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#127 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#136 def uses_var?(param0, param1); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#124 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#133 def var_name(param0 = T.unsafe(nil)); end end # An internal class for correcting parallel assignment # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#181 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#190 class RuboCop::Cop::Style::ParallelAssignment::GenericCorrector include ::RuboCop::Cop::Alignment # @return [GenericCorrector] a new instance of GenericCorrector # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#186 - def initialize(node, config, new_elements); end + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#195 + def initialize(node, rhs, modifier, config, new_elements); end # Returns the value of attribute config. # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#184 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 def config; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#192 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#203 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#196 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#207 def correction_range; end # Returns the value of attribute node. # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#184 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 def node; end + # Returns the value of attribute rescue_result. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 + def rescue_result; end + + # Returns the value of attribute rhs. + # + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#193 + def rhs; end + protected - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#202 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#213 def assignment; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#222 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#233 def cop_config; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#218 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#229 def extract_sources(node); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#208 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#219 def source(node); end end @@ -42244,37 +43510,37 @@ RuboCop::Cop::Style::ParallelAssignment::MSG = T.let(T.unsafe(nil), String) # An internal class for correcting parallel assignment # guarded by if, unless, while, or until # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#267 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#275 class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#268 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#276 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#277 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#285 def correction_range; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#283 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#291 def modifier_range(node); end end # An internal class for correcting parallel assignment # protected by rescue # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#229 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#240 class RuboCop::Cop::Style::ParallelAssignment::RescueCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#230 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#241 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#244 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#252 def correction_range; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#255 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#263 def begin_correction(rescue_result); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#250 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#258 def def_correction(rescue_result); end end @@ -42347,20 +43613,20 @@ class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#122 + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#130 def allow_multiline_conditions?; end - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#110 + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#118 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#103 + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#111 def modifier_op?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#116 + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#124 def parens_allowed?(node); end # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#80 @@ -42368,7 +43634,12 @@ class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#95 + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#96 + def require_parentheses?(node, condition_body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#103 def semicolon_separated_expressions?(first_exp, rest_exps); end end @@ -42933,6 +44204,8 @@ RuboCop::Cop::Style::RandomWithOffset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A # array.join('') # [1, 2, 3].join("") # array.sum(0) +# exit(true) +# exit!(false) # string.split(" ") # "first\nsecond".split(" ") # string.chomp("\n") @@ -42943,37 +44216,86 @@ RuboCop::Cop::Style::RandomWithOffset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A # array.join # [1, 2, 3].join # array.sum +# exit +# exit! # string.split # "first second".split # string.chomp # string.chomp! # A.foo # -# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#53 +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#57 class RuboCop::Cop::Style::RedundantArgument < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#59 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#64 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#64 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#88 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#94 def argument_range(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#81 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#87 def redundant_arg_for_method(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#74 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#80 def redundant_argument?(node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#57 +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#61 RuboCop::Cop::Style::RedundantArgument::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#62 +RuboCop::Cop::Style::RedundantArgument::NO_RECEIVER_METHODS = T.let(T.unsafe(nil), Array) + +# Checks for the instantiation of array using redundant `Array` constructor. +# Autocorrect replaces to array literal which is the simplest and fastest. +# +# @example +# +# # bad +# Array.new([]) +# Array[] +# Array([]) +# Array.new(['foo', 'foo', 'foo']) +# Array['foo', 'foo', 'foo'] +# Array(['foo', 'foo', 'foo']) +# +# # good +# [] +# ['foo', 'foo', 'foo'] +# Array.new(3, 'foo') +# Array.new(3) { 'foo' } +# +# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#25 +class RuboCop::Cop::Style::RedundantArrayConstructor < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#47 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#33 + def redundant_array_constructor(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#69 + def register_offense(range, node, replacement); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#28 +RuboCop::Cop::Style::RedundantArrayConstructor::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_array_constructor.rb#30 +RuboCop::Cop::Style::RedundantArrayConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for redundant assignment before returning. # # @example @@ -43137,50 +44459,53 @@ class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#169 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#177 def begin_block_has_multiline_statements?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#161 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#169 def condition_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#181 def contain_rescue_or_ensure?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#154 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#162 def correct_modifier_form_after_multiline_begin_block(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#165 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173 def empty_begin?(node); end # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#110 def register_offense(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#139 + def remove_begin(corrector, offense_range, node); end + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#127 def replace_begin_with_statement(corrector, offense_range, node); end # Restore comments that occur between "begin" and "first_child". # These comments will be moved to above the assignment line. # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#141 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#149 def restore_removed_comments(corrector, offense_range, node, first_child); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#148 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#156 def use_modifier_form_after_multiline_begin_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#186 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#194 def valid_begin_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#179 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#187 def valid_context_using_only_begin?(node); end end @@ -43413,13 +44738,8 @@ class RuboCop::Cop::Style::RedundantConditional < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#86 - def indented_else_node(expression, node); end - - # @return [Boolean] - # # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#78 - def invert_expression?(node); end + def indented_else_node(expression, node); end # source://rubocop//lib/rubocop/cop/style/redundant_conditional.rb#48 def message(node); end @@ -43511,6 +44831,31 @@ end # source://rubocop//lib/rubocop/cop/style/redundant_constant_base.rb#46 RuboCop::Cop::Style::RedundantConstantBase::MSG = T.let(T.unsafe(nil), String) +# Checks for uses a redundant current directory in path. +# +# @example +# +# # bad +# require_relative './path/to/feature' +# +# # good +# require_relative 'path/to/feature' +# +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#16 +class RuboCop::Cop::Style::RedundantCurrentDirectoryInPath < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#23 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#21 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::CURRENT_DIRECTORY_PATH = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#20 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::MSG = T.let(T.unsafe(nil), String) + # Checks for redundant uses of double splat hash braces. # # @example @@ -43521,23 +44866,63 @@ RuboCop::Cop::Style::RedundantConstantBase::MSG = T.let(T.unsafe(nil), String) # # good # do_something(foo: bar, baz: qux) # -# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#16 +# # bad +# do_something(**{foo: bar, baz: qux}.merge(options)) +# +# # good +# do_something(foo: bar, baz: qux, **options) +# +# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#22 class RuboCop::Cop::Style::RedundantDoubleSplatHashBraces < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#21 + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#29 def on_hash(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#39 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#45 + def allowed_double_splat_receiver?(kwsplat); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#55 + def autocorrect(corrector, node, kwsplat); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#89 + def autocorrect_merge_methods(corrector, merge_methods, kwsplat); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#85 def closing_brace(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#35 + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#111 + def convert_to_new_arguments(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#107 + def extract_send_methods(kwsplat); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#123 + def mergeable?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#81 def opening_brace(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#100 + def range_of_merge_methods(merge_methods); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#66 + def root_receiver(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#75 + def select_merge_method_nodes(kwsplat); end end -# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#19 +# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#26 +RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MERGE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#25 RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MSG = T.let(T.unsafe(nil), String) # Checks for redundant `each`. @@ -43568,21 +44953,24 @@ RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MSG = T.let(T.unsafe(nil), class RuboCop::Cop::Style::RedundantEach < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#43 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#43 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#93 + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#96 def message(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#85 + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#86 def range(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#63 + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#64 def redundant_each_method(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#104 + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#107 def remove_redundant_each(corrector, range, redundant_node); end end @@ -43600,55 +44988,72 @@ RuboCop::Cop::Style::RedundantEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # Checks for RuntimeError as the argument of raise/fail. # -# It checks for code like this: -# # @example -# # Bad +# # bad # raise RuntimeError, 'message' -# -# # Bad # raise RuntimeError.new('message') # -# # Good +# # good # raise 'message' # -# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#19 +# # bad - message is not a string +# raise RuntimeError, Object.new +# raise RuntimeError.new(Object.new) +# +# # good +# raise Object.new.to_s +# +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#23 class RuboCop::Cop::Style::RedundantException < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#59 + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#79 def compact?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#54 + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#74 def exploded?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#45 + # Switch `raise RuntimeError, 'message'` to `raise 'message'`, and + # `raise RuntimeError.new('message')` to `raise 'message'`. + # + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#33 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#57 def fix_compact(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#33 + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#39 def fix_exploded(node); end - # Switch `raise RuntimeError, 'message'` to `raise 'message'`, and - # `raise RuntimeError.new('message')` to `raise 'message'`. + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#65 + def replaced_compact(message); end + + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#47 + def replaced_exploded(node, command, message); end + + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#29 - def on_send(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#53 + def string_message?(message); end end -# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#22 +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#26 RuboCop::Cop::Style::RedundantException::MSG_1 = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#23 +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#27 RuboCop::Cop::Style::RedundantException::MSG_2 = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#25 +# source://rubocop//lib/rubocop/cop/style/redundant_exception.rb#29 RuboCop::Cop::Style::RedundantException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Identifies places where `fetch(key) { value }` -# can be replaced by `fetch(key, value)`. +# Identifies places where `fetch(key) { value }` can be replaced by `fetch(key, value)`. # -# In such cases `fetch(key, value)` method is faster -# than `fetch(key) { value }`. +# In such cases `fetch(key, value)` method is faster than `fetch(key) { value }`. +# +# NOTE: The block string `'value'` in `hash.fetch(:key) { 'value' }` is detected +# but not when disabled. # # @example SafeForConstants: false (default) # # bad @@ -43671,59 +45076,59 @@ RuboCop::Cop::Style::RedundantException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # # good # ENV.fetch(:key, VALUE) # -# source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#38 +# source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#40 class RuboCop::Cop::Style::RedundantFetchBlock < ::RuboCop::Cop::Base include ::RuboCop::Cop::FrozenStringLiteral include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#53 + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#55 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#87 + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#89 def rails_cache?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#46 + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#48 def redundant_fetch_block_candidate?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#72 + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#74 def basic_literal?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#102 + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#104 def build_bad_method(send, body); end - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#95 + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#97 def build_good_method(send, body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#109 + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#111 def check_for_constant?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#113 + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#115 def check_for_string?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#76 + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#78 def const_type?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#91 + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#93 def fetch_range(send, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#80 + # source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#82 def should_not_check?(send, body); end end -# source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#43 +# source://rubocop//lib/rubocop/cop/style/redundant_fetch_block.rb#45 RuboCop::Cop::Style::RedundantFetchBlock::MSG = T.let(T.unsafe(nil), String) # Checks for the presence of superfluous `.rb` extension in @@ -43770,6 +45175,82 @@ RuboCop::Cop::Style::RedundantFileExtensionInRequire::MSG = T.let(T.unsafe(nil), # source://rubocop//lib/rubocop/cop/style/redundant_file_extension_in_require.rb#32 RuboCop::Cop::Style::RedundantFileExtensionInRequire::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Identifies usages of `any?`, `empty?` or `none?` predicate methods +# chained to `select`/`filter`/`find_all` and change them to use predicate method instead. +# +# @example +# # bad +# arr.select { |x| x > 1 }.any? +# +# # good +# arr.any? { |x| x > 1 } +# +# # bad +# arr.select { |x| x > 1 }.empty? +# arr.select { |x| x > 1 }.none? +# +# # good +# arr.none? { |x| x > 1 } +# +# # good +# relation.select(:name).any? +# arr.select { |x| x > 1 }.any?(&:odd?) +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # good +# arr.select { |x| x > 1 }.many? +# +# # good +# arr.select { |x| x > 1 }.present? +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # bad +# arr.select { |x| x > 1 }.many? +# +# # good +# arr.many? { |x| x > 1 } +# +# # bad +# arr.select { |x| x > 1 }.present? +# +# # good +# arr.any? { |x| x > 1 } +# +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#53 +class RuboCop::Cop::Style::RedundantFilterChain < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#81 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#81 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#62 + def select_predicate?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#108 + def offense_range(select_node, predicate_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#112 + def predicate_range(predicate_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#94 + def register_offense(select_node, predicate_node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#56 +RuboCop::Cop::Style::RedundantFilterChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#58 +RuboCop::Cop::Style::RedundantFilterChain::RAILS_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#71 +RuboCop::Cop::Style::RedundantFilterChain::REPLACEMENT_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#59 +RuboCop::Cop::Style::RedundantFilterChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Check for uses of `Object#freeze` on immutable objects. # # NOTE: Regexp and Range literals are frozen objects since Ruby 3.0. @@ -44130,50 +45611,91 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base include ::RuboCop::Cop::MatchRange extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#73 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#78 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#109 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#175 + def argument_is_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#143 def argument_newline?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#94 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#101 def ends_with_backslash_without_comment?(source_line); end - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#116 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#155 def find_node_for_line(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#102 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#131 + def inside_string_literal?(range, token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#109 + def inside_string_literal_or_method_with_argument?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#117 + def leading_dot_method_chain_with_blank_line?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#182 + def method_call_with_arguments?(node); end + + # A method call without parentheses such as the following cannot remove `\`: + # + # do_something \ + # argument + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#139 + def method_with_argument?(current_token, next_token); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#123 def redundant_line_continuation?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#88 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#93 def require_line_continuation?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#122 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#161 def same_line?(node, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#136 - def starts_with_plus_or_minus?(source_line); end + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#186 + def start_with_arithmetic_operator?(source_line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#98 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#105 def string_concatenation?(source_line); end end +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#72 +RuboCop::Cop::Style::RedundantLineContinuation::ALLOWED_STRING_TOKENS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#73 +RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#71 RuboCop::Cop::Style::RedundantLineContinuation::MSG = T.let(T.unsafe(nil), String) @@ -44192,41 +45714,43 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base include ::RuboCop::Cop::Parentheses extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#33 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#32 def allowed_pin_operator?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#36 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#35 def arg_in_call_with_block?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#220 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#269 def first_send_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#225 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#274 def first_super_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#230 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#279 def first_yield_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#138 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#175 def interpolation?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#27 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#26 def method_node_and_args(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#38 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#37 def on_begin(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#24 - def range_end?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#30 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#29 def rescue?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#21 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#23 def square_brackets?(param0 = T.unsafe(nil)); end private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#177 + def allow_in_multiline_conditions?; end + # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#68 @@ -44234,7 +45758,7 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#61 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#60 def allowed_expression?(node); end # @return [Boolean] @@ -44254,51 +45778,54 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#234 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#283 def call_chain_starts_with_int?(begin_node, send_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#136 def check(begin_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#140 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#184 def check_send(begin_node, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#149 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#193 def check_unary(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#173 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#217 def disallowed_literal?(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#105 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#114 def empty_parentheses?(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#147 + def find_offense_message(begin_node, node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#110 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#119 def first_arg_begins_with_hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#215 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#258 def first_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#54 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#53 def ignore_syntax?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#169 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#213 def keyword_ancestor?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#188 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#232 def keyword_with_redundant_parentheses?(node); end # @return [Boolean] @@ -44308,35 +45835,38 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#201 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#245 def method_call_with_redundant_parentheses?(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#128 + def method_chain_begins_with_hash_literal(node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#117 - def method_chain_begins_with_hash_literal?(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#107 + def multiline_control_flow_statements?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#159 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#203 def offense(node, msg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#211 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#254 def only_begin_arg?(args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#46 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#45 def parens_allowed?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#177 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#221 def raised_to_power_negative_numeric?(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#165 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#209 def suspect_unary?(node); end # @return [Boolean] @@ -44345,6 +45875,9 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base def ternary_parentheses_required?; end end +# source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#20 +RuboCop::Cop::Style::RedundantParentheses::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) + # Checks for usage of the %q/%Q syntax when '' or "" would do. # # @example @@ -44435,6 +45968,72 @@ RuboCop::Cop::Style::RedundantPercentQ::SINGLE_QUOTE = T.let(T.unsafe(nil), Stri # source://rubocop//lib/rubocop/cop/style/redundant_percent_q.rb#31 RuboCop::Cop::Style::RedundantPercentQ::STRING_INTERPOLATION_REGEXP = T.let(T.unsafe(nil), Regexp) +# Identifies places where argument can be replaced from +# a deterministic regexp to a string. +# +# @example +# # bad +# 'foo'.byteindex(/f/) +# 'foo'.byterindex(/f/) +# 'foo'.gsub(/f/, 'x') +# 'foo'.gsub!(/f/, 'x') +# 'foo'.partition(/f/) +# 'foo'.rpartition(/f/) +# 'foo'.scan(/f/) +# 'foo'.split(/f/) +# 'foo'.start_with?(/f/) +# 'foo'.sub(/f/, 'x') +# 'foo'.sub!(/f/, 'x') +# +# # good +# 'foo'.byteindex('f') +# 'foo'.byterindex('f') +# 'foo'.gsub('f', 'x') +# 'foo'.gsub!('f', 'x') +# 'foo'.partition('f') +# 'foo'.rpartition('f') +# 'foo'.scan('f') +# 'foo'.split('f') +# 'foo'.start_with?('f') +# 'foo'.sub('f', 'x') +# 'foo'.sub!('f', 'x') +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#35 +class RuboCop::Cop::Style::RedundantRegexpArgument < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#64 + def determinist_regexp?(regexp_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#68 + def preferred_argument(regexp_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#81 + def replacement(regexp_node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#42 +RuboCop::Cop::Style::RedundantRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#38 +RuboCop::Cop::Style::RedundantRegexpArgument::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 +RuboCop::Cop::Style::RedundantRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 +RuboCop::Cop::Style::RedundantRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) + # Checks for unnecessary single-element Regexp character classes. # # @example @@ -44515,6 +46114,37 @@ RuboCop::Cop::Style::RedundantRegexpCharacterClass::MSG_REDUNDANT_CHARACTER_CLAS # source://rubocop//lib/rubocop/cop/style/redundant_regexp_character_class.rb#33 RuboCop::Cop::Style::RedundantRegexpCharacterClass::REQUIRES_ESCAPE_OUTSIDE_CHAR_CLASS_CHARS = T.let(T.unsafe(nil), Array) +# Checks for the instantiation of regexp using redundant `Regexp.new` or `Regexp.compile`. +# Autocorrect replaces to regexp literal which is the simplest and fastest. +# +# @example +# +# # bad +# Regexp.new(/regexp/) +# Regexp.compile(/regexp/) +# +# # good +# /regexp/ +# Regexp.new('regexp') +# Regexp.compile('regexp') +# +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#20 +class RuboCop::Cop::Style::RedundantRegexpConstructor < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#33 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#27 + def redundant_regexp_constructor(param0 = T.unsafe(nil)); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#23 +RuboCop::Cop::Style::RedundantRegexpConstructor::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#24 +RuboCop::Cop::Style::RedundantRegexpConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for redundant escapes inside Regexp literals. # # @example @@ -44557,26 +46187,26 @@ class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#59 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#60 def allowed_escape?(node, char, index, within_character_class); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#75 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#76 def char_class_begins_or_ends_with_escaped_hyphen?(node, index); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#91 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#92 def delimiter?(node, char); end # Please remove this `else` branch when support for regexp_parser 1.8 will be dropped. # It's for compatibility with regexp_parser 1.8 and will never be maintained. # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#98 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#99 def each_escape(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#126 def escape_range_at_index(node, index); end end @@ -44611,13 +46241,18 @@ RuboCop::Cop::Style::RedundantRegexpEscape::MSG_REDUNDANT_ESCAPE = T.let(T.unsaf # return something # end # -# # good +# # bad # def test # return something if something_else # end # # # good # def test +# something if something_else +# end +# +# # good +# def test # if x # elsif y # else @@ -44634,79 +46269,79 @@ RuboCop::Cop::Style::RedundantRegexpEscape::MSG_REDUNDANT_ESCAPE = T.let(T.unsaf # return x, y # end # -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#50 +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#55 class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#64 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#69 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#64 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#69 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#58 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#63 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#99 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#104 def add_braces(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#94 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#99 def add_brackets(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#164 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#169 def allow_multiple_return_values?; end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#159 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#164 def check_begin_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#105 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#110 def check_branch(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#133 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#138 def check_case_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#154 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#159 def check_ensure_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#138 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#143 def check_if_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#150 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#155 def check_resbody_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#145 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#150 def check_rescue_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#121 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#126 def check_return_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#75 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#80 def correct_with_arguments(return_node, corrector); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#71 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#76 def correct_without_arguments(return_node, corrector); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#90 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#95 def hash_without_braces?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#168 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#173 def message(node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#54 +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#59 RuboCop::Cop::Style::RedundantReturn::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#55 +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#60 RuboCop::Cop::Style::RedundantReturn::MULTI_RETURN_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#56 +# source://rubocop//lib/rubocop/cop/style/redundant_return.rb#61 RuboCop::Cop::Style::RedundantReturn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for redundant uses of `self`. @@ -44723,7 +46358,8 @@ RuboCop::Cop::Style::RedundantReturn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # protected scope, you cannot send private messages this way. # # Note we allow uses of `self` with operators because it would be awkward -# otherwise. +# otherwise. Also allows the use of `self.it` without arguments in blocks, +# as in `0.times { self.it }`, following `Lint/ItWithoutArgumentsInBlock` cop. # # @example # @@ -44748,114 +46384,125 @@ RuboCop::Cop::Style::RedundantReturn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # end # end # -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#44 +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#45 class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector # @return [RedundantSelf] a new instance of RedundantSelf # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#59 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#60 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end # Assignment of self.x # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#67 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#68 def on_and_asgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#85 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#86 def on_args(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#119 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#120 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#89 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#90 def on_blockarg(node); end # Using self.x to distinguish from local variable x # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#80 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#81 def on_def(node); end # Using self.x to distinguish from local variable x # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#80 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#81 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 def on_if(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#103 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#104 def on_in_pattern(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#98 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#99 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#93 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#94 def on_masgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#119 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#120 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#73 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#74 def on_op_asgn(node); end # Assignment of self.x # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#67 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#68 def on_or_asgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#107 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#108 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 def on_until(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 def on_while(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#181 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#196 def add_lhs_to_local_variables_scopes(rhs, lhs); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#189 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#204 def add_masgn_lhs_variables(rhs, lhs); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#195 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#210 def add_match_var_scopes(in_pattern_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#143 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#144 def add_scope(node, local_variables = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#175 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#190 def allow_self(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#149 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#150 def allowed_send_node?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#166 + # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: + # + # $ ruby -e '0.times { begin; it; end }' + # -e:1: warning: `it` calls without arguments will refer to the first block param in + # Ruby 3.4; use it() or self.it + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#165 + def it_method_in_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#181 def on_argument(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#158 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#173 def regular_method_call?(node); end class << self - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#55 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#56 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#48 +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#49 RuboCop::Cop::Style::RedundantSelf::KERNEL_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#49 +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#50 RuboCop::Cop::Style::RedundantSelf::KEYWORDS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#47 +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#48 RuboCop::Cop::Style::RedundantSelf::MSG = T.let(T.unsafe(nil), String) # Checks for places where redundant assignments are made for in place @@ -44971,12 +46618,12 @@ class RuboCop::Cop::Style::RedundantSelfAssignmentBranch < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#64 def multiple_statements?(branch); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#72 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#74 def register_offense(if_node, offense_branch, opposite_branch, keyword); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#68 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment_branch.rb#70 def self_assign?(variable, branch); end # @return [Boolean] @@ -45039,6 +46686,9 @@ class RuboCop::Cop::Style::RedundantSort < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#104 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#104 def on_send(node); end @@ -45050,45 +46700,45 @@ class RuboCop::Cop::Style::RedundantSort < ::RuboCop::Cop::Base # This gets the start of the accessor whether it has a dot # (e.g. `.first`) or doesn't (e.g. `[0]`) # - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#192 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#193 def accessor_start(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#182 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#183 def arg_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#186 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#187 def arg_value(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#147 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#148 def autocorrect(corrector, node, sort_node, sorter, accessor); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#165 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#166 def base(accessor, arg); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#114 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#115 def find_redundant_sort(*nodes); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#135 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#136 def message(node, sorter, accessor); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#131 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#132 def offense_range(sort_node, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#124 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#125 def register_offense(node, sort_node, sorter, accessor); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#156 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#157 def replace_with_logical_operator(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#173 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#174 def suffix(sorter); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#161 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#162 def suggestion(sorter, accessor, arg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#200 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#201 def with_logical_operator?(node); end end @@ -45205,7 +46855,7 @@ class RuboCop::Cop::Style::RedundantStringEscape < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#169 + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#171 def disabling_interpolation?(range); end # @return [Boolean] @@ -45225,7 +46875,7 @@ class RuboCop::Cop::Style::RedundantStringEscape < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#165 + # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#167 def literal_in_interpolated_or_multiline_string?(node); end # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#59 @@ -45263,7 +46913,16 @@ end # source://rubocop//lib/rubocop/cop/style/redundant_string_escape.rb#41 RuboCop::Cop::Style::RedundantStringEscape::MSG = T.let(T.unsafe(nil), String) -# Enforces using // or %r around regular expressions. +# Enforces using `//` or `%r` around regular expressions. +# +# NOTE: The following `%r` cases using a regexp starts with a blank or `=` +# as a method argument allowed to prevent syntax errors. +# +# [source,ruby] +# ---- +# do_something %r{ regexp} # `do_something / regexp/` is an invalid syntax. +# do_something %r{=regexp} # `do_something /=regexp/` is an invalid syntax. +# ---- # # @example EnforcedStyle: slashes (default) # # bad @@ -45338,94 +46997,94 @@ RuboCop::Cop::Style::RedundantStringEscape::MSG = T.let(T.unsafe(nil), String) # # good # x =~ /home\// # -# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#84 +# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#93 class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#92 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#101 def on_regexp(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#135 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#144 def allow_inner_slashes?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#123 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#132 def allowed_mixed_percent_r?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#113 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#122 def allowed_mixed_slash?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#152 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#161 def allowed_omit_parentheses_with_percent_r_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#117 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#126 def allowed_percent_r_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#109 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#118 def allowed_slash_literal?(node); end - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#212 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#221 def calculate_replacement(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#127 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#136 def contains_disallowed_slash?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#131 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#140 def contains_slash?(node); end - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#161 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#170 def correct_delimiters(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#167 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#176 def correct_inner_slashes(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#200 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#209 def inner_slash_after_correction(node); end - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#196 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#205 def inner_slash_before_correction(node); end - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#204 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#213 def inner_slash_for(opening_delimiter); end - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#183 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#192 def inner_slash_indices(node); end - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#139 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#148 def node_body(node, include_begin_nodes: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#148 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#157 def preferred_delimiters; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#144 + # source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#153 def slash_literal?(node); end end -# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#90 +# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#99 RuboCop::Cop::Style::RegexpLiteral::MSG_USE_PERCENT_R = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#89 +# source://rubocop//lib/rubocop/cop/style/regexp_literal.rb#98 RuboCop::Cop::Style::RegexpLiteral::MSG_USE_SLASHES = T.let(T.unsafe(nil), String) # Sort `require` and `require_relative` in alphabetical order. @@ -45498,23 +47157,26 @@ class RuboCop::Cop::Style::RequireOrder < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/require_order.rb#104 + # source://rubocop//lib/rubocop/cop/style/require_order.rb#115 + def autocorrect(corrector, node, previous_older_sibling); end + + # source://rubocop//lib/rubocop/cop/style/require_order.rb#101 def find_previous_older_sibling(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/require_order.rb#127 + # source://rubocop//lib/rubocop/cop/style/require_order.rb#133 def in_same_section?(node1, node2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/require_order.rb#100 + # source://rubocop//lib/rubocop/cop/style/require_order.rb#97 def not_modifier_form?(node); end - # source://rubocop//lib/rubocop/cop/style/require_order.rb#117 + # source://rubocop//lib/rubocop/cop/style/require_order.rb#123 def search_node(node); end - # source://rubocop//lib/rubocop/cop/style/require_order.rb#121 + # source://rubocop//lib/rubocop/cop/style/require_order.rb#127 def sibling_node(node); end end @@ -45524,9 +47186,7 @@ RuboCop::Cop::Style::RequireOrder::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/require_order.rb#71 RuboCop::Cop::Style::RequireOrder::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Checks for uses of rescue in its modifier form. -# -# The cop to check `rescue` in its modifier form is added for following +# Checks for uses of `rescue` in its modifier form is added for following # reasons: # # * The syntax of modifier form `rescue` can be misleading because it @@ -45561,36 +47221,36 @@ RuboCop::Cop::Style::RequireOrder::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # handle_error # end # -# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#42 +# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#40 class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::RescueNode extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#54 + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#52 def on_resbody(node); end private - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#72 + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#70 def correct_rescue_block(corrector, node, parenthesized); end - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#88 + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#86 def indentation_and_offset(node, parenthesized); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#68 + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#66 def parenthesized?(node); end class << self - # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#50 + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#48 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#48 +# source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#46 RuboCop::Cop::Style::RescueModifier::MSG = T.let(T.unsafe(nil), String) # Checks for rescuing `StandardError`. There are two supported @@ -45691,9 +47351,13 @@ RuboCop::Cop::Style::RescueStandardError::MSG_EXPLICIT = T.let(T.unsafe(nil), St # source://rubocop//lib/rubocop/cop/style/rescue_standard_error.rb#79 RuboCop::Cop::Style::RescueStandardError::MSG_IMPLICIT = T.let(T.unsafe(nil), String) -# Enforces consistency between 'return nil' and 'return'. +# Enforces consistency between `return nil` and `return`. # -# Supported styles are: return, return_nil. +# This cop is disabled by default. Because there seems to be a perceived semantic difference +# between `return` and `return nil`. The former can be seen as just halting evaluation, +# while the latter might be used when the return value is of specific concern. +# +# Supported styles are `return` and `return_nil`. # # @example EnforcedStyle: return (default) # # bad @@ -45716,48 +47380,113 @@ RuboCop::Cop::Style::RescueStandardError::MSG_IMPLICIT = T.let(T.unsafe(nil), St # return nil if arg # end # -# source://rubocop//lib/rubocop/cop/style/return_nil.rb#31 +# source://rubocop//lib/rubocop/cop/style/return_nil.rb#35 class RuboCop::Cop::Style::ReturnNil < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#86 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#90 def chained_send?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#89 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#93 def define_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#44 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#48 def on_return(node); end - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#42 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#46 def return_nil_node?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#39 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#43 def return_node?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#76 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#80 def correct_style?(node); end - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#72 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#76 def message(_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/return_nil.rb#81 + # source://rubocop//lib/rubocop/cop/style/return_nil.rb#85 def scoped_node?(node); end end -# source://rubocop//lib/rubocop/cop/style/return_nil.rb#35 +# source://rubocop//lib/rubocop/cop/style/return_nil.rb#39 RuboCop::Cop::Style::ReturnNil::RETURN_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/return_nil.rb#36 +# source://rubocop//lib/rubocop/cop/style/return_nil.rb#40 RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) +# Checks if `return` or `return nil` is used in predicate method definitions. +# +# @example +# # bad +# def foo? +# return if condition +# +# do_something? +# end +# +# # bad +# def foo? +# return nil if condition +# +# do_something? +# end +# +# # good +# def foo? +# return false if condition +# +# do_something? +# end +# @example AllowedMethods: ['foo?'] +# # good +# def foo? +# return if condition +# +# do_something? +# end +# @example AllowedPatterns: [/foo/] +# # good +# def foo? +# return if condition +# +# do_something? +# end +# +# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#50 +class RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition < ::RuboCop::Cop::Base + include ::RuboCop::Cop::AllowedMethods + include ::RuboCop::Cop::AllowedPattern + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 + def on_def(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 + def on_defs(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#58 + def return_nil?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#79 + def nil_node_at_the_end_of_method_body(body); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#87 + def register_offense(offense_node, replacement); end +end + +# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#55 +RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition::MSG = T.let(T.unsafe(nil), String) + # Transforms usages of a method call safeguarded by a non `nil` # check for the variable whose method is being called to # safe navigation (`&.`). If there is a method chain, all of the methods @@ -45971,6 +47700,9 @@ RuboCop::Cop::Style::SafeNavigation::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::Sample < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/style/sample.rb#41 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/sample.rb#41 def on_send(node); end @@ -45979,36 +47711,36 @@ class RuboCop::Cop::Style::Sample < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/sample.rb#123 + # source://rubocop//lib/rubocop/cop/style/sample.rb#124 def correction(shuffle_arg, method, method_args); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#139 + # source://rubocop//lib/rubocop/cop/style/sample.rb#140 def extract_source(args); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#117 + # source://rubocop//lib/rubocop/cop/style/sample.rb#118 def message(shuffle_arg, method, method_args, range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sample.rb#58 + # source://rubocop//lib/rubocop/cop/style/sample.rb#59 def offensive?(method, method_args); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#95 + # source://rubocop//lib/rubocop/cop/style/sample.rb#96 def range_size(range_node); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#130 + # source://rubocop//lib/rubocop/cop/style/sample.rb#131 def sample_arg(method, method_args); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#69 + # source://rubocop//lib/rubocop/cop/style/sample.rb#70 def sample_size(method_args); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#78 + # source://rubocop//lib/rubocop/cop/style/sample.rb#79 def sample_size_for_one_arg(arg); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#88 + # source://rubocop//lib/rubocop/cop/style/sample.rb#89 def sample_size_for_two_args(first, second); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#111 + # source://rubocop//lib/rubocop/cop/style/sample.rb#112 def source_range(shuffle_node, node); end end @@ -46065,7 +47797,10 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#74 def env_const?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#87 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88 def on_send(node); end # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#56 @@ -46073,29 +47808,32 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#122 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#133 def extract_send_node(block_node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#135 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#146 def find_regexp(node, block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#146 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#157 def match_predicate_without_receiver?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#131 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#142 def opposite?(regexp_method_send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#102 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#107 def receiver_allowed?(node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#108 - def register_offense(node, block_node, regexp, opposite); end + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#121 + def register_offense(node, block_node, regexp, replacement); end + + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#113 + def replacement(regexp_method_send_node, node); end end # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#49 @@ -46209,38 +47947,53 @@ class RuboCop::Cop::Style::Semicolon < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/semicolon.rb#64 def check_for_line_terminator_or_opener; end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#73 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#70 def each_semicolon; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#102 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#106 def exist_semicolon_after_left_curly_brace?(tokens); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#98 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#110 + def exist_semicolon_after_left_lambda_curly_brace?(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#118 + def exist_semicolon_after_left_string_interpolation_brace?(tokens); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#102 def exist_semicolon_before_right_curly_brace?(tokens); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#126 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#114 + def exist_semicolon_before_right_string_interpolation_brace?(tokens); end + + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#142 def expressions_per_line(exprs); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#140 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#156 def find_range_node(token_before_semicolon); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#132 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#148 def find_semicolon_positions(line); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#146 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#162 def range_nodes; end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#106 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#122 def register_semicolon(line, column, after_expression, token_before_semicolon = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#86 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#84 def semicolon_position(tokens); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#82 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#79 def tokens_for_lines; end class << self @@ -46435,8 +48188,11 @@ RuboCop::Cop::Style::SignalException::RAISE_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#114 RuboCop::Cop::Style::SignalException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Sometimes using dig method ends up with just a single -# argument. In such cases, dig should be replaced with []. +# Sometimes using `dig` method ends up with just a single +# argument. In such cases, dig should be replaced with `[]`. +# +# Since replacing `hash&.dig(:key)` with `hash[:key]` could potentially lead to error, +# calls to the `dig` method using safe navigation will be ignored. # # @example # # bad @@ -46455,21 +48211,24 @@ RuboCop::Cop::Style::SignalException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # keys = %i[key1 key2] # { key1: { key2: 'value' } }.dig(*keys) # -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#31 +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#34 class RuboCop::Cop::Style::SingleArgumentDig < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#42 + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#46 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#38 + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#42 def single_argument_dig?(param0 = T.unsafe(nil)); end end -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#34 +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#39 +RuboCop::Cop::Style::SingleArgumentDig::IGNORED_ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#37 RuboCop::Cop::Style::SingleArgumentDig::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#35 +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#38 RuboCop::Cop::Style::SingleArgumentDig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks whether the block parameters of a single-line @@ -46544,6 +48303,50 @@ end # source://rubocop//lib/rubocop/cop/style/single_line_block_params.rb#34 RuboCop::Cop::Style::SingleLineBlockParams::MSG = T.let(T.unsafe(nil), String) +# Checks for single-line `do`...`end` block. +# +# In practice a single line `do`...`end` is autocorrected when `EnforcedStyle: semantic` +# in `Style/BlockDelimiters`. The autocorrection maintains the `do` ... `end` syntax to +# preserve semantics and does not change it to `{`...`}` block. +# +# @example +# +# # bad +# foo do |arg| bar(arg) end +# +# # good +# foo do |arg| +# bar(arg) +# end +# +# # bad +# ->(arg) do bar(arg) end +# +# # good +# ->(arg) { bar(arg) } +# +# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#28 +class RuboCop::Cop::Style::SingleLineDoEndBlock < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#34 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#34 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#55 + def do_line(node); end + + # source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#63 + def x(corrector, node); end +end + +# source://rubocop//lib/rubocop/cop/style/single_line_do_end_block.rb#31 +RuboCop::Cop::Style::SingleLineDoEndBlock::MSG = T.let(T.unsafe(nil), String) + # Checks for single-line method definitions that contain a body. # It will accept single-line methods with no body. # @@ -46631,32 +48434,69 @@ RuboCop::Cop::Style::SingleLineMethods::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#39 RuboCop::Cop::Style::SingleLineMethods::NOT_SUPPORTED_ENDLESS_METHOD_BODY_TYPES = T.let(T.unsafe(nil), Array) -# Checks that arrays are sliced with endless ranges instead of -# `ary[start..-1]` on Ruby 2.6+. +# Checks that arrays are not sliced with the redundant `ary[0..-1]`, replacing it with `ary`, +# and ensures arrays are sliced with endless ranges instead of `ary[start..-1]` on Ruby 2.6+, +# and with beginless ranges instead of `ary[nil..end]` on Ruby 2.7+. # # @example # # bad -# items[1..-1] +# items[0..-1] +# items[0..nil] +# items[0...nil] +# +# # good +# items +# +# # bad +# items[1..-1] # Ruby 2.6+ +# items[1..nil] # Ruby 2.6+ +# +# # good +# items[1..] # Ruby 2.6+ +# +# # bad +# items[nil..42] # Ruby 2.7+ # # # good -# items[1..] +# items[..42] # Ruby 2.7+ +# items[0..42] # Ruby 2.7+ # -# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#28 +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#46 class RuboCop::Cop::Style::SlicingWithRange < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#40 + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#77 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#38 + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#73 + def range_from_zero?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#57 + def range_from_zero_till_minus_one?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#65 def range_till_minus_one?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#111 + def beginless(range_node); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#107 + def endless(range_node); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#93 + def offense_message_with_removal_range(range_node, selector); end end -# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#34 +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#52 RuboCop::Cop::Style::SlicingWithRange::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#35 +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#53 +RuboCop::Cop::Style::SlicingWithRange::MSG_USELESS_RANGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#54 RuboCop::Cop::Style::SlicingWithRange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # If the branch of a conditional consists solely of a conditional node, @@ -46713,10 +48553,10 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#238 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#242 def allow_modifier?; end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#223 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#227 def arguments_range(node); end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81 @@ -46746,13 +48586,13 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#130 def correct_from_unless_to_if(corrector, node, is_modify_form: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#182 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#184 def correct_outer_condition(corrector, condition); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#193 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#197 def insert_bang(corrector, node, is_modify_form); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#206 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#210 def insert_bang_for_and(corrector, node); end # @return [Boolean] @@ -46762,15 +48602,15 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#242 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#246 def outer_condition_modify_form?(node, if_branch); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#234 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#238 def replace_condition(condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#218 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#222 def require_parentheses?(condition); end # @return [Boolean] @@ -46783,7 +48623,7 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#229 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 def wrap_condition?(node); end class << self @@ -46795,7 +48635,7 @@ end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#53 RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) -# This cop looks for uses of Perl-style global variables. +# Looks for uses of Perl-style global variables. # Correcting to global variables in the 'English' library # will add a require statement to the top of the file if # enabled by RequireEnglish config. @@ -46870,88 +48710,88 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) # puts $* # @example EnforcedStyle: use_builtin_english_names # -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#88 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#87 class RuboCop::Cop::Style::SpecialGlobalVars < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::RequireLibrary extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#177 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#176 def autocorrect(corrector, node, global_var); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#169 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#168 def message(global_var); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#153 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#152 def on_gvar(node); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#148 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#147 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#248 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#247 def add_require_english?; end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#242 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#241 def english_name_replacement(preferred_name, node); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#191 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#190 def format_english_message(global_var); end # For now, we assume that lists are 2 items or less. Easy grammar! # - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#213 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#212 def format_list(items); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#199 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#198 def format_message(english, regular, global); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#236 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#235 def matching_styles(global); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#228 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#227 def preferred_names(global); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#217 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#216 def replacement(node, global_var); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#252 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#251 def should_require_english?(global_var); end end -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#129 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#128 RuboCop::Cop::Style::SpecialGlobalVars::BUILTIN_VARS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#101 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#100 RuboCop::Cop::Style::SpecialGlobalVars::ENGLISH_VARS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#146 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#145 RuboCop::Cop::Style::SpecialGlobalVars::LIBRARY_NAME = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#94 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#93 RuboCop::Cop::Style::SpecialGlobalVars::MSG_BOTH = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#97 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#96 RuboCop::Cop::Style::SpecialGlobalVars::MSG_ENGLISH = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#99 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#98 RuboCop::Cop::Style::SpecialGlobalVars::MSG_REGULAR = T.let(T.unsafe(nil), String) # Anything *not* in this set is provided by the English library. # -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#123 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#122 RuboCop::Cop::Style::SpecialGlobalVars::NON_ENGLISH_VARS = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#125 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#124 RuboCop::Cop::Style::SpecialGlobalVars::PERL_VARS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#140 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#139 RuboCop::Cop::Style::SpecialGlobalVars::STYLE_VARS_MAP = T.let(T.unsafe(nil), Hash) # Check for parentheses around stabby lambda arguments. @@ -47150,6 +48990,9 @@ class RuboCop::Cop::Style::StringChars < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/style/string_chars.rb#29 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/string_chars.rb#29 def on_send(node); end end @@ -47387,40 +49230,67 @@ end # source://rubocop//lib/rubocop/cop/style/string_literals.rb#35 RuboCop::Cop::Style::StringLiterals::MSG_INCONSISTENT = T.let(T.unsafe(nil), String) -# Checks that quotes inside the string interpolation +# Checks that quotes inside string, symbol, and regexp interpolations # match the configured preference. # # @example EnforcedStyle: single_quotes (default) # # bad -# result = "Tests #{success ? "PASS" : "FAIL"}" +# string = "Tests #{success ? "PASS" : "FAIL"}" +# symbol = :"Tests #{success ? "PASS" : "FAIL"}" +# heredoc = <<~TEXT +# Tests #{success ? "PASS" : "FAIL"} +# TEXT +# regexp = /Tests #{success ? "PASS" : "FAIL"}/ # # # good -# result = "Tests #{success ? 'PASS' : 'FAIL'}" +# string = "Tests #{success ? 'PASS' : 'FAIL'}" +# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" +# heredoc = <<~TEXT +# Tests #{success ? 'PASS' : 'FAIL'} +# TEXT +# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ # @example EnforcedStyle: double_quotes # # bad -# result = "Tests #{success ? 'PASS' : 'FAIL'}" +# string = "Tests #{success ? 'PASS' : 'FAIL'}" +# symbol = :"Tests #{success ? 'PASS' : 'FAIL'}" +# heredoc = <<~TEXT +# Tests #{success ? 'PASS' : 'FAIL'} +# TEXT +# regexp = /Tests #{success ? 'PASS' : 'FAIL'}/ # # # good -# result = "Tests #{success ? "PASS" : "FAIL"}" +# string = "Tests #{success ? "PASS" : "FAIL"}" +# symbol = :"Tests #{success ? "PASS" : "FAIL"}" +# heredoc = <<~TEXT +# Tests #{success ? "PASS" : "FAIL"} +# TEXT +# regexp = /Tests #{success ? "PASS" : "FAIL"}/ # -# source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#22 +# source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#42 class RuboCop::Cop::Style::StringLiteralsInInterpolation < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::StringLiteralsHelp include ::RuboCop::Cop::StringHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#28 + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#48 def autocorrect(corrector, node); end + # Cop classes that include the StringHelp module usually ignore regexp + # nodes. Not so for this cop, which is why we override the on_regexp + # definition with an empty one. + # + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#55 + def on_regexp(node); end + private - # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#34 + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#59 def message(_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#41 + # source://rubocop//lib/rubocop/cop/style/string_literals_in_interpolation.rb#66 def offense?(node); end end @@ -47470,7 +49340,10 @@ class RuboCop::Cop::Style::Strip < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/strip.rb#24 def lstrip_rstrip(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/strip.rb#29 + # source://rubocop//lib/rubocop/cop/style/strip.rb#31 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/strip.rb#31 def on_send(node); end end @@ -47520,6 +49393,29 @@ end # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#30 RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) +# Enforces the presence of parentheses in `super` containing arguments. +# +# `super` is a keyword and is provided as a distinct cop from those designed for method call. +# +# @example +# +# # bad +# super name, age +# +# # good +# super(name, age) +# +# source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#18 +class RuboCop::Cop::Style::SuperWithArgsParentheses < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#23 + def on_super(node); end +end + +# source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#21 +RuboCop::Cop::Style::SuperWithArgsParentheses::MSG = T.let(T.unsafe(nil), String) + # Enforces the use of shorthand-style swapping of 2 variables. # # @example @@ -47611,6 +49507,15 @@ RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), # # # bad # [:foo, :bar, :baz] +# +# # bad (contains spaces) +# %i[foo\ bar baz\ quux] +# +# # bad (contains [] with spaces) +# %i[foo \[ \]] +# +# # bad (contains () with spaces) +# %i(foo \( \)) # @example EnforcedStyle: brackets # # good # [:foo, :bar, :baz] @@ -47618,7 +49523,7 @@ RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), # # bad # %i[foo bar baz] # -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#31 +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#40 class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base include ::RuboCop::Cop::ArrayMinSize include ::RuboCop::Cop::ArraySyntax @@ -47627,48 +49532,62 @@ class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#48 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#66 def on_array(node); end private - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#67 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#96 def build_bracketed_array(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#90 - def symbol_without_quote?(string); end + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#78 + def complex_content?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#60 - def symbols_contain_spaces?(node); end + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#92 + def invalid_percent_array_contents?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#119 + def symbol_without_quote?(string); end - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#82 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#111 def to_symbol_literal(string); end class << self # Returns the value of attribute largest_brackets. # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#45 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 def largest_brackets; end # Sets the attribute largest_brackets # # @param value the value to set the attribute largest_brackets to. # - # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#45 + # source://rubocop//lib/rubocop/cop/style/symbol_array.rb#63 def largest_brackets=(_arg0); end end end -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#42 +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#51 RuboCop::Cop::Style::SymbolArray::ARRAY_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#41 +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#52 +RuboCop::Cop::Style::SymbolArray::DELIMITERS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#50 RuboCop::Cop::Style::SymbolArray::PERCENT_MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#57 +RuboCop::Cop::Style::SymbolArray::REDEFINABLE_OPERATORS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_array.rb#53 +RuboCop::Cop::Style::SymbolArray::SPECIAL_GVARS = T.let(T.unsafe(nil), Array) + # Checks symbol literal syntax. # # @example @@ -47737,7 +49656,7 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # # good # something.map(&:upcase) # -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#87 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#123 class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base include ::RuboCop::Cop::CommentsHelp include ::RuboCop::Cop::RangeHelp @@ -47747,117 +49666,117 @@ class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#136 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#172 def destructuring_block_argument?(argument_node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#116 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#116 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#98 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#134 def proc_node?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#104 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#140 def symbol_proc?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#101 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#137 def symbol_proc_receiver?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#204 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#240 def allow_comments?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#236 def allow_if_method_has_argument?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#151 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#187 def allowed_method_name?(name); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#164 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#176 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#212 def autocorrect_with_args(corrector, node, args, method_name); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#172 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#208 def autocorrect_without_args(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#190 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#226 def begin_pos_for_replacement(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#185 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#221 def block_range_with_space(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#155 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#191 def register_offense(node, method_name, block_method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#183 def unsafe_array_usage?(node); end # See: https://github.com/rubocop/rubocop/issues/10864 # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#143 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#179 def unsafe_hash_usage?(node); end class << self - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#111 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#94 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#130 RuboCop::Cop::Style::SymbolProc::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#95 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#131 RuboCop::Cop::Style::SymbolProc::SUPER_TYPES = T.let(T.unsafe(nil), Array) # Corrector to correct conditional assignment in ternary conditions. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#498 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#500 class RuboCop::Cop::Style::TernaryCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#503 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#505 def correct(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#507 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#509 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#521 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#523 def correction(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#534 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#536 def element_assignment?(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#538 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#540 def extract_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#551 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#553 def move_branch_inside_condition(corrector, branch, assignment); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#546 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#548 def remove_parentheses(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#525 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#527 def ternary(node); end end end @@ -48117,6 +50036,9 @@ class RuboCop::Cop::Style::TrailingBodyOnClass < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#25 def on_class(node); end + + # source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#25 + def on_sclass(node); end end # source://rubocop//lib/rubocop/cop/style/trailing_body_on_class.rb#23 @@ -48282,7 +50204,7 @@ class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base def on_send(node); end class << self - # source://rubocop-rspec/2.19.0/lib/rubocop-rspec.rb#61 + # source://rubocop-rspec/2.26.1/lib/rubocop-rspec.rb#60 def autocorrect_incompatible_with; end end end @@ -49003,22 +50925,25 @@ class RuboCop::Cop::Style::UnpackFirst < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#38 + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#37 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#37 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#31 + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#30 def unpack_and_first_element?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#54 + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#53 def first_element_range(node, unpack_call); end end # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#26 RuboCop::Cop::Style::UnpackFirst::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#28 +# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#27 RuboCop::Cop::Style::UnpackFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for variable interpolation (like "#@ivar"). @@ -49293,6 +51218,49 @@ RuboCop::Cop::Style::WordArray::ARRAY_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/word_array.rb#78 RuboCop::Cop::Style::WordArray::PERCENT_MSG = T.let(T.unsafe(nil), String) +# Checks for the use of `YAML.load`, `YAML.safe_load`, and `YAML.parse` with +# `File.read` argument. +# +# NOTE: `YAML.safe_load_file` was introduced in Ruby 3.0. +# +# @example +# +# # bad +# YAML.load(File.read(path)) +# YAML.parse(File.read(path)) +# +# # good +# YAML.load_file(path) +# YAML.parse_file(path) +# +# # bad +# YAML.safe_load(File.read(path)) # Ruby 3.0 and newer +# +# # good +# YAML.safe_load_file(path) # Ruby 3.0 and newer +# +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#27 +class RuboCop::Cop::Style::YAMLFileRead < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#41 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#34 + def yaml_file_read?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#60 + def offense_range(node); end +end + +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#30 +RuboCop::Cop::Style::YAMLFileRead::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/yaml_file_read.rb#31 +RuboCop::Cop::Style::YAMLFileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Enforces or forbids Yoda conditions, # i.e. comparison operations where the order of expression is reversed. # eg. `5 == x` @@ -49356,15 +51324,15 @@ class RuboCop::Cop::Style::YodaCondition < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#147 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#149 def actual_code_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#143 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#145 def constant_portion?(node); end - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#136 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#138 def corrected_code(node); end # @return [Boolean] @@ -49379,38 +51347,38 @@ class RuboCop::Cop::Style::YodaCondition < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#171 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#173 def interpolation?(node); end - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#132 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#134 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#155 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#157 def non_equality_operator?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#159 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#161 def noncommutative_operator?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#167 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#169 def program_name?(name); end - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#151 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#153 def reverse_comparison(operator); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#163 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#165 def source_file_path_constant?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#121 + # source://rubocop//lib/rubocop/cop/style/yoda_condition.rb#122 def valid_yoda?(node); end # @return [Boolean] @@ -49448,61 +51416,62 @@ RuboCop::Cop::Style::YodaCondition::REVERSE_COMPARISON = T.let(T.unsafe(nil), Ha # config.server_port = 9000 + ENV["TEST_ENV_NUMBER"].to_i # ---- # -# @example SupportedOperators: ['*', '+', '&''] +# @example SupportedOperators: ['*', '+', '&', '|', '^'] (default) # # bad -# 1 + x # 10 * y +# 1 + x # 1 & z +# 1 | x +# 1 ^ x # 1 + CONST # # # good -# 60 * 24 -# x + 1 # y * 10 +# x + 1 # z & 1 +# x | 1 +# x ^ 1 # CONST + 1 +# 60 * 24 # -# # good -# 1 | x -# -# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#39 +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#40 class RuboCop::Cop::Style::YodaExpression < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#46 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#47 def on_new_investigation; end - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#50 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#51 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#72 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#73 def constant_portion?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#80 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#81 def offended_ancestor?(node); end - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#84 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#85 def offended_nodes; end - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#76 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#77 def supported_operators; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#68 + # source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#69 def yoda_expression_constant?(lhs, rhs); end end -# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#42 +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#43 RuboCop::Cop::Style::YodaExpression::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#44 +# source://rubocop//lib/rubocop/cop/style/yoda_expression.rb#45 RuboCop::Cop::Style::YodaExpression::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for numeric comparisons that can be replaced @@ -50391,6 +52360,55 @@ RuboCop::Cop::Utils::FormatString::TYPE = T.let(T.unsafe(nil), Regexp) # source://rubocop//lib/rubocop/cop/utils/format_string.rb#12 RuboCop::Cop::Utils::FormatString::WIDTH = T.let(T.unsafe(nil), Regexp) +# Helper to abstract complexity of building range pairs +# with octal escape reconstruction (needed for regexp_parser < 2.7). +# +# source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#8 +class RuboCop::Cop::Utils::RegexpRanges + # @return [RegexpRanges] a new instance of RegexpRanges + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#11 + def initialize(root); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#18 + def compound_token; end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#24 + def pairs; end + + # Returns the value of attribute root. + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#9 + def root; end + + private + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#78 + def compose_range(expressions, current); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#90 + def escaped_octal?(expr); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#94 + def octal_digit?(char); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#98 + def pop_octal_digits(expressions); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#44 + def populate(expr); end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#32 + def populate_all; end + + # source://rubocop//lib/rubocop/cop/utils/regexp_ranges.rb#63 + def process_set(expressions, current); end +end + # This force provides a way to track local variables and scopes of Ruby. # Cops interact with this force need to override some of the hook methods. # @@ -50420,59 +52438,59 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#75 + # source://rubocop//lib/rubocop/cop/variable_force.rb#76 def investigate(processed_source); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#84 + # source://rubocop//lib/rubocop/cop/variable_force.rb#85 def process_node(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#70 + # source://rubocop//lib/rubocop/cop/variable_force.rb#71 def variable_table; end private - # source://rubocop//lib/rubocop/cop/variable_force.rb#367 + # source://rubocop//lib/rubocop/cop/variable_force.rb#368 def after_declaring_variable(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#367 + # source://rubocop//lib/rubocop/cop/variable_force.rb#368 def after_entering_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#367 + # source://rubocop//lib/rubocop/cop/variable_force.rb#368 def after_leaving_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#367 + # source://rubocop//lib/rubocop/cop/variable_force.rb#368 def before_declaring_variable(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#367 + # source://rubocop//lib/rubocop/cop/variable_force.rb#368 def before_entering_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#367 + # source://rubocop//lib/rubocop/cop/variable_force.rb#368 def before_leaving_scope(arg); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#338 + # source://rubocop//lib/rubocop/cop/variable_force.rb#339 def descendant_reference(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#328 + # source://rubocop//lib/rubocop/cop/variable_force.rb#329 def each_descendant_reference(loop_node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#313 + # source://rubocop//lib/rubocop/cop/variable_force.rb#314 def find_variables_in_loop(loop_node); end # This is called for each scope recursively. # # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#93 + # source://rubocop//lib/rubocop/cop/variable_force.rb#94 def inspect_variables_in_scope(scope_node); end # Mark all assignments which are referenced in the same loop @@ -50481,98 +52499,98 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#294 + # source://rubocop//lib/rubocop/cop/variable_force.rb#295 def mark_assignments_as_referenced_in_loop(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#125 + # source://rubocop//lib/rubocop/cop/variable_force.rb#126 def node_handler_method_name(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#99 + # source://rubocop//lib/rubocop/cop/variable_force.rb#100 def process_children(origin_node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#230 + # source://rubocop//lib/rubocop/cop/variable_force.rb#231 def process_loop(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#159 + # source://rubocop//lib/rubocop/cop/variable_force.rb#160 def process_regexp_named_captures(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#245 + # source://rubocop//lib/rubocop/cop/variable_force.rb#246 def process_rescue(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#264 + # source://rubocop//lib/rubocop/cop/variable_force.rb#265 def process_scope(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#283 + # source://rubocop//lib/rubocop/cop/variable_force.rb#284 def process_send(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#141 + # source://rubocop//lib/rubocop/cop/variable_force.rb#142 def process_variable_assignment(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#129 + # source://rubocop//lib/rubocop/cop/variable_force.rb#130 def process_variable_declaration(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#218 + # source://rubocop//lib/rubocop/cop/variable_force.rb#219 def process_variable_multiple_assignment(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#183 + # source://rubocop//lib/rubocop/cop/variable_force.rb#184 def process_variable_operator_assignment(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#225 + # source://rubocop//lib/rubocop/cop/variable_force.rb#226 def process_variable_referencing(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#256 + # source://rubocop//lib/rubocop/cop/variable_force.rb#257 def process_zero_arity_super(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#177 + # source://rubocop//lib/rubocop/cop/variable_force.rb#178 def regexp_captured_names(node); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force.rb#350 + # source://rubocop//lib/rubocop/cop/variable_force.rb#351 def scanned_node?(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#354 + # source://rubocop//lib/rubocop/cop/variable_force.rb#355 def scanned_nodes; end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#107 + # source://rubocop//lib/rubocop/cop/variable_force.rb#108 def skip_children!; end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#277 + # source://rubocop//lib/rubocop/cop/variable_force.rb#278 def twisted_nodes(node); end end @@ -50592,12 +52610,22 @@ class RuboCop::Cop::VariableForce::Assignment # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#16 def initialize(node, variable); end - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#67 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#50 + def exception_assignment?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#72 + def for_assignment?; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#83 def meta_assignment_node; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#56 + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#60 def multiple_assignment?; end # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#29 @@ -50608,12 +52636,12 @@ class RuboCop::Cop::VariableForce::Assignment # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#12 def node; end - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#62 + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#78 def operator; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#50 + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#54 def operator_assignment?; end # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#37 @@ -50639,6 +52667,11 @@ class RuboCop::Cop::VariableForce::Assignment # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#46 def regexp_named_capture?; end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#66 + def rest_assignment?; end + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#33 def scope; end @@ -50654,11 +52687,20 @@ class RuboCop::Cop::VariableForce::Assignment private - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#85 + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#125 + def find_multiple_assignment_node(grandparent_node); end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#121 + def for_assignment_node; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#104 def multiple_assignment_node; end - # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#77 + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#96 def operator_assignment_node; end + + # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#114 + def rest_assignment_node; end end # source://rubocop//lib/rubocop/cop/variable_force/assignment.rb#10 @@ -50666,12 +52708,12 @@ RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T. # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#64 +# source://rubocop//lib/rubocop/cop/variable_force.rb#65 class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force.rb#65 + # source://rubocop//lib/rubocop/cop/variable_force.rb#66 def assignment?; end # Returns the value of attribute node @@ -51116,7 +53158,7 @@ RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe( # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#47 +# source://rubocop//lib/rubocop/cop/variable_force.rb#48 RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array) # @api private @@ -51126,7 +53168,7 @@ RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Sym # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#111 +# source://rubocop//lib/rubocop/cop/variable_force.rb#112 RuboCop::Cop::VariableForce::NODE_HANDLER_METHOD_NAMES = T.let(T.unsafe(nil), Hash) # @api private @@ -51136,7 +53178,7 @@ RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Ar # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#46 +# source://rubocop//lib/rubocop/cop/variable_force.rb#47 RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) # @api private @@ -51146,9 +53188,14 @@ RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Sy # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#49 +# source://rubocop//lib/rubocop/cop/variable_force.rb#50 RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol) +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#43 +RuboCop::Cop::VariableForce::REST_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) + # This class represents each reference of a variable. # # source://rubocop//lib/rubocop/cop/variable_force/reference.rb#7 @@ -51196,12 +53243,12 @@ RuboCop::Cop::VariableForce::Reference::VARIABLE_REFERENCE_TYPES = T.let(T.unsaf # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#54 +# source://rubocop//lib/rubocop/cop/variable_force.rb#55 RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#56 +# source://rubocop//lib/rubocop/cop/variable_force.rb#57 RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol) # A Scope represents a context of local variable visibility. @@ -51280,7 +53327,7 @@ RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(n # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#53 +# source://rubocop//lib/rubocop/cop/variable_force.rb#54 RuboCop::Cop::VariableForce::TWISTED_SCOPE_TYPES = T.let(T.unsafe(nil), Array) # @api private @@ -51295,7 +53342,7 @@ RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Ar # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#44 +# source://rubocop//lib/rubocop/cop/variable_force.rb#45 RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol) # A Variable represents existence of a local variable. @@ -51412,12 +53459,12 @@ RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsa # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#58 +# source://rubocop//lib/rubocop/cop/variable_force.rb#59 class RuboCop::Cop::VariableForce::VariableReference < ::Struct # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force.rb#59 + # source://rubocop//lib/rubocop/cop/variable_force.rb#60 def assignment?; end # Returns the value of attribute name @@ -51499,7 +53546,7 @@ end # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#51 +# source://rubocop//lib/rubocop/cop/variable_force.rb#52 RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol) # Help methods for determining node visibility. @@ -51863,7 +53910,12 @@ module RuboCop::Ext::RegexpNode private - # source://rubocop//lib/rubocop/ext/regexp_node.rb#68 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/ext/regexp_node.rb#65 + def named_capturing?(exp, event, named); end + + # source://rubocop//lib/rubocop/ext/regexp_node.rb#73 def with_interpolations_blanked; end end @@ -51920,9 +53972,9 @@ end # Provide `CharacterSet` with `begin` and `end` locations. # -# source://rubocop//lib/rubocop/ext/regexp_parser.rb#77 +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#79 module RuboCop::Ext::RegexpParser::Expression::CharacterSet - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#78 + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#80 def build_location; end end @@ -52042,32 +54094,31 @@ end module RuboCop::FileFinder # @api private # - # source://rubocop//lib/rubocop/file_finder.rb#17 + # source://rubocop//lib/rubocop/file_finder.rb#13 def find_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/file_finder.rb#24 + # source://rubocop//lib/rubocop/file_finder.rb#20 def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end private # @api private # - # source://rubocop//lib/rubocop/file_finder.rb#32 + # source://rubocop//lib/rubocop/file_finder.rb#28 def traverse_files_upwards(filename, start_dir, stop_dir); end class << self # @api private # - # source://rubocop//lib/rubocop/file_finder.rb#9 - def root_level=(level); end + # source://rubocop//lib/rubocop/file_finder.rb#10 + def root_level; end # @api private - # @return [Boolean] # - # source://rubocop//lib/rubocop/file_finder.rb#13 - def root_level?(path, stop_dir); end + # source://rubocop//lib/rubocop/file_finder.rb#10 + def root_level=(_arg0); end end end @@ -52303,100 +54354,108 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#27 def initialize(output, options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#39 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#40 def file_finished(file, offenses); end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#33 - def file_started(_file, _file_info); end + def file_started(_file, options); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#47 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#48 def finished(_inspected_files); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#68 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#69 def auto_gen_enforced_style?; end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#72 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#73 def command; end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#156 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#161 def cop_config_params(default_cfg, cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#176 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#181 def default_config(cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#220 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#225 def excludes(offending_files, cop_name, parent); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#191 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#196 def filtered_config(cfg); end + # Returns true if the given arr include the given elm or if any of the + # given arr is a regexp that matches the given elm. + # # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#241 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#273 + def include_or_match?(arr, elm); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#246 def merge_mode_for_exclude?(cfg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#262 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#267 def no_exclude_limit?; end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#101 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#102 def output_cop(cop_name, offense_count); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#128 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#133 def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#180 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#185 def output_cop_config(output_buffer, cfg, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#163 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#168 def output_cop_param_comments(output_buffer, params, default_cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#210 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#215 def output_exclude_list(output_buffer, offending_files, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#245 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#250 def output_exclude_path(output_buffer, exclude_path, parent); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#199 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#204 def output_offending_files(output_buffer, cfg, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#95 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#96 def output_offenses; end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#258 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#263 def safe_autocorrect?(config); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#115 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#116 def set_max(cfg, cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#64 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#65 def show_offense_counts?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#60 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#61 def show_timestamp?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#148 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#153 def supports_safe_autocorrect?(cop_class, default_cfg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#152 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#157 def supports_unsafe_autocorrect?(cop_class, default_cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#91 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#92 def timestamp; end class << self @@ -52539,68 +54598,68 @@ RuboCop::Formatter::FuubarStyleFormatter::RESET_SEQUENCE = T.let(T.unsafe(nil), # This formatter formats report data as GitHub Workflow commands resulting # in GitHub check annotations when run within GitHub Actions. # -# source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#7 +# source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#7 class RuboCop::Formatter::GitHubActionsFormatter < ::RuboCop::Formatter::BaseFormatter - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#14 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#14 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#18 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#18 def finished(_inspected_files); end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#10 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#10 def started(_target_files); end private - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#29 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#29 def github_escape(string); end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#41 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#41 def github_severity(offense); end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#33 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#33 def minimum_severity_to_fail; end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#45 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#45 def report_offense(file, offense); end end -# source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#8 +# source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#8 RuboCop::Formatter::GitHubActionsFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) # This formatter saves the output as an html file. # -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#11 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#9 class RuboCop::Formatter::HTMLFormatter < ::RuboCop::Formatter::BaseFormatter # @return [HTMLFormatter] a new instance of HTMLFormatter # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#30 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#28 def initialize(output, options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#40 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#38 def file_finished(file, offenses); end # Returns the value of attribute files. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#28 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#26 def files; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#45 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#43 def finished(inspected_files); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#51 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#49 def render_html; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#36 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#34 def started(target_files); end # Returns the value of attribute summary. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#28 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#26 def summary; end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#15 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#13 class RuboCop::Formatter::HTMLFormatter::Color < ::Struct # Returns the value of attribute alpha # @@ -52624,7 +54683,7 @@ class RuboCop::Formatter::HTMLFormatter::Color < ::Struct # @return [Object] the newly set value def blue=(_); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#20 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#18 def fade_out(amount); end # Returns the value of attribute green @@ -52649,7 +54708,7 @@ class RuboCop::Formatter::HTMLFormatter::Color < ::Struct # @return [Object] the newly set value def red=(_); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#16 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#14 def to_s; end class << self @@ -52661,68 +54720,68 @@ class RuboCop::Formatter::HTMLFormatter::Color < ::Struct end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#12 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#10 RuboCop::Formatter::HTMLFormatter::ELLIPSES = T.let(T.unsafe(nil), String) # This class provides helper methods used in the ERB template. # -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#62 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#60 class RuboCop::Formatter::HTMLFormatter::ERBContext include ::RuboCop::PathUtil include ::RuboCop::Formatter::TextUtil # @return [ERBContext] a new instance of ERBContext # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#78 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76 def initialize(files, summary); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#125 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#123 def base64_encoded_logo_image; end # Make Kernel#binding public. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#85 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#83 def binding; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#90 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#88 def decorated_message(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#121 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#119 def escape(string); end # Returns the value of attribute files. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#74 def files; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#101 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#99 def highlight_source_tag(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#94 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#92 def highlighted_source_line(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#117 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#115 def possible_ellipses(location); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#112 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#110 def source_after_highlight(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#107 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#105 def source_before_highlight(offense); end # Returns the value of attribute summary. # - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#76 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#74 def summary; end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#74 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#72 RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#66 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#64 RuboCop::Formatter::HTMLFormatter::ERBContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#26 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#24 class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct # Returns the value of attribute offenses # @@ -52755,7 +54814,7 @@ class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#23 class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct # Returns the value of attribute inspected_files # @@ -52799,27 +54858,27 @@ class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#13 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#11 RuboCop::Formatter::HTMLFormatter::TEMPLATE_PATH = T.let(T.unsafe(nil), String) # This formatter formats the report data in JSON format. # -# source://rubocop//lib/rubocop/formatter/json_formatter.rb#9 +# source://rubocop//lib/rubocop/formatter/json_formatter.rb#8 class RuboCop::Formatter::JSONFormatter < ::RuboCop::Formatter::BaseFormatter include ::RuboCop::PathUtil # @return [JSONFormatter] a new instance of JSONFormatter # - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#14 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#13 def initialize(output, options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#23 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#22 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#28 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#27 def finished(inspected_files); end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#43 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#42 def hash_for_file(file, offenses); end # TODO: Consider better solution for Offense#real_column. @@ -52827,21 +54886,21 @@ class RuboCop::Formatter::JSONFormatter < ::RuboCop::Formatter::BaseFormatter # So, the minimum value of `last_column` should be 1. # And non-zero value of `last_column` should be used as is. # - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#65 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#64 def hash_for_location(offense); end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#50 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#49 def hash_for_offense(offense); end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#33 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#32 def metadata_hash; end # Returns the value of attribute output_hash. # - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#12 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#11 def output_hash; end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#19 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#18 def started(target_files); end end @@ -53268,6 +55327,230 @@ class RuboCop::Lockfile def parser; end end +# source://rubocop//lib/rubocop/lsp/logger.rb#13 +module RuboCop::Lsp; end + +# Log for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/logger.rb#16 +class RuboCop::Lsp::Logger + class << self + # @api private + # + # source://rubocop//lib/rubocop/lsp/logger.rb#17 + def log(message); end + end +end + +# Routes for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/routes.rb#18 +class RuboCop::Lsp::Routes + # @api private + # @return [Routes] a new instance of Routes + # + # source://rubocop//lib/rubocop/lsp/routes.rb#25 + def initialize(server); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#31 + def for(name); end + + # source://rubocop//lib/rubocop/lsp/routes.rb#38 + def handle_initialize(request); end + + # source://rubocop//lib/rubocop/lsp/routes.rb#61 + def handle_initialized(_request); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#170 + def handle_method_missing(request); end + + # source://rubocop//lib/rubocop/lsp/routes.rb#67 + def handle_shutdown(request); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#159 + def handle_unsupported_method(request, method = T.unsafe(nil)); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#208 + def diagnostic(file_uri, text); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#178 + def extract_initialization_options_from(request); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#188 + def format_file(file_uri, command: T.unsafe(nil)); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#222 + def remove_file_protocol_from(uri); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#226 + def to_diagnostic(offense); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#238 + def to_range(location); end + + class << self + private + + # @api private + # + # source://rubocop//lib/rubocop/lsp/routes.rb#19 + def handle(name, &block); end + end +end + +# Runtime for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/runtime.rb#16 +class RuboCop::Lsp::Runtime + # @api private + # @return [Runtime] a new instance of Runtime + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#19 + def initialize(config_store); end + + # This abuses the `--stdin` option of rubocop and reads the formatted text + # from the `options[:stdin]` that rubocop mutates. This depends on + # `parallel: false` as well as the fact that RuboCop doesn't otherwise dup + # or reassign that options object. Risky business! + # + # Reassigning `options[:stdin]` is done here: + # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cop/team.rb#L131 + # Printing `options[:stdin]` + # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cli/command/execute_runner.rb#L95 + # Setting `parallel: true` would break this here: + # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/runner.rb#L72 + # + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#38 + def format(path, text, command:); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#17 + def layout_mode=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#17 + def lint_mode=(_arg0); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#55 + def offenses(path, text); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#17 + def safe_autocorrect=(_arg0); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#77 + def config_only_options; end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#84 + def redirect_stdout(&block); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/runtime.rb#92 + def run_rubocop(options, path); end +end + +# Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/server.rb#21 +class RuboCop::Lsp::Server + # @api private + # @return [Server] a new instance of Server + # + # source://rubocop//lib/rubocop/lsp/server.rb#22 + def initialize(config_store); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#56 + def configure(options); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#48 + def format(path, text, command:); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#52 + def offenses(path, text); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#29 + def start; end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#62 + def stop(&block); end + + # @api private + # + # source://rubocop//lib/rubocop/lsp/server.rb#44 + def write(response); end +end + +# Severity for Language Server Protocol of RuboCop. +# +# @api private +# +# source://rubocop//lib/rubocop/lsp/severity.rb#7 +class RuboCop::Lsp::Severity + class << self + # @api private + # + # source://rubocop//lib/rubocop/lsp/severity.rb#17 + def find_by(rubocop_severity); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/lsp/severity.rb#8 +RuboCop::Lsp::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) + # Parse different formats of magic comments. # # @abstract parent of three different magic comment handlers @@ -53474,12 +55757,12 @@ RuboCop::MagicComment::KEYWORDS = T.let(T.unsafe(nil), Hash) class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment # Match `encoding` or `coding` # - # source://rubocop//lib/rubocop/magic_comment.rb#263 + # source://rubocop//lib/rubocop/magic_comment.rb#265 def encoding; end # Rewrite the comment without a given token type # - # source://rubocop//lib/rubocop/magic_comment.rb#268 + # source://rubocop//lib/rubocop/magic_comment.rb#270 def without(type); end private @@ -53493,22 +55776,25 @@ class RuboCop::MagicComment::SimpleComment < ::RuboCop::MagicComment # # @see https://github.com/ruby/ruby/blob/78b95b4/parse.y#L7134-L7138 # - # source://rubocop//lib/rubocop/magic_comment.rb#285 + # source://rubocop//lib/rubocop/magic_comment.rb#287 def extract_frozen_string_literal; end - # source://rubocop//lib/rubocop/magic_comment.rb#289 + # source://rubocop//lib/rubocop/magic_comment.rb#291 def extract_shareable_constant_value; end - # source://rubocop//lib/rubocop/magic_comment.rb#293 + # source://rubocop//lib/rubocop/magic_comment.rb#295 def extract_typed; end end +# source://rubocop//lib/rubocop/magic_comment.rb#262 +RuboCop::MagicComment::SimpleComment::FSTRING_LITERAL_COMMENT = T.let(T.unsafe(nil), String) + # IRB's pattern for matching magic comment tokens. # # @see https://github.com/ruby/ruby/blob/b4a55c1/lib/irb/magic-file.rb#L5 # # source://rubocop//lib/rubocop/magic_comment.rb#10 -RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), Regexp) +RuboCop::MagicComment::TOKEN = T.let(T.unsafe(nil), String) # Wrapper for Vim style magic comments. # @@ -53622,7 +55908,7 @@ class RuboCop::Options # @api private # - # source://rubocop//lib/rubocop/options.rb#219 + # source://rubocop//lib/rubocop/options.rb#228 def add_additional_modes(opts); end # the autocorrect command-line arguments map to the autocorrect @options values like so: @@ -53634,62 +55920,67 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#136 + # source://rubocop//lib/rubocop/options.rb#139 def add_autocorrection_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#201 + # source://rubocop//lib/rubocop/options.rb#204 def add_cache_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#70 + # source://rubocop//lib/rubocop/options.rb#73 def add_check_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#159 + # source://rubocop//lib/rubocop/options.rb#162 def add_config_generation_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#177 + # source://rubocop//lib/rubocop/options.rb#180 def add_cop_selection_csv_option(option, opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#231 + # source://rubocop//lib/rubocop/options.rb#240 def add_general_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#101 + # source://rubocop//lib/rubocop/options.rb#211 + def add_lsp_option(opts); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#104 def add_output_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#243 + # source://rubocop//lib/rubocop/options.rb#252 def add_profile_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#208 + # source://rubocop//lib/rubocop/options.rb#217 def add_server_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#192 + # source://rubocop//lib/rubocop/options.rb#195 def add_severity_option(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#52 + # source://rubocop//lib/rubocop/options.rb#53 def define_options; end # @api private # - # source://rubocop//lib/rubocop/options.rb#253 + # source://rubocop//lib/rubocop/options.rb#262 def handle_deprecated_option(old_option, new_option); end # Finds the option in `args` starting with -- and converts it to a symbol, @@ -53697,7 +55988,7 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#287 + # source://rubocop//lib/rubocop/options.rb#296 def long_opt_symbol(args); end # Sets a value in the @options hash, based on the given long option and its @@ -53705,17 +55996,17 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#276 + # source://rubocop//lib/rubocop/options.rb#285 def option(opts, *args); end # @api private # - # source://rubocop//lib/rubocop/options.rb#258 + # source://rubocop//lib/rubocop/options.rb#267 def rainbow; end # @api private # - # source://rubocop//lib/rubocop/options.rb#292 + # source://rubocop//lib/rubocop/options.rb#301 def require_feature(file); end # Creates a section of options in order to separate them visually when @@ -53723,7 +56014,7 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#268 + # source://rubocop//lib/rubocop/options.rb#277 def section(opts, heading, &_block); end end @@ -53746,125 +56037,119 @@ RuboCop::Options::E_STDIN_NO_PATH = T.let(T.unsafe(nil), String) # # @api private # -# source://rubocop//lib/rubocop/options.rb#488 +# source://rubocop//lib/rubocop/options.rb#489 module RuboCop::OptionsHelp; end # @api private # -# source://rubocop//lib/rubocop/options.rb#490 +# source://rubocop//lib/rubocop/options.rb#491 RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/options.rb#489 +# source://rubocop//lib/rubocop/options.rb#490 RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/options.rb#492 +# source://rubocop//lib/rubocop/options.rb#493 RuboCop::OptionsHelp::TEXT = T.let(T.unsafe(nil), Hash) # Validates option arguments and the options' compatibility with each other. # # @api private # -# source://rubocop//lib/rubocop/options.rb#302 +# source://rubocop//lib/rubocop/options.rb#311 class RuboCop::OptionsValidator # @api private # @return [OptionsValidator] a new instance of OptionsValidator # - # source://rubocop//lib/rubocop/options.rb#340 + # source://rubocop//lib/rubocop/options.rb#349 def initialize(options); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#462 + # source://rubocop//lib/rubocop/options.rb#463 def boolean_or_empty_cache?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#428 + # source://rubocop//lib/rubocop/options.rb#433 def disable_parallel_when_invalid_option_combo; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#454 - def display_only_fail_level_offenses_with_autocorrect?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/options.rb#458 + # source://rubocop//lib/rubocop/options.rb#459 def except_syntax?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#466 + # source://rubocop//lib/rubocop/options.rb#467 def incompatible_options; end # @api private # - # source://rubocop//lib/rubocop/options.rb#441 + # source://rubocop//lib/rubocop/options.rb#446 def invalid_arguments_for_parallel; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#449 + # source://rubocop//lib/rubocop/options.rb#454 def only_includes_redundant_disable?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#375 + # source://rubocop//lib/rubocop/options.rb#380 def validate_auto_gen_config; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#414 + # source://rubocop//lib/rubocop/options.rb#419 def validate_autocorrect; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#478 + # source://rubocop//lib/rubocop/options.rb#479 def validate_cache_enabled_for_cache_root; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#349 + # source://rubocop//lib/rubocop/options.rb#358 def validate_compatibility; end # @api private # - # source://rubocop//lib/rubocop/options.rb#344 + # source://rubocop//lib/rubocop/options.rb#353 def validate_cop_options; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#396 + # source://rubocop//lib/rubocop/options.rb#401 def validate_display_only_correctable_and_autocorrect; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#388 + # source://rubocop//lib/rubocop/options.rb#393 def validate_display_only_failed; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#405 + # source://rubocop//lib/rubocop/options.rb#410 def validate_display_only_failed_and_display_only_correctable; end # @api private # @raise [OptionParser::MissingArgument] # - # source://rubocop//lib/rubocop/options.rb#470 + # source://rubocop//lib/rubocop/options.rb#471 def validate_exclude_limit_option; end class << self @@ -53873,14 +56158,14 @@ class RuboCop::OptionsValidator # # @api private # - # source://rubocop//lib/rubocop/options.rb#309 + # source://rubocop//lib/rubocop/options.rb#318 def validate_cop_list(names); end private # @api private # - # source://rubocop//lib/rubocop/options.rb#326 + # source://rubocop//lib/rubocop/options.rb#335 def format_message_from(name, cop_names); end end end @@ -54208,39 +56493,39 @@ RuboCop::RemoteConfig::CACHE_LIFETIME = T.let(T.unsafe(nil), Integer) # # @api private # -# source://rubocop//lib/rubocop/result_cache.rb#12 +# source://rubocop//lib/rubocop/result_cache.rb#11 class RuboCop::ResultCache # @api private # @return [ResultCache] a new instance of ResultCache # - # source://rubocop//lib/rubocop/result_cache.rb#88 + # source://rubocop//lib/rubocop/result_cache.rb#87 def initialize(file, team, options, config_store, cache_root = T.unsafe(nil)); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/result_cache.rb#101 + # source://rubocop//lib/rubocop/result_cache.rb#100 def debug?; end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#109 + # source://rubocop//lib/rubocop/result_cache.rb#108 def load; end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#86 + # source://rubocop//lib/rubocop/result_cache.rb#85 def path; end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#114 + # source://rubocop//lib/rubocop/result_cache.rb#113 def save(offenses); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/result_cache.rb#105 + # source://rubocop//lib/rubocop/result_cache.rb#104 def valid?; end private @@ -54248,7 +56533,7 @@ class RuboCop::ResultCache # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/result_cache.rb#147 + # source://rubocop//lib/rubocop/result_cache.rb#146 def any_symlink?(path); end # We combine team and options into a single "context" checksum to avoid @@ -54258,17 +56543,17 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#233 + # source://rubocop//lib/rubocop/result_cache.rb#236 def context_checksum(team, options); end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#190 + # source://rubocop//lib/rubocop/result_cache.rb#189 def digest(path); end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#158 + # source://rubocop//lib/rubocop/result_cache.rb#157 def file_checksum(file, config_store); end # Return a hash of the options given at invocation, minus the ones that have @@ -54277,25 +56562,25 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#217 + # source://rubocop//lib/rubocop/result_cache.rb#220 def relevant_options_digest(options); end # The checksum of the RuboCop program running the inspection. # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#175 + # source://rubocop//lib/rubocop/result_cache.rb#174 def rubocop_checksum; end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#201 + # source://rubocop//lib/rubocop/result_cache.rb#200 def rubocop_extra_features; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/result_cache.rb#143 + # source://rubocop//lib/rubocop/result_cache.rb#142 def symlink_protection_triggered?(path); end # The external dependency checksums are cached per RuboCop team so that @@ -54303,19 +56588,19 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#224 + # source://rubocop//lib/rubocop/result_cache.rb#227 def team_checksum(team); end class << self # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/result_cache.rb#82 + # source://rubocop//lib/rubocop/result_cache.rb#81 def allow_symlinks_in_cache_location?(config_store); end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#76 + # source://rubocop//lib/rubocop/result_cache.rb#75 def cache_root(config_store); end # Remove old files so that the cache doesn't grow too big. When the @@ -54327,67 +56612,67 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#29 + # source://rubocop//lib/rubocop/result_cache.rb#28 def cleanup(config_store, verbose, cache_root = T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#171 + # source://rubocop//lib/rubocop/result_cache.rb#170 def inhibit_cleanup; end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#171 + # source://rubocop//lib/rubocop/result_cache.rb#170 def inhibit_cleanup=(_arg0); end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#43 + # source://rubocop//lib/rubocop/result_cache.rb#42 def rubocop_required_features; end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#43 + # source://rubocop//lib/rubocop/result_cache.rb#42 def rubocop_required_features=(_arg0); end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#171 + # source://rubocop//lib/rubocop/result_cache.rb#170 def source_checksum; end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#171 + # source://rubocop//lib/rubocop/result_cache.rb#170 def source_checksum=(_arg0); end private # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#66 + # source://rubocop//lib/rubocop/result_cache.rb#65 def remove_files(files, dirs, remove_count); end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#53 + # source://rubocop//lib/rubocop/result_cache.rb#52 def remove_oldest_files(files, dirs, cache_root, verbose); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/result_cache.rb#49 + # source://rubocop//lib/rubocop/result_cache.rb#48 def requires_file_removal?(file_count, config_store); end end end # @api private # -# source://rubocop//lib/rubocop/result_cache.rb#17 +# source://rubocop//lib/rubocop/result_cache.rb#16 RuboCop::ResultCache::DL_EXTENSIONS = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/result_cache.rb#13 +# source://rubocop//lib/rubocop/result_cache.rb#12 RuboCop::ResultCache::NON_CHANGING = T.let(T.unsafe(nil), Array) # This class handles the processing of files, which includes dealing with @@ -54492,7 +56777,7 @@ class RuboCop::Runner # source://rubocop//lib/rubocop/runner.rb#414 def formatter_set; end - # source://rubocop//lib/rubocop/runner.rb#468 + # source://rubocop//lib/rubocop/runner.rb#470 def get_processed_source(file); end # source://rubocop//lib/rubocop/runner.rb#342 @@ -54543,7 +56828,7 @@ class RuboCop::Runner # otherwise dormant team that can be used for config- and option- # level caching in ResultCache. # - # source://rubocop//lib/rubocop/runner.rb#490 + # source://rubocop//lib/rubocop/runner.rb#492 def standby_team(config); end # @return [Boolean] @@ -54655,18 +56940,18 @@ class RuboCop::TargetFinder # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#145 + # source://rubocop//lib/rubocop/target_finder.rb#149 def all_cops_include; end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#116 + # source://rubocop//lib/rubocop/target_finder.rb#120 def combined_exclude_glob_patterns(base_dir); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#172 + # source://rubocop//lib/rubocop/target_finder.rb#176 def configured_include?(file); end # @api private @@ -54711,63 +56996,63 @@ class RuboCop::TargetFinder # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#176 + # source://rubocop//lib/rubocop/target_finder.rb#180 def included_file?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#180 + # source://rubocop//lib/rubocop/target_finder.rb#184 def process_explicit_path(path, mode); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#149 + # source://rubocop//lib/rubocop/target_finder.rb#153 def ruby_executable?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#123 + # source://rubocop//lib/rubocop/target_finder.rb#127 def ruby_extension?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#127 + # source://rubocop//lib/rubocop/target_finder.rb#131 def ruby_extensions; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#168 + # source://rubocop//lib/rubocop/target_finder.rb#172 def ruby_file?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#134 + # source://rubocop//lib/rubocop/target_finder.rb#138 def ruby_filename?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#138 + # source://rubocop//lib/rubocop/target_finder.rb#142 def ruby_filenames; end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#160 + # source://rubocop//lib/rubocop/target_finder.rb#164 def ruby_interpreters(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#164 + # source://rubocop//lib/rubocop/target_finder.rb#168 def stdin?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#108 + # source://rubocop//lib/rubocop/target_finder.rb#112 def symlink_excluded_or_infinite_loop?(base_dir, current_dir, exclude_pattern, flags); end # Finds all Ruby source files under the current or other supplied @@ -54800,7 +57085,7 @@ class RuboCop::TargetFinder # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#197 + # source://rubocop//lib/rubocop/target_finder.rb#201 def order; end end @@ -54818,34 +57103,34 @@ class RuboCop::TargetRuby # @api private # @return [TargetRuby] a new instance of TargetRuby # - # source://rubocop//lib/rubocop/target_ruby.rb#247 + # source://rubocop//lib/rubocop/target_ruby.rb#252 def initialize(config); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#263 + # source://rubocop//lib/rubocop/target_ruby.rb#268 def rubocop_version_with_support; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#251 + # source://rubocop//lib/rubocop/target_ruby.rb#256 def source; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_ruby.rb#259 + # source://rubocop//lib/rubocop/target_ruby.rb#264 def supported?; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#255 + # source://rubocop//lib/rubocop/target_ruby.rb#260 def version; end class << self # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#233 + # source://rubocop//lib/rubocop/target_ruby.rb#238 def supported_versions; end end end @@ -54854,23 +57139,23 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#106 +# source://rubocop//lib/rubocop/target_ruby.rb#107 class RuboCop::TargetRuby::BundlerLockFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#107 + # source://rubocop//lib/rubocop/target_ruby.rb#108 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#140 + # source://rubocop//lib/rubocop/target_ruby.rb#141 def bundler_lock_file_path; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#113 + # source://rubocop//lib/rubocop/target_ruby.rb#114 def find_version; end end @@ -54883,18 +57168,18 @@ RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#221 +# source://rubocop//lib/rubocop/target_ruby.rb#226 class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#222 + # source://rubocop//lib/rubocop/target_ruby.rb#227 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#228 + # source://rubocop//lib/rubocop/target_ruby.rb#233 def find_version; end end @@ -54902,62 +57187,62 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#147 +# source://rubocop//lib/rubocop/target_ruby.rb#148 class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source extend ::RuboCop::AST::NodePattern::Macros - # source://rubocop//lib/rubocop/target_ruby.rb#158 - def gem_requirement?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/target_ruby.rb#159 + def gem_requirement_versions(param0 = T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#162 + # source://rubocop//lib/rubocop/target_ruby.rb#165 def name; end - # source://rubocop//lib/rubocop/target_ruby.rb#153 + # source://rubocop//lib/rubocop/target_ruby.rb#154 def required_ruby_version(param0); end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#209 + # source://rubocop//lib/rubocop/target_ruby.rb#214 def find_default_minimal_known_ruby(right_hand_side); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#168 + # source://rubocop//lib/rubocop/target_ruby.rb#171 def find_version; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#178 + # source://rubocop//lib/rubocop/target_ruby.rb#181 def gemspec_filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#185 + # source://rubocop//lib/rubocop/target_ruby.rb#188 def gemspec_filepath; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#205 + # source://rubocop//lib/rubocop/target_ruby.rb#210 def version_from_array(array); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#190 + # source://rubocop//lib/rubocop/target_ruby.rb#193 def version_from_gemspec_file(file); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#195 + # source://rubocop//lib/rubocop/target_ruby.rb#198 def version_from_right_hand_side(right_hand_side); end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#150 +# source://rubocop//lib/rubocop/target_ruby.rb#151 RuboCop::TargetRuby::GemspecFile::GEMSPEC_EXTENSION = T.let(T.unsafe(nil), String) # @api private @@ -54974,18 +57259,18 @@ RuboCop::TargetRuby::OBSOLETE_RUBIES = T.let(T.unsafe(nil), Hash) # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#38 +# source://rubocop//lib/rubocop/target_ruby.rb#39 class RuboCop::TargetRuby::RuboCopConfig < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#39 + # source://rubocop//lib/rubocop/target_ruby.rb#40 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#45 + # source://rubocop//lib/rubocop/target_ruby.rb#46 def find_version; end end @@ -54993,76 +57278,76 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#52 +# source://rubocop//lib/rubocop/target_ruby.rb#53 class RuboCop::TargetRuby::RubyVersionFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#56 + # source://rubocop//lib/rubocop/target_ruby.rb#57 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#62 + # source://rubocop//lib/rubocop/target_ruby.rb#63 def filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#70 + # source://rubocop//lib/rubocop/target_ruby.rb#71 def find_version; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#66 + # source://rubocop//lib/rubocop/target_ruby.rb#67 def pattern; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#77 + # source://rubocop//lib/rubocop/target_ruby.rb#78 def version_file; end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#53 +# source://rubocop//lib/rubocop/target_ruby.rb#54 RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_FILENAME = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#54 +# source://rubocop//lib/rubocop/target_ruby.rb#55 RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#237 +# source://rubocop//lib/rubocop/target_ruby.rb#242 RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array) # A place where information about a target ruby version is found. # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#23 +# source://rubocop//lib/rubocop/target_ruby.rb#24 class RuboCop::TargetRuby::Source # @api private # @return [Source] a new instance of Source # - # source://rubocop//lib/rubocop/target_ruby.rb#26 + # source://rubocop//lib/rubocop/target_ruby.rb#27 def initialize(config); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#24 + # source://rubocop//lib/rubocop/target_ruby.rb#25 def name; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#31 + # source://rubocop//lib/rubocop/target_ruby.rb#32 def to_s; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#24 + # source://rubocop//lib/rubocop/target_ruby.rb#25 def version; end end @@ -55071,34 +57356,34 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#85 +# source://rubocop//lib/rubocop/target_ruby.rb#86 class RuboCop::TargetRuby::ToolVersionsFile < ::RuboCop::TargetRuby::RubyVersionFile # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#89 + # source://rubocop//lib/rubocop/target_ruby.rb#90 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#95 + # source://rubocop//lib/rubocop/target_ruby.rb#96 def filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#99 + # source://rubocop//lib/rubocop/target_ruby.rb#100 def pattern; end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#86 +# source://rubocop//lib/rubocop/target_ruby.rb#87 RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_FILENAME = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#87 +# source://rubocop//lib/rubocop/target_ruby.rb#88 RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_PATTERN = T.let(T.unsafe(nil), Regexp) # source://rubocop//lib/rubocop/ast_aliases.rb#7 @@ -55124,12 +57409,12 @@ module RuboCop::Version class << self # @api private # - # source://rubocop//lib/rubocop/version.rb#89 + # source://rubocop//lib/rubocop/version.rb#93 def document_version; end # @api private # - # source://rubocop//lib/rubocop/version.rb#39 + # source://rubocop//lib/rubocop/version.rb#43 def extension_versions(env); end # Returns feature version in one of two ways: @@ -55139,17 +57424,17 @@ module RuboCop::Version # # @api private # - # source://rubocop//lib/rubocop/version.rb#73 + # source://rubocop//lib/rubocop/version.rb#77 def feature_version(feature); end # @api private # - # source://rubocop//lib/rubocop/version.rb#94 + # source://rubocop//lib/rubocop/version.rb#98 def server_mode; end # @api private # - # source://rubocop//lib/rubocop/version.rb#17 + # source://rubocop//lib/rubocop/version.rb#21 def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end end end @@ -55157,7 +57442,7 @@ end # source://rubocop//lib/rubocop/version.rb#12 RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/version.rb#14 +# source://rubocop//lib/rubocop/version.rb#16 RuboCop::Version::EXTENSION_PATH_NAMES = T.let(T.unsafe(nil), Hash) # source://rubocop//lib/rubocop/version.rb#8 diff --git a/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi b/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi deleted file mode 100644 index fe14ff97..00000000 --- a/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +++ /dev/null @@ -1,1317 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `ruby-progressbar` gem. -# Please instead update this file by running `bin/tapioca gem ruby-progressbar`. - -# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#4 -class ProgressBar - class << self - # source://ruby-progressbar//lib/ruby-progressbar.rb#9 - def create(*args); end - end -end - -# source://ruby-progressbar//lib/ruby-progressbar/base.rb#17 -class ProgressBar::Base - extend ::Forwardable - - # @return [Base] a new instance of Base - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#45 - def initialize(options = T.unsafe(nil)); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def clear(*args, **_arg1, &block); end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#137 - def decrement; end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#92 - def finish; end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#129 - def finished?; end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#203 - def format(other); end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#203 - def format=(other); end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#141 - def increment; end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#199 - def inspect; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def log(*args, **_arg1, &block); end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#102 - def pause; end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#123 - def paused?; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def progress(*args, **_arg1, &block); end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#145 - def progress=(new_progress); end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#153 - def progress_mark=(mark); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def refresh(*args, **_arg1, &block); end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#157 - def remainder_mark=(mark); end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#114 - def reset; end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#110 - def resume; end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#87 - def start(options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#133 - def started?; end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#106 - def stop; end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#123 - def stopped?; end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#161 - def title; end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#165 - def title=(title); end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#176 - def to_h; end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#169 - def to_s(new_format = T.unsafe(nil)); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def total(*args, **_arg1, &block); end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#149 - def total=(new_total); end - - protected - - # Returns the value of attribute autofinish. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def autofinish; end - - # Sets the attribute autofinish - # - # @param value the value to set the attribute autofinish to. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def autofinish=(_arg0); end - - # Returns the value of attribute autostart. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def autostart; end - - # Sets the attribute autostart - # - # @param value the value to set the attribute autostart to. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def autostart=(_arg0); end - - # Returns the value of attribute bar_component. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def bar_component; end - - # Sets the attribute bar_component - # - # @param value the value to set the attribute bar_component to. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def bar_component=(_arg0); end - - # Returns the value of attribute finished. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def finished; end - - # Sets the attribute finished - # - # @param value the value to set the attribute finished to. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def finished=(_arg0); end - - # Returns the value of attribute output. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def output; end - - # Sets the attribute output - # - # @param value the value to set the attribute output to. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def output=(_arg0); end - - # Returns the value of attribute percentage_component. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def percentage_component; end - - # Sets the attribute percentage_component - # - # @param value the value to set the attribute percentage_component to. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def percentage_component=(_arg0); end - - # Returns the value of attribute progressable. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def progressable; end - - # Sets the attribute progressable - # - # @param value the value to set the attribute progressable to. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def progressable=(_arg0); end - - # Returns the value of attribute projector. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def projector; end - - # Sets the attribute projector - # - # @param value the value to set the attribute projector to. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def projector=(_arg0); end - - # Returns the value of attribute rate_component. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def rate_component; end - - # Sets the attribute rate_component - # - # @param value the value to set the attribute rate_component to. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def rate_component=(_arg0); end - - # Returns the value of attribute time_component. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def time_component; end - - # Sets the attribute time_component - # - # @param value the value to set the attribute time_component to. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def time_component=(_arg0); end - - # Returns the value of attribute timer. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def timer; end - - # Sets the attribute timer - # - # @param value the value to set the attribute timer to. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def timer=(_arg0); end - - # Returns the value of attribute title_component. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def title_component; end - - # Sets the attribute title_component - # - # @param value the value to set the attribute title_component to. - # - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 - def title_component=(_arg0); end - - # source://ruby-progressbar//lib/ruby-progressbar/base.rb#226 - def update_progress(*args); end -end - -# source://ruby-progressbar//lib/ruby-progressbar/base.rb#28 -ProgressBar::Base::RUNNING_AVERAGE_RATE_DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/base.rb#21 -ProgressBar::Base::SMOOTHING_DEPRECATION_WARNING = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#2 -module ProgressBar::Calculators; end - -# source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#3 -class ProgressBar::Calculators::Length - # @return [Length] a new instance of Length - # - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#8 - def initialize(options = T.unsafe(nil)); end - - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#25 - def calculate_length; end - - # Returns the value of attribute current_length. - # - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 - def current_length; end - - # Sets the attribute current_length - # - # @param value the value to set the attribute current_length to. - # - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 - def current_length=(_arg0); end - - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#14 - def length; end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#18 - def length_changed?; end - - # Returns the value of attribute length_override. - # - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#4 - def length_override; end - - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#33 - def length_override=(other); end - - # Returns the value of attribute output. - # - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 - def output; end - - # Sets the attribute output - # - # @param value the value to set the attribute output to. - # - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 - def output=(_arg0); end - - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#29 - def reset_length; end - - private - - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#56 - def dynamic_width; end - - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#85 - def dynamic_width_stty; end - - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#89 - def dynamic_width_tput; end - - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#76 - def dynamic_width_via_io_object; end - - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#71 - def dynamic_width_via_output_stream_object; end - - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#81 - def dynamic_width_via_system_calls; end - - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#43 - def terminal_width; end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#93 - def unix?; end -end - -# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#5 -module ProgressBar::Components; end - -# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#6 -class ProgressBar::Components::Bar - # @return [Bar] a new instance of Bar - # - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#17 - def initialize(options = T.unsafe(nil)); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#35 - def bar(length); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#63 - def bar_with_percentage(length); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#41 - def complete_bar(length); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#47 - def complete_bar_with_percentage(length); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#53 - def incomplete_space(length); end - - # Returns the value of attribute length. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 - def length; end - - # Sets the attribute length - # - # @param value the value to set the attribute length to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 - def length=(_arg0); end - - # Returns the value of attribute progress. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 - def progress; end - - # Sets the attribute progress - # - # @param value the value to set the attribute progress to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 - def progress=(_arg0); end - - # Returns the value of attribute progress_mark. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 - def progress_mark; end - - # Sets the attribute progress_mark - # - # @param value the value to set the attribute progress_mark to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 - def progress_mark=(_arg0); end - - # Returns the value of attribute remainder_mark. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 - def remainder_mark; end - - # Sets the attribute remainder_mark - # - # @param value the value to set the attribute remainder_mark to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 - def remainder_mark=(_arg0); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#25 - def to_s(options = T.unsafe(nil)); end - - # Returns the value of attribute upa_steps. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 - def upa_steps; end - - # Sets the attribute upa_steps - # - # @param value the value to set the attribute upa_steps to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 - def upa_steps=(_arg0); end - - private - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#91 - def completed_length; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#81 - def incomplete_string; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#71 - def integrated_percentage_complete_string; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#77 - def standard_complete_string; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#95 - def unknown_progress_frame; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#85 - def unknown_string; end -end - -# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#7 -ProgressBar::Components::Bar::DEFAULT_PROGRESS_MARK = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#8 -ProgressBar::Components::Bar::DEFAULT_REMAINDER_MARK = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#9 -ProgressBar::Components::Bar::DEFAULT_UPA_STEPS = T.let(T.unsafe(nil), Array) - -# source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#3 -class ProgressBar::Components::Percentage - # @return [Percentage] a new instance of Percentage - # - # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#6 - def initialize(options = T.unsafe(nil)); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#14 - def justified_percentage; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#22 - def justified_percentage_with_precision; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#10 - def percentage; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#18 - def percentage_with_precision; end - - # Returns the value of attribute progress. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#4 - def progress; end - - # Sets the attribute progress - # - # @param value the value to set the attribute progress to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#4 - def progress=(_arg0); end -end - -# source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#3 -class ProgressBar::Components::Rate - # @return [Rate] a new instance of Rate - # - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#8 - def initialize(options = T.unsafe(nil)); end - - # Returns the value of attribute progress. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 - def progress; end - - # Sets the attribute progress - # - # @param value the value to set the attribute progress to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 - def progress=(_arg0); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#14 - def rate_of_change(format_string = T.unsafe(nil)); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#20 - def rate_of_change_with_precision; end - - # Returns the value of attribute rate_scale. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 - def rate_scale; end - - # Sets the attribute rate_scale - # - # @param value the value to set the attribute rate_scale to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 - def rate_scale=(_arg0); end - - # Returns the value of attribute timer. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 - def timer; end - - # Sets the attribute timer - # - # @param value the value to set the attribute timer to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 - def timer=(_arg0); end - - private - - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#30 - def base_rate; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#34 - def elapsed_seconds; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#26 - def scaled_rate; end -end - -# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#6 -class ProgressBar::Components::Time - # @return [Time] a new instance of Time - # - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#21 - def initialize(options = T.unsafe(nil)); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#31 - def elapsed_with_label; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#47 - def estimated_wall_clock; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#43 - def estimated_with_friendly_oob; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#27 - def estimated_with_label(out_of_bounds_time_format = T.unsafe(nil)); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#35 - def estimated_with_no_oob; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#39 - def estimated_with_unknown_oob; end - - protected - - # Returns the value of attribute progress. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 - def progress; end - - # Sets the attribute progress - # - # @param value the value to set the attribute progress to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 - def progress=(_arg0); end - - # Returns the value of attribute projector. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 - def projector; end - - # Sets the attribute projector - # - # @param value the value to set the attribute projector to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 - def projector=(_arg0); end - - # Returns the value of attribute timer. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 - def timer; end - - # Sets the attribute timer - # - # @param value the value to set the attribute timer to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 - def timer=(_arg0); end - - private - - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#80 - def elapsed; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#66 - def estimated(out_of_bounds_time_format); end - - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#94 - def estimated_seconds_remaining; end - - # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#88 - def estimated_with_elapsed_fallback(out_of_bounds_time_format); end -end - -# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#14 -ProgressBar::Components::Time::ELAPSED_LABEL = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#13 -ProgressBar::Components::Time::ESTIMATED_LABEL = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#12 -ProgressBar::Components::Time::NO_TIME_ELAPSED_TEXT = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#11 -ProgressBar::Components::Time::OOB_FRIENDLY_TIME_TEXT = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#9 -ProgressBar::Components::Time::OOB_LIMIT_IN_HOURS = T.let(T.unsafe(nil), Integer) - -# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#16 -ProgressBar::Components::Time::OOB_TEXT_TO_FORMAT = T.let(T.unsafe(nil), Hash) - -# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#8 -ProgressBar::Components::Time::OOB_TIME_FORMATS = T.let(T.unsafe(nil), Array) - -# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#10 -ProgressBar::Components::Time::OOB_UNKNOWN_TIME_TEXT = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#7 -ProgressBar::Components::Time::TIME_FORMAT = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#15 -ProgressBar::Components::Time::WALL_CLOCK_FORMAT = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#3 -class ProgressBar::Components::Title - # @return [Title] a new instance of Title - # - # source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#8 - def initialize(options = T.unsafe(nil)); end - - # Returns the value of attribute title. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#6 - def title; end - - # Sets the attribute title - # - # @param value the value to set the attribute title to. - # - # source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#6 - def title=(_arg0); end -end - -# source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#4 -ProgressBar::Components::Title::DEFAULT_TITLE = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/format/formatter.rb#2 -module ProgressBar::Format; end - -# source://ruby-progressbar//lib/ruby-progressbar/format/formatter.rb#3 -class ProgressBar::Format::Formatter - class << self - # source://ruby-progressbar//lib/ruby-progressbar/format/formatter.rb#4 - def process(format_string, max_length, bar); end - end -end - -# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#3 -class ProgressBar::Format::Molecule - # @return [Molecule] a new instance of Molecule - # - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#33 - def initialize(letter); end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#38 - def bar_molecule?; end - - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#46 - def full_key; end - - # Returns the value of attribute key. - # - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 - def key; end - - # Sets the attribute key - # - # @param value the value to set the attribute key to. - # - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 - def key=(_arg0); end - - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#50 - def lookup_value(environment, length = T.unsafe(nil)); end - - # Returns the value of attribute method_name. - # - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 - def method_name; end - - # Sets the attribute method_name - # - # @param value the value to set the attribute method_name to. - # - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 - def method_name=(_arg0); end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#42 - def non_bar_molecule?; end -end - -# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#28 -ProgressBar::Format::Molecule::BAR_MOLECULES = T.let(T.unsafe(nil), Array) - -# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#4 -ProgressBar::Format::Molecule::MOLECULES = T.let(T.unsafe(nil), Hash) - -# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#5 -class ProgressBar::Format::String < ::String - # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#13 - def bar_molecule_placeholder_length; end - - # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#21 - def bar_molecules; end - - # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#9 - def displayable_length; end - - # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#25 - def molecules; end - - # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#17 - def non_bar_molecules; end -end - -# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#7 -ProgressBar::Format::String::ANSI_SGR_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#6 -ProgressBar::Format::String::MOLECULE_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://ruby-progressbar//lib/ruby-progressbar/errors/invalid_progress_error.rb#2 -class ProgressBar::InvalidProgressError < ::RuntimeError; end - -# source://ruby-progressbar//lib/ruby-progressbar/output.rb#5 -class ProgressBar::Output - # @return [Output] a new instance of Output - # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#10 - def initialize(options = T.unsafe(nil)); end - - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#37 - def clear_string; end - - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#41 - def length; end - - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#30 - def log(string); end - - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#50 - def refresh(options = T.unsafe(nil)); end - - # Returns the value of attribute stream. - # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#8 - def stream; end - - # Sets the attribute stream - # - # @param value the value to set the attribute stream to. - # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#8 - def stream=(_arg0); end - - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#45 - def with_refresh; end - - protected - - # Returns the value of attribute bar. - # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 - def bar; end - - # Sets the attribute bar - # - # @param value the value to set the attribute bar to. - # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 - def bar=(_arg0); end - - # Returns the value of attribute length_calculator. - # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 - def length_calculator; end - - # Sets the attribute length_calculator - # - # @param value the value to set the attribute length_calculator to. - # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 - def length_calculator=(_arg0); end - - # Returns the value of attribute throttle. - # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 - def throttle; end - - # Sets the attribute throttle - # - # @param value the value to set the attribute throttle to. - # - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 - def throttle=(_arg0); end - - private - - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#66 - def print_and_flush; end - - class << self - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#20 - def detect(options = T.unsafe(nil)); end - end -end - -# source://ruby-progressbar//lib/ruby-progressbar/output.rb#6 -ProgressBar::Output::DEFAULT_OUTPUT_STREAM = T.let(T.unsafe(nil), IO) - -# source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#4 -module ProgressBar::Outputs; end - -# source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#5 -class ProgressBar::Outputs::NonTty < ::ProgressBar::Output - # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#18 - def bar_update_string; end - - # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#8 - def clear; end - - # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#28 - def default_format; end - - # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#38 - def eol; end - - # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#14 - def last_update_length; end - - # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#36 - def refresh_with_format_change(*_arg0); end - - # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#32 - def resolve_format(*_arg0); end - - protected - - # Sets the attribute last_update_length - # - # @param value the value to set the attribute last_update_length to. - # - # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#44 - def last_update_length=(_arg0); end -end - -# source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#6 -ProgressBar::Outputs::NonTty::DEFAULT_FORMAT_STRING = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#5 -class ProgressBar::Outputs::Tty < ::ProgressBar::Output - # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#15 - def bar_update_string; end - - # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#10 - def clear; end - - # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#19 - def default_format; end - - # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#27 - def eol; end - - # source://ruby-progressbar//lib/ruby-progressbar/output.rb#45 - def refresh_with_format_change; end - - # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#23 - def resolve_format(other_format); end -end - -# source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#6 -ProgressBar::Outputs::Tty::DEFAULT_FORMAT_STRING = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/progress.rb#4 -class ProgressBar::Progress - # @return [Progress] a new instance of Progress - # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#12 - def initialize(options = T.unsafe(nil)); end - - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#104 - def absolute; end - - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#41 - def decrement; end - - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#23 - def finish; end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#27 - def finished?; end - - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#31 - def increment; end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#85 - def none?; end - - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#73 - def percentage_completed; end - - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#97 - def percentage_completed_with_precision; end - - # Returns the value of attribute progress. - # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#8 - def progress; end - - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#55 - def progress=(new_progress); end - - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#51 - def reset; end - - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#18 - def start(options = T.unsafe(nil)); end - - # Returns the value of attribute starting_position. - # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#10 - def starting_position; end - - # Sets the attribute starting_position - # - # @param value the value to set the attribute starting_position to. - # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#10 - def starting_position=(_arg0); end - - # Returns the value of attribute total. - # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#8 - def total; end - - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#64 - def total=(new_total); end - - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#93 - def total_with_unknown_indicator; end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#89 - def unknown?; end -end - -# source://ruby-progressbar//lib/ruby-progressbar/progress.rb#6 -ProgressBar::Progress::DEFAULT_BEGINNING_POSITION = T.let(T.unsafe(nil), Integer) - -# source://ruby-progressbar//lib/ruby-progressbar/progress.rb#5 -ProgressBar::Progress::DEFAULT_TOTAL = T.let(T.unsafe(nil), Integer) - -# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#4 -class ProgressBar::Projector - class << self - # source://ruby-progressbar//lib/ruby-progressbar/projector.rb#10 - def from_type(name); end - end -end - -# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#5 -ProgressBar::Projector::DEFAULT_PROJECTOR = ProgressBar::Projectors::SmoothedAverage - -# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#6 -ProgressBar::Projector::NAME_TO_PROJECTOR_MAP = T.let(T.unsafe(nil), Hash) - -# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#2 -module ProgressBar::Projectors; end - -# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#3 -class ProgressBar::Projectors::SmoothedAverage - # @return [SmoothedAverage] a new instance of SmoothedAverage - # - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#11 - def initialize(options = T.unsafe(nil)); end - - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#24 - def decrement; end - - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#28 - def increment; end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#52 - def none?; end - - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#32 - def progress; end - - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#42 - def progress=(new_progress); end - - # Returns the value of attribute projection. - # - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#9 - def projection; end - - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#38 - def reset; end - - # Returns the value of attribute samples. - # - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 - def samples; end - - # Sets the attribute samples - # - # @param value the value to set the attribute samples to. - # - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 - def samples=(_arg0); end - - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#19 - def start(options = T.unsafe(nil)); end - - # Returns the value of attribute strength. - # - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 - def strength; end - - # Sets the attribute strength - # - # @param value the value to set the attribute strength to. - # - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 - def strength=(_arg0); end - - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#36 - def total=(_new_total); end - - protected - - # Sets the attribute projection - # - # @param value the value to set the attribute projection to. - # - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#62 - def projection=(_arg0); end - - private - - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#66 - def absolute; end - - class << self - # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#56 - def calculate(current_projection, new_value, rate); end - end -end - -# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#5 -ProgressBar::Projectors::SmoothedAverage::DEFAULT_BEGINNING_POSITION = T.let(T.unsafe(nil), Integer) - -# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#4 -ProgressBar::Projectors::SmoothedAverage::DEFAULT_STRENGTH = T.let(T.unsafe(nil), Float) - -# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#2 -module ProgressBar::Refinements; end - -# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#3 -module ProgressBar::Refinements::Enumerator; end - -# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#4 -ProgressBar::Refinements::Enumerator::ARITY_ERROR_MESSAGE = T.let(T.unsafe(nil), String) - -# source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#2 -class ProgressBar::Throttle - # @return [Throttle] a new instance of Throttle - # - # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#8 - def initialize(options = T.unsafe(nil)); end - - # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#15 - def choke(options = T.unsafe(nil)); end - - # Returns the value of attribute rate. - # - # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 - def rate; end - - # Sets the attribute rate - # - # @param value the value to set the attribute rate to. - # - # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 - def rate=(_arg0); end - - # Returns the value of attribute started_at. - # - # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 - def started_at; end - - # Sets the attribute started_at - # - # @param value the value to set the attribute started_at to. - # - # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 - def started_at=(_arg0); end - - # Returns the value of attribute stopped_at. - # - # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 - def stopped_at; end - - # Sets the attribute stopped_at - # - # @param value the value to set the attribute stopped_at to. - # - # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 - def stopped_at=(_arg0); end - - # Returns the value of attribute timer. - # - # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 - def timer; end - - # Sets the attribute timer - # - # @param value the value to set the attribute timer to. - # - # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 - def timer=(_arg0); end -end - -# source://ruby-progressbar//lib/ruby-progressbar/time.rb#3 -class ProgressBar::Time - # @return [Time] a new instance of Time - # - # source://ruby-progressbar//lib/ruby-progressbar/time.rb#11 - def initialize(time = T.unsafe(nil)); end - - # source://ruby-progressbar//lib/ruby-progressbar/time.rb#15 - def now; end - - # source://ruby-progressbar//lib/ruby-progressbar/time.rb#19 - def unmocked_time_method; end - - protected - - # Returns the value of attribute time. - # - # source://ruby-progressbar//lib/ruby-progressbar/time.rb#27 - def time; end - - # Sets the attribute time - # - # @param value the value to set the attribute time to. - # - # source://ruby-progressbar//lib/ruby-progressbar/time.rb#27 - def time=(_arg0); end -end - -# source://ruby-progressbar//lib/ruby-progressbar/time.rb#4 -ProgressBar::Time::TIME_MOCKING_LIBRARY_METHODS = T.let(T.unsafe(nil), Array) - -# source://ruby-progressbar//lib/ruby-progressbar/timer.rb#4 -class ProgressBar::Timer - # @return [Timer] a new instance of Timer - # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#8 - def initialize(options = T.unsafe(nil)); end - - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#67 - def divide_seconds(seconds); end - - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#57 - def elapsed_seconds; end - - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#63 - def elapsed_whole_seconds; end - - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#31 - def now; end - - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#23 - def pause; end - - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#43 - def reset; end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#48 - def reset?; end - - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#52 - def restart; end - - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#27 - def resume; end - - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#12 - def start; end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#35 - def started?; end - - # Returns the value of attribute started_at. - # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 - def started_at; end - - # Sets the attribute started_at - # - # @param value the value to set the attribute started_at to. - # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 - def started_at=(_arg0); end - - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#17 - def stop; end - - # @return [Boolean] - # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#39 - def stopped?; end - - # Returns the value of attribute stopped_at. - # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 - def stopped_at; end - - # Sets the attribute stopped_at - # - # @param value the value to set the attribute stopped_at to. - # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 - def stopped_at=(_arg0); end - - protected - - # Returns the value of attribute time. - # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#76 - def time; end - - # Sets the attribute time - # - # @param value the value to set the attribute time to. - # - # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#76 - def time=(_arg0); end -end diff --git a/sorbet/rbi/gems/simplecov-cobertura@2.1.0.rbi b/sorbet/rbi/gems/simplecov-cobertura@2.1.0.rbi index b03bcd11..9ab6b3a9 100644 --- a/sorbet/rbi/gems/simplecov-cobertura@2.1.0.rbi +++ b/sorbet/rbi/gems/simplecov-cobertura@2.1.0.rbi @@ -7,126 +7,126 @@ # source://simplecov-cobertura//lib/simplecov-cobertura/version.rb#1 module SimpleCov class << self - # source://simplecov/0.21.2/lib/simplecov.rb#174 + # source://simplecov/0.22.0/lib/simplecov.rb#174 def at_exit_behavior; end - # source://simplecov/0.21.2/lib/simplecov.rb#170 + # source://simplecov/0.22.0/lib/simplecov.rb#170 def clear_result; end - # source://simplecov/0.21.2/lib/simplecov.rb#86 + # source://simplecov/0.22.0/lib/simplecov.rb#86 def collate(result_filenames, profile = T.unsafe(nil), ignore_timeout: T.unsafe(nil), &block); end - # source://simplecov/0.21.2/lib/simplecov.rb#223 + # source://simplecov/0.22.0/lib/simplecov.rb#223 def exit_and_report_previous_error(exit_status); end - # source://simplecov/0.21.2/lib/simplecov.rb#200 + # source://simplecov/0.22.0/lib/simplecov.rb#200 def exit_status_from_exception; end - # source://simplecov/0.21.2/lib/simplecov.rb#28 + # source://simplecov/0.22.0/lib/simplecov.rb#28 def external_at_exit; end - # source://simplecov/0.21.2/lib/simplecov.rb#28 + # source://simplecov/0.22.0/lib/simplecov.rb#28 def external_at_exit=(_arg0); end - # source://simplecov/0.21.2/lib/simplecov.rb#28 + # source://simplecov/0.22.0/lib/simplecov.rb#28 def external_at_exit?; end - # source://simplecov/0.21.2/lib/simplecov.rb#131 + # source://simplecov/0.22.0/lib/simplecov.rb#131 def filtered(files); end - # source://simplecov/0.21.2/lib/simplecov.rb#268 + # source://simplecov/0.22.0/lib/simplecov.rb#268 def final_result_process?; end - # source://simplecov/0.21.2/lib/simplecov.rb#142 + # source://simplecov/0.22.0/lib/simplecov.rb#142 def grouped(files); end - # source://simplecov/0.21.2/lib/simplecov.rb#162 + # source://simplecov/0.22.0/lib/simplecov.rb#162 def load_adapter(name); end - # source://simplecov/0.21.2/lib/simplecov.rb#158 + # source://simplecov/0.22.0/lib/simplecov.rb#158 def load_profile(name); end - # source://simplecov/0.21.2/lib/simplecov.rb#24 + # source://simplecov/0.22.0/lib/simplecov.rb#24 def pid; end - # source://simplecov/0.21.2/lib/simplecov.rb#24 + # source://simplecov/0.22.0/lib/simplecov.rb#24 def pid=(_arg0); end - # source://simplecov/0.21.2/lib/simplecov.rb#213 + # source://simplecov/0.22.0/lib/simplecov.rb#213 def previous_error?(error_exit_status); end - # source://simplecov/0.21.2/lib/simplecov.rb#248 + # source://simplecov/0.22.0/lib/simplecov.rb#248 def process_result(result); end - # source://simplecov/0.21.2/lib/simplecov.rb#233 + # source://simplecov/0.22.0/lib/simplecov.rb#233 def process_results_and_report_error; end - # source://simplecov/0.21.2/lib/simplecov.rb#229 + # source://simplecov/0.22.0/lib/simplecov.rb#229 def ready_to_process_results?; end - # source://simplecov/0.21.2/lib/simplecov.rb#101 + # source://simplecov/0.22.0/lib/simplecov.rb#101 def result; end - # source://simplecov/0.21.2/lib/simplecov.rb#124 + # source://simplecov/0.22.0/lib/simplecov.rb#124 def result?; end - # source://simplecov/0.21.2/lib/simplecov.rb#256 + # source://simplecov/0.22.0/lib/simplecov.rb#256 def result_exit_status(result); end - # source://simplecov/0.21.2/lib/simplecov.rb#296 + # source://simplecov/0.22.0/lib/simplecov.rb#296 def round_coverage(coverage); end - # source://simplecov/0.21.2/lib/simplecov.rb#186 + # source://simplecov/0.22.0/lib/simplecov.rb#186 def run_exit_tasks!; end - # source://simplecov/0.21.2/lib/simplecov.rb#24 + # source://simplecov/0.22.0/lib/simplecov.rb#24 def running; end - # source://simplecov/0.21.2/lib/simplecov.rb#24 + # source://simplecov/0.22.0/lib/simplecov.rb#24 def running=(_arg0); end - # source://simplecov/0.21.2/lib/simplecov.rb#48 + # source://simplecov/0.22.0/lib/simplecov.rb#48 def start(profile = T.unsafe(nil), &block); end - # source://simplecov/0.21.2/lib/simplecov.rb#276 + # source://simplecov/0.22.0/lib/simplecov.rb#276 def wait_for_other_processes; end - # source://simplecov/0.21.2/lib/simplecov.rb#285 + # source://simplecov/0.22.0/lib/simplecov.rb#285 def write_last_run(result); end private - # source://simplecov/0.21.2/lib/simplecov.rb#397 + # source://simplecov/0.22.0/lib/simplecov.rb#399 def adapt_coverage_result; end - # source://simplecov/0.21.2/lib/simplecov.rb#369 + # source://simplecov/0.22.0/lib/simplecov.rb#371 def add_not_loaded_files(result); end - # source://simplecov/0.21.2/lib/simplecov.rb#302 + # source://simplecov/0.22.0/lib/simplecov.rb#302 def initial_setup(profile, &block); end - # source://simplecov/0.21.2/lib/simplecov.rb#361 + # source://simplecov/0.22.0/lib/simplecov.rb#363 def lookup_corresponding_ruby_coverage_name(criterion); end - # source://simplecov/0.21.2/lib/simplecov.rb#423 + # source://simplecov/0.22.0/lib/simplecov.rb#425 def make_parallel_tests_available; end - # source://simplecov/0.21.2/lib/simplecov.rb#432 + # source://simplecov/0.22.0/lib/simplecov.rb#434 def probably_running_parallel_tests?; end - # source://simplecov/0.21.2/lib/simplecov.rb#386 + # source://simplecov/0.22.0/lib/simplecov.rb#388 def process_coverage_result; end - # source://simplecov/0.21.2/lib/simplecov.rb#408 + # source://simplecov/0.22.0/lib/simplecov.rb#410 def remove_useless_results; end - # source://simplecov/0.21.2/lib/simplecov.rb#418 + # source://simplecov/0.22.0/lib/simplecov.rb#420 def result_with_not_loaded_files; end - # source://simplecov/0.21.2/lib/simplecov.rb#314 + # source://simplecov/0.22.0/lib/simplecov.rb#314 def start_coverage_measurement; end - # source://simplecov/0.21.2/lib/simplecov.rb#349 + # source://simplecov/0.22.0/lib/simplecov.rb#349 def start_coverage_with_criteria; end end end @@ -134,7 +134,7 @@ end # source://simplecov-cobertura//lib/simplecov-cobertura/version.rb#2 module SimpleCov::Formatter class << self - # source://simplecov/0.21.2/lib/simplecov/default_formatter.rb#7 + # source://simplecov/0.22.0/lib/simplecov/default_formatter.rb#7 def from_env(env); end end end diff --git a/sorbet/rbi/gems/simplecov-html@0.12.3.rbi b/sorbet/rbi/gems/simplecov-html@0.12.3.rbi deleted file mode 100644 index b826d33e..00000000 --- a/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +++ /dev/null @@ -1,216 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `simplecov-html` gem. -# Please instead update this file by running `bin/tapioca gem simplecov-html`. - -# source://simplecov-html//lib/simplecov-html.rb#16 -module SimpleCov - class << self - # source://simplecov/0.21.2/lib/simplecov.rb#174 - def at_exit_behavior; end - - # source://simplecov/0.21.2/lib/simplecov.rb#170 - def clear_result; end - - # source://simplecov/0.21.2/lib/simplecov.rb#86 - def collate(result_filenames, profile = T.unsafe(nil), ignore_timeout: T.unsafe(nil), &block); end - - # source://simplecov/0.21.2/lib/simplecov.rb#223 - def exit_and_report_previous_error(exit_status); end - - # source://simplecov/0.21.2/lib/simplecov.rb#200 - def exit_status_from_exception; end - - # source://simplecov/0.21.2/lib/simplecov.rb#28 - def external_at_exit; end - - # source://simplecov/0.21.2/lib/simplecov.rb#28 - def external_at_exit=(_arg0); end - - # source://simplecov/0.21.2/lib/simplecov.rb#28 - def external_at_exit?; end - - # source://simplecov/0.21.2/lib/simplecov.rb#131 - def filtered(files); end - - # source://simplecov/0.21.2/lib/simplecov.rb#268 - def final_result_process?; end - - # source://simplecov/0.21.2/lib/simplecov.rb#142 - def grouped(files); end - - # source://simplecov/0.21.2/lib/simplecov.rb#162 - def load_adapter(name); end - - # source://simplecov/0.21.2/lib/simplecov.rb#158 - def load_profile(name); end - - # source://simplecov/0.21.2/lib/simplecov.rb#24 - def pid; end - - # source://simplecov/0.21.2/lib/simplecov.rb#24 - def pid=(_arg0); end - - # source://simplecov/0.21.2/lib/simplecov.rb#213 - def previous_error?(error_exit_status); end - - # source://simplecov/0.21.2/lib/simplecov.rb#248 - def process_result(result); end - - # source://simplecov/0.21.2/lib/simplecov.rb#233 - def process_results_and_report_error; end - - # source://simplecov/0.21.2/lib/simplecov.rb#229 - def ready_to_process_results?; end - - # source://simplecov/0.21.2/lib/simplecov.rb#101 - def result; end - - # source://simplecov/0.21.2/lib/simplecov.rb#124 - def result?; end - - # source://simplecov/0.21.2/lib/simplecov.rb#256 - def result_exit_status(result); end - - # source://simplecov/0.21.2/lib/simplecov.rb#296 - def round_coverage(coverage); end - - # source://simplecov/0.21.2/lib/simplecov.rb#186 - def run_exit_tasks!; end - - # source://simplecov/0.21.2/lib/simplecov.rb#24 - def running; end - - # source://simplecov/0.21.2/lib/simplecov.rb#24 - def running=(_arg0); end - - # source://simplecov/0.21.2/lib/simplecov.rb#48 - def start(profile = T.unsafe(nil), &block); end - - # source://simplecov/0.21.2/lib/simplecov.rb#276 - def wait_for_other_processes; end - - # source://simplecov/0.21.2/lib/simplecov.rb#285 - def write_last_run(result); end - - private - - # source://simplecov/0.21.2/lib/simplecov.rb#397 - def adapt_coverage_result; end - - # source://simplecov/0.21.2/lib/simplecov.rb#369 - def add_not_loaded_files(result); end - - # source://simplecov/0.21.2/lib/simplecov.rb#302 - def initial_setup(profile, &block); end - - # source://simplecov/0.21.2/lib/simplecov.rb#361 - def lookup_corresponding_ruby_coverage_name(criterion); end - - # source://simplecov/0.21.2/lib/simplecov.rb#423 - def make_parallel_tests_available; end - - # source://simplecov/0.21.2/lib/simplecov.rb#432 - def probably_running_parallel_tests?; end - - # source://simplecov/0.21.2/lib/simplecov.rb#386 - def process_coverage_result; end - - # source://simplecov/0.21.2/lib/simplecov.rb#408 - def remove_useless_results; end - - # source://simplecov/0.21.2/lib/simplecov.rb#418 - def result_with_not_loaded_files; end - - # source://simplecov/0.21.2/lib/simplecov.rb#314 - def start_coverage_measurement; end - - # source://simplecov/0.21.2/lib/simplecov.rb#349 - def start_coverage_with_criteria; end - end -end - -# source://simplecov-html//lib/simplecov-html.rb#17 -module SimpleCov::Formatter - class << self - # source://simplecov/0.21.2/lib/simplecov/default_formatter.rb#7 - def from_env(env); end - end -end - -# source://simplecov-html//lib/simplecov-html.rb#18 -class SimpleCov::Formatter::HTMLFormatter - # @return [HTMLFormatter] a new instance of HTMLFormatter - # - # source://simplecov-html//lib/simplecov-html.rb#19 - def initialize; end - - # @return [Boolean] - # - # source://simplecov-html//lib/simplecov-html.rb#38 - def branchable_result?; end - - # source://simplecov-html//lib/simplecov-html.rb#23 - def format(result); end - - # @return [Boolean] - # - # source://simplecov-html//lib/simplecov-html.rb#45 - def line_status?(source_file, line); end - - # source://simplecov-html//lib/simplecov-html.rb#34 - def output_message(result); end - - private - - # source://simplecov-html//lib/simplecov-html.rb#64 - def asset_output_path; end - - # source://simplecov-html//lib/simplecov-html.rb#72 - def assets_path(name); end - - # source://simplecov-html//lib/simplecov-html.rb#97 - def coverage_css_class(covered_percent); end - - # source://simplecov-html//lib/simplecov-html.rb#93 - def covered_percent(percent); end - - # Returns a table containing the given source files - # - # source://simplecov-html//lib/simplecov-html.rb#84 - def formatted_file_list(title, source_files); end - - # Returns the html for the given source_file - # - # source://simplecov-html//lib/simplecov-html.rb#77 - def formatted_source_file(source_file); end - - # Return a (kind of) unique id for the source file given. Uses SHA1 on path for the id - # - # source://simplecov-html//lib/simplecov-html.rb#118 - def id(source_file); end - - # source://simplecov-html//lib/simplecov-html.rb#130 - def link_to_source_file(source_file); end - - # source://simplecov-html//lib/simplecov-html.rb#60 - def output_path; end - - # source://simplecov-html//lib/simplecov-html.rb#126 - def shortened_filename(source_file); end - - # source://simplecov-html//lib/simplecov-html.rb#107 - def strength_css_class(covered_strength); end - - # Returns the an erb instance for the template of given name - # - # source://simplecov-html//lib/simplecov-html.rb#56 - def template(name); end - - # source://simplecov-html//lib/simplecov-html.rb#122 - def timeago(time); end -end - -# source://simplecov-html//lib/simplecov-html/version.rb#6 -SimpleCov::Formatter::HTMLFormatter::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/simplecov@0.21.2.rbi b/sorbet/rbi/gems/simplecov@0.22.0.rbi similarity index 97% rename from sorbet/rbi/gems/simplecov@0.21.2.rbi rename to sorbet/rbi/gems/simplecov@0.22.0.rbi index d1cb675d..07788787 100644 --- a/sorbet/rbi/gems/simplecov@0.21.2.rbi +++ b/sorbet/rbi/gems/simplecov@0.22.0.rbi @@ -214,36 +214,36 @@ module SimpleCov # # @return [Hash] # - # source://simplecov//lib/simplecov.rb#397 + # source://simplecov//lib/simplecov.rb#399 def adapt_coverage_result; end # Finds files that were to be tracked but were not loaded and initializes # the line-by-line coverage to zero (if relevant) or nil (comments / whitespace etc). # - # source://simplecov//lib/simplecov.rb#369 + # source://simplecov//lib/simplecov.rb#371 def add_not_loaded_files(result); end # source://simplecov//lib/simplecov.rb#302 def initial_setup(profile, &block); end - # source://simplecov//lib/simplecov.rb#361 + # source://simplecov//lib/simplecov.rb#363 def lookup_corresponding_ruby_coverage_name(criterion); end # parallel_tests isn't always available, see: https://github.com/grosser/parallel_tests/issues/772 # - # source://simplecov//lib/simplecov.rb#423 + # source://simplecov//lib/simplecov.rb#425 def make_parallel_tests_available; end # @return [Boolean] # - # source://simplecov//lib/simplecov.rb#432 + # source://simplecov//lib/simplecov.rb#434 def probably_running_parallel_tests?; end # Call steps that handle process coverage result # # @return [Hash] # - # source://simplecov//lib/simplecov.rb#386 + # source://simplecov//lib/simplecov.rb#388 def process_coverage_result; end # Filter coverage result @@ -252,7 +252,7 @@ module SimpleCov # # @return [Hash] # - # source://simplecov//lib/simplecov.rb#408 + # source://simplecov//lib/simplecov.rb#410 def remove_useless_results; end # Initialize result with files that are not included by coverage @@ -260,7 +260,7 @@ module SimpleCov # # @return [Hash] # - # source://simplecov//lib/simplecov.rb#418 + # source://simplecov//lib/simplecov.rb#420 def result_with_not_loaded_files; end # Trigger Coverage.start depends on given config coverage_criterion @@ -643,7 +643,7 @@ module SimpleCov::Configuration # @return [Boolean] # - # source://simplecov//lib/simplecov/configuration.rb#432 + # source://simplecov//lib/simplecov/configuration.rb#443 def branch_coverage_supported?; end # source://simplecov//lib/simplecov/configuration.rb#424 @@ -703,6 +703,16 @@ module SimpleCov::Configuration # source://simplecov//lib/simplecov/configuration.rb#34 def coverage_dir(dir = T.unsafe(nil)); end + # @return [Boolean] + # + # source://simplecov//lib/simplecov/configuration.rb#452 + def coverage_for_eval_enabled?; end + + # @return [Boolean] + # + # source://simplecov//lib/simplecov/configuration.rb#447 + def coverage_for_eval_supported?; end + # Returns the full path to the output directory using SimpleCov.root # and SimpleCov.coverage_dir, so you can adjust this by configuring those # values. Will create the directory if it's missing @@ -718,6 +728,9 @@ module SimpleCov::Configuration # source://simplecov//lib/simplecov/configuration.rb#401 def enable_coverage(criterion); end + # source://simplecov//lib/simplecov/configuration.rb#456 + def enable_coverage_for_eval; end + # gets or sets the enabled_for_subprocess configuration # when true, this will inject SimpleCov code into Process.fork # @@ -901,18 +914,18 @@ module SimpleCov::Configuration private - # source://simplecov//lib/simplecov/configuration.rb#464 + # source://simplecov//lib/simplecov/configuration.rb#483 def minimum_possible_coverage_exceeded(coverage_option); end # The actual filter processor. Not meant for direct use # - # source://simplecov//lib/simplecov/configuration.rb#471 + # source://simplecov//lib/simplecov/configuration.rb#490 def parse_filter(filter_argument = T.unsafe(nil), &filter_proc); end - # source://simplecov//lib/simplecov/configuration.rb#447 + # source://simplecov//lib/simplecov/configuration.rb#466 def raise_if_criterion_disabled(criterion); end - # source://simplecov//lib/simplecov/configuration.rb#456 + # source://simplecov//lib/simplecov/configuration.rb#475 def raise_if_criterion_unsupported(criterion); end end @@ -1843,20 +1856,20 @@ class SimpleCov::SourceFile private - # source://simplecov//lib/simplecov/source_file.rb#340 + # source://simplecov//lib/simplecov/source_file.rb#346 def branch_coverage_statistics; end - # source://simplecov//lib/simplecov/source_file.rb#318 + # source://simplecov//lib/simplecov/source_file.rb#324 def build_branch(branch_data, hit_count, condition_start_line); end # Call recursive method that transform our static hash to array of objects # # @return [Array] # - # source://simplecov//lib/simplecov/source_file.rb#267 + # source://simplecov//lib/simplecov/source_file.rb#273 def build_branches; end - # source://simplecov//lib/simplecov/source_file.rb#304 + # source://simplecov//lib/simplecov/source_file.rb#310 def build_branches_from(condition, branches); end # Build full branches report @@ -1865,10 +1878,10 @@ class SimpleCov::SourceFile # # @return [Hash] # - # source://simplecov//lib/simplecov/source_file.rb#256 + # source://simplecov//lib/simplecov/source_file.rb#262 def build_branches_report; end - # source://simplecov//lib/simplecov/source_file.rb#223 + # source://simplecov//lib/simplecov/source_file.rb#229 def build_lines; end # source://simplecov//lib/simplecov/source_file.rb#164 @@ -1876,16 +1889,16 @@ class SimpleCov::SourceFile # Warning to identify condition from Issue #56 # - # source://simplecov//lib/simplecov/source_file.rb#245 + # source://simplecov//lib/simplecov/source_file.rb#251 def coverage_exceeding_source_warn; end # source://simplecov//lib/simplecov/source_file.rb#214 def ensure_remove_undefs(file_lines); end - # source://simplecov//lib/simplecov/source_file.rb#330 + # source://simplecov//lib/simplecov/source_file.rb#336 def line_coverage_statistics; end - # source://simplecov//lib/simplecov/source_file.rb#240 + # source://simplecov//lib/simplecov/source_file.rb#246 def lines_strength; end # source://simplecov//lib/simplecov/source_file.rb#178 @@ -1896,10 +1909,10 @@ class SimpleCov::SourceFile # source://simplecov//lib/simplecov/source_file.rb#160 def no_cov_chunks; end - # source://simplecov//lib/simplecov/source_file.rb#276 + # source://simplecov//lib/simplecov/source_file.rb#282 def process_skipped_branches(branches); end - # source://simplecov//lib/simplecov/source_file.rb#231 + # source://simplecov//lib/simplecov/source_file.rb#237 def process_skipped_lines(lines); end # source://simplecov//lib/simplecov/source_file.rb#198 @@ -1913,7 +1926,7 @@ class SimpleCov::SourceFile # # See #801 # - # source://simplecov//lib/simplecov/source_file.rb#294 + # source://simplecov//lib/simplecov/source_file.rb#300 def restore_ruby_data_structure(structure); end # source://simplecov//lib/simplecov/source_file.rb#206 diff --git a/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi b/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi deleted file mode 100644 index 4b5c6ae5..00000000 --- a/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `simplecov_json_formatter` gem. -# Please instead update this file by running `bin/tapioca gem simplecov_json_formatter`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/spoom@1.2.1.rbi b/sorbet/rbi/gems/spoom@1.2.1.rbi deleted file mode 100644 index c5f4e8ec..00000000 --- a/sorbet/rbi/gems/spoom@1.2.1.rbi +++ /dev/null @@ -1,2503 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `spoom` gem. -# Please instead update this file by running `bin/tapioca gem spoom`. - -# source://spoom//lib/spoom.rb#7 -module Spoom; end - -# source://spoom//lib/spoom/cli/helper.rb#9 -module Spoom::Cli; end - -# source://spoom//lib/spoom/cli/bump.rb#9 -class Spoom::Cli::Bump < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # source://spoom//lib/spoom/cli/bump.rb#49 - sig { params(directory: ::String).void } - def bump(directory = T.unsafe(nil)); end - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/bump.rb#170 - def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/bump.rb#192 - def undo_changes(files, from_strictness); end -end - -# source://spoom//lib/spoom/cli/config.rb#9 -class Spoom::Cli::Config < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/config.rb#15 - def show; end -end - -# source://spoom//lib/spoom/cli/coverage.rb#9 -class Spoom::Cli::Coverage < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # source://spoom//lib/spoom/cli/coverage.rb#198 - def bundle_install(path, sha); end - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/coverage.rb#210 - def message_no_data(file); end - - # source://spoom//lib/spoom/cli/coverage.rb#173 - def open(file = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/coverage.rb#189 - def parse_time(string, option); end - - # source://spoom//lib/spoom/cli/coverage.rb#142 - def report; end - - # source://spoom//lib/spoom/cli/coverage.rb#20 - def snapshot; end - - # source://spoom//lib/spoom/cli/coverage.rb#42 - def timeline; end -end - -# source://spoom//lib/spoom/cli/coverage.rb#12 -Spoom::Cli::Coverage::DATA_DIR = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/cli/helper.rb#10 -module Spoom::Cli::Helper - include ::Spoom::Colorize - - requires_ancestor { Thor } - - # source://spoom//lib/spoom/cli/helper.rb#119 - sig { params(string: ::String).returns(::String) } - def blue(string); end - - # Is the `--color` option true? - # - # source://spoom//lib/spoom/cli/helper.rb#83 - sig { returns(T::Boolean) } - def color?; end - - # Colorize a string if `color?` - # - # source://spoom//lib/spoom/cli/helper.rb#112 - sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } - def colorize(string, *color); end - - # Returns the context at `--path` (by default the current working directory) - # - # source://spoom//lib/spoom/cli/helper.rb#51 - sig { returns(::Spoom::Context) } - def context; end - - # Raise if `spoom` is not ran inside a context with a `sorbet/config` file - # - # source://spoom//lib/spoom/cli/helper.rb#57 - sig { returns(::Spoom::Context) } - def context_requiring_sorbet!; end - - # source://spoom//lib/spoom/cli/helper.rb#124 - sig { params(string: ::String).returns(::String) } - def cyan(string); end - - # Return the path specified through `--path` - # - # source://spoom//lib/spoom/cli/helper.rb#72 - sig { returns(::String) } - def exec_path; end - - # source://spoom//lib/spoom/cli/helper.rb#129 - sig { params(string: ::String).returns(::String) } - def gray(string); end - - # source://spoom//lib/spoom/cli/helper.rb#134 - sig { params(string: ::String).returns(::String) } - def green(string); end - - # source://spoom//lib/spoom/cli/helper.rb#88 - sig { params(string: ::String).returns(::String) } - def highlight(string); end - - # source://spoom//lib/spoom/cli/helper.rb#139 - sig { params(string: ::String).returns(::String) } - def red(string); end - - # Print `message` on `$stdout` - # - # source://spoom//lib/spoom/cli/helper.rb#20 - sig { params(message: ::String).void } - def say(message); end - - # Print `message` on `$stderr` - # - # The message is prefixed by a status (default: `Error`). - # - # source://spoom//lib/spoom/cli/helper.rb#39 - sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } - def say_error(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/helper.rb#144 - sig { params(string: ::String).returns(::String) } - def yellow(string); end -end - -# source://spoom//lib/spoom/cli/lsp.rb#10 -class Spoom::Cli::LSP < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#55 - def defs(file, line, col); end - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#65 - def find(query); end - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#41 - def hover(file, line, col); end - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#26 - def list; end - - # source://spoom//lib/spoom/cli/lsp.rb#114 - def lsp_client; end - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#85 - def refs(file, line, col); end - - # source://spoom//lib/spoom/cli/lsp.rb#137 - def run(&block); end - - # source://spoom//lib/spoom/cli/lsp.rb#16 - def show; end - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#95 - def sigs(file, line, col); end - - # source://spoom//lib/spoom/cli/lsp.rb#129 - def symbol_printer; end - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#75 - def symbols(file); end - - # source://spoom//lib/spoom/cli/lsp.rb#162 - def to_uri(path); end - - # TODO: options, filter, limit, kind etc.. filter rbi - # - # source://spoom//lib/spoom/cli/lsp.rb#105 - def types(file, line, col); end -end - -# source://spoom//lib/spoom/cli.rb#16 -class Spoom::Cli::Main < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # source://spoom//lib/spoom/cli.rb#61 - def __print_version; end - - # source://thor/1.2.1/lib/thor.rb#239 - def bump(*args); end - - # source://thor/1.2.1/lib/thor.rb#239 - def config(*args); end - - # source://thor/1.2.1/lib/thor.rb#239 - def coverage(*args); end - - # source://spoom//lib/spoom/cli.rb#43 - def files; end - - # source://thor/1.2.1/lib/thor.rb#239 - def lsp(*args); end - - # source://thor/1.2.1/lib/thor.rb#239 - def tc(*args); end - - class << self - # @return [Boolean] - # - # source://spoom//lib/spoom/cli.rb#68 - def exit_on_failure?; end - end -end - -# source://spoom//lib/spoom/cli/run.rb#6 -class Spoom::Cli::Run < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # source://spoom//lib/spoom/cli/run.rb#131 - def colorize_message(message); end - - # source://spoom//lib/spoom/cli/run.rb#122 - def format_error(error, format); end - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/run.rb#26 - def tc(*paths_to_select); end -end - -# source://spoom//lib/spoom/cli/run.rb#15 -Spoom::Cli::Run::DEFAULT_FORMAT = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/cli/run.rb#11 -Spoom::Cli::Run::SORT_CODE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/cli/run.rb#13 -Spoom::Cli::Run::SORT_ENUM = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/cli/run.rb#12 -Spoom::Cli::Run::SORT_LOC = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/colors.rb#5 -class Spoom::Color < ::T::Enum - enums do - CLEAR = new - BOLD = new - BLACK = new - RED = new - GREEN = new - YELLOW = new - BLUE = new - MAGENTA = new - CYAN = new - WHITE = new - LIGHT_BLACK = new - LIGHT_RED = new - LIGHT_GREEN = new - LIGHT_YELLOW = new - LIGHT_BLUE = new - LIGHT_MAGENTA = new - LIGHT_CYAN = new - LIGHT_WHITE = new - end - - # source://spoom//lib/spoom/colors.rb#32 - sig { returns(::String) } - def ansi_code; end -end - -# source://spoom//lib/spoom/colors.rb#37 -module Spoom::Colorize - # source://spoom//lib/spoom/colors.rb#41 - sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } - def set_color(string, *color); end -end - -# An abstraction to a Ruby project context -# -# A context maps to a directory in the file system. -# It is used to manipulate files and run commands in the context of this directory. -# -# source://spoom//lib/spoom/context/bundle.rb#5 -class Spoom::Context - include ::Spoom::Context::Bundle - include ::Spoom::Context::Exec - include ::Spoom::Context::FileSystem - include ::Spoom::Context::Git - include ::Spoom::Context::Sorbet - - # Create a new context about `absolute_path` - # - # The directory will not be created if it doesn't exist. - # Call `#make!` to create it. - # - # source://spoom//lib/spoom/context.rb#51 - sig { params(absolute_path: ::String).void } - def initialize(absolute_path); end - - # The absolute path to the directory this context is about - # - # source://spoom//lib/spoom/context.rb#44 - sig { returns(::String) } - def absolute_path; end - - class << self - # Create a new context in the system's temporary directory - # - # `name` is used as prefix to the temporary directory name. - # The directory will be created if it doesn't exist. - # - # source://spoom//lib/spoom/context.rb#37 - sig { params(name: T.nilable(::String)).returns(T.attached_class) } - def mktmp!(name = T.unsafe(nil)); end - end -end - -# Bundle features for a context -# -# source://spoom//lib/spoom/context/bundle.rb#7 -module Spoom::Context::Bundle - requires_ancestor { Spoom::Context } - - # Run a command with `bundle` in this context directory - # - # source://spoom//lib/spoom/context/bundle.rb#27 - sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } - def bundle(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end - - # Run a command `bundle exec` in this context directory - # - # source://spoom//lib/spoom/context/bundle.rb#40 - sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } - def bundle_exec(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end - - # Run `bundle install` in this context directory - # - # source://spoom//lib/spoom/context/bundle.rb#34 - sig { params(version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } - def bundle_install!(version: T.unsafe(nil), capture_err: T.unsafe(nil)); end - - # Get `gem` version from the `Gemfile.lock` content - # - # Returns `nil` if `gem` cannot be found in the Gemfile. - # - # source://spoom//lib/spoom/context/bundle.rb#48 - sig { params(gem: ::String).returns(T.nilable(::String)) } - def gem_version_from_gemfile_lock(gem); end - - # Read the `contents` of the Gemfile in this context directory - # - # source://spoom//lib/spoom/context/bundle.rb#15 - sig { returns(T.nilable(::String)) } - def read_gemfile; end - - # Set the `contents` of the Gemfile in this context directory - # - # source://spoom//lib/spoom/context/bundle.rb#21 - sig { params(contents: ::String, append: T::Boolean).void } - def write_gemfile!(contents, append: T.unsafe(nil)); end -end - -# Execution features for a context -# -# source://spoom//lib/spoom/context/exec.rb#27 -module Spoom::Context::Exec - requires_ancestor { Spoom::Context } - - # Run a command in this context directory - # - # source://spoom//lib/spoom/context/exec.rb#35 - sig { params(command: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) } - def exec(command, capture_err: T.unsafe(nil)); end -end - -# File System features for a context -# -# source://spoom//lib/spoom/context/file_system.rb#7 -module Spoom::Context::FileSystem - requires_ancestor { Spoom::Context } - - # Returns the absolute path to `relative_path` in the context's directory - # - # source://spoom//lib/spoom/context/file_system.rb#15 - sig { params(relative_path: ::String).returns(::String) } - def absolute_path_to(relative_path); end - - # Delete this context and its content - # - # Warning: it will `rm -rf` the context directory on the file system. - # - # source://spoom//lib/spoom/context/file_system.rb#88 - sig { void } - def destroy!; end - - # Does the context directory at `absolute_path` exist and is a directory? - # - # source://spoom//lib/spoom/context/file_system.rb#21 - sig { returns(T::Boolean) } - def exist?; end - - # Does `relative_path` point to an existing file in this context directory? - # - # source://spoom//lib/spoom/context/file_system.rb#48 - sig { params(relative_path: ::String).returns(T::Boolean) } - def file?(relative_path); end - - # List all files in this context matching `pattern` - # - # source://spoom//lib/spoom/context/file_system.rb#34 - sig { params(pattern: ::String).returns(T::Array[::String]) } - def glob(pattern = T.unsafe(nil)); end - - # List all files at the top level of this context directory - # - # source://spoom//lib/spoom/context/file_system.rb#42 - sig { returns(T::Array[::String]) } - def list; end - - # Create the context directory at `absolute_path` - # - # source://spoom//lib/spoom/context/file_system.rb#27 - sig { void } - def mkdir!; end - - # Move the file or directory from `from_relative_path` to `to_relative_path` - # - # source://spoom//lib/spoom/context/file_system.rb#78 - sig { params(from_relative_path: ::String, to_relative_path: ::String).void } - def move!(from_relative_path, to_relative_path); end - - # Return the contents of the file at `relative_path` in this context directory - # - # Will raise if the file doesn't exist. - # - # source://spoom//lib/spoom/context/file_system.rb#56 - sig { params(relative_path: ::String).returns(::String) } - def read(relative_path); end - - # Remove the path at `relative_path` (recursive + force) in this context directory - # - # source://spoom//lib/spoom/context/file_system.rb#72 - sig { params(relative_path: ::String).void } - def remove!(relative_path); end - - # Write `contents` in the file at `relative_path` in this context directory - # - # Append to the file if `append` is true. - # - # source://spoom//lib/spoom/context/file_system.rb#64 - sig { params(relative_path: ::String, contents: ::String, append: T::Boolean).void } - def write!(relative_path, contents = T.unsafe(nil), append: T.unsafe(nil)); end -end - -# Git features for a context -# -# source://spoom//lib/spoom/context/git.rb#35 -module Spoom::Context::Git - requires_ancestor { Spoom::Context } - - # Run a command prefixed by `git` in this context directory - # - # source://spoom//lib/spoom/context/git.rb#43 - sig { params(command: ::String).returns(::Spoom::ExecResult) } - def git(command); end - - # Run `git checkout` in this context directory - # - # source://spoom//lib/spoom/context/git.rb#62 - sig { params(ref: ::String).returns(::Spoom::ExecResult) } - def git_checkout!(ref: T.unsafe(nil)); end - - # Run `git add . && git commit` in this context directory - # - # source://spoom//lib/spoom/context/git.rb#68 - sig { params(message: ::String, time: ::Time, allow_empty: T::Boolean).void } - def git_commit!(message: T.unsafe(nil), time: T.unsafe(nil), allow_empty: T.unsafe(nil)); end - - # Get the current git branch in this context directory - # - # source://spoom//lib/spoom/context/git.rb#79 - sig { returns(T.nilable(::String)) } - def git_current_branch; end - - # Run `git diff` in this context directory - # - # source://spoom//lib/spoom/context/git.rb#88 - sig { params(arg: ::String).returns(::Spoom::ExecResult) } - def git_diff(*arg); end - - # Run `git init` in this context directory - # - # Warning: passing a branch will run `git init -b <branch>` which is only available in git 2.28+. - # In older versions, use `git_init!` followed by `git("checkout -b <branch>")`. - # - # source://spoom//lib/spoom/context/git.rb#52 - sig { params(branch: T.nilable(::String)).returns(::Spoom::ExecResult) } - def git_init!(branch: T.unsafe(nil)); end - - # Get the last commit in the currently checked out branch - # - # source://spoom//lib/spoom/context/git.rb#94 - sig { params(short_sha: T::Boolean).returns(T.nilable(::Spoom::Git::Commit)) } - def git_last_commit(short_sha: T.unsafe(nil)); end - - # source://spoom//lib/spoom/context/git.rb#105 - sig { params(arg: ::String).returns(::Spoom::ExecResult) } - def git_log(*arg); end - - # source://spoom//lib/spoom/context/git.rb#110 - sig { params(arg: ::String).returns(::Spoom::ExecResult) } - def git_show(*arg); end - - # Is there uncommited changes in this context directory? - # - # source://spoom//lib/spoom/context/git.rb#116 - sig { params(path: ::String).returns(T::Boolean) } - def git_workdir_clean?(path: T.unsafe(nil)); end -end - -# Sorbet features for a context -# -# source://spoom//lib/spoom/context/sorbet.rb#7 -module Spoom::Context::Sorbet - requires_ancestor { Spoom::Context } - - # Does this context has a `sorbet/config` file? - # - # source://spoom//lib/spoom/context/sorbet.rb#102 - sig { returns(T::Boolean) } - def has_sorbet_config?; end - - # Read the strictness sigil from the file at `relative_path` (returns `nil` if no sigil) - # - # source://spoom//lib/spoom/context/sorbet.rb#125 - sig { params(relative_path: ::String).returns(T.nilable(::String)) } - def read_file_strictness(relative_path); end - - # Read the contents of `sorbet/config` in this context directory - # - # source://spoom//lib/spoom/context/sorbet.rb#113 - sig { returns(::String) } - def read_sorbet_config; end - - # source://spoom//lib/spoom/context/sorbet.rb#107 - sig { returns(::Spoom::Sorbet::Config) } - def sorbet_config; end - - # Get the commit introducing the `sorbet/config` file - # - # source://spoom//lib/spoom/context/sorbet.rb#131 - sig { returns(T.nilable(::Spoom::Git::Commit)) } - def sorbet_intro_commit; end - - # Get the commit removing the `sorbet/config` file - # - # source://spoom//lib/spoom/context/sorbet.rb#143 - sig { returns(T.nilable(::Spoom::Git::Commit)) } - def sorbet_removal_commit; end - - # Run `bundle exec srb` in this context directory - # - # source://spoom//lib/spoom/context/sorbet.rb#15 - sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } - def srb(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end - - # List all files typechecked by Sorbet from its `config` - # - # source://spoom//lib/spoom/context/sorbet.rb#65 - sig { params(with_config: T.nilable(::Spoom::Sorbet::Config), include_rbis: T::Boolean).returns(T::Array[::String]) } - def srb_files(with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end - - # List all files typechecked by Sorbet from its `config` that matches `strictness` - # - # source://spoom//lib/spoom/context/sorbet.rb#87 - sig do - params( - strictness: ::String, - with_config: T.nilable(::Spoom::Sorbet::Config), - include_rbis: T::Boolean - ).returns(T::Array[::String]) - end - def srb_files_with_strictness(strictness, with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end - - # source://spoom//lib/spoom/context/sorbet.rb#45 - sig do - params( - arg: ::String, - sorbet_bin: T.nilable(::String), - capture_err: T::Boolean - ).returns(T.nilable(T::Hash[::String, ::Integer])) - end - def srb_metrics(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end - - # source://spoom//lib/spoom/context/sorbet.rb#33 - sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } - def srb_tc(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end - - # source://spoom//lib/spoom/context/sorbet.rb#93 - sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(T.nilable(::String)) } - def srb_version(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end - - # Set the `contents` of `sorbet/config` in this context directory - # - # source://spoom//lib/spoom/context/sorbet.rb#119 - sig { params(contents: ::String, append: T::Boolean).void } - def write_sorbet_config!(contents, append: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/snapshot.rb#5 -module Spoom::Coverage - class << self - # source://spoom//lib/spoom/coverage.rb#103 - sig { params(context: ::Spoom::Context).returns(::Spoom::FileTree) } - def file_tree(context); end - - # source://spoom//lib/spoom/coverage.rb#83 - sig do - params( - context: ::Spoom::Context, - snapshots: T::Array[::Spoom::Coverage::Snapshot], - palette: ::Spoom::Coverage::D3::ColorPalette - ).returns(::Spoom::Coverage::Report) - end - def report(context, snapshots, palette:); end - - # source://spoom//lib/spoom/coverage.rb#16 - sig do - params( - context: ::Spoom::Context, - rbi: T::Boolean, - sorbet_bin: T.nilable(::String) - ).returns(::Spoom::Coverage::Snapshot) - end - def snapshot(context, rbi: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end - end -end - -# source://spoom//lib/spoom/coverage/report.rb#88 -module Spoom::Coverage::Cards; end - -# source://spoom//lib/spoom/coverage/report.rb#89 -class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template - # source://spoom//lib/spoom/coverage/report.rb#98 - sig { params(template: ::String, title: T.nilable(::String), body: T.nilable(::String)).void } - def initialize(template: T.unsafe(nil), title: T.unsafe(nil), body: T.unsafe(nil)); end - - # @return [String, nil] - # - # source://spoom//lib/spoom/coverage/report.rb#95 - def body; end - - # source://spoom//lib/spoom/coverage/report.rb#95 - sig { returns(T.nilable(::String)) } - def title; end -end - -# source://spoom//lib/spoom/coverage/report.rb#92 -Spoom::Coverage::Cards::Card::TEMPLATE = T.let(T.unsafe(nil), String) - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/report.rb#105 -class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card - abstract! - - # source://spoom//lib/spoom/coverage/report.rb#112 - sig { void } - def initialize; end - - # @abstract - # - # source://spoom//lib/spoom/coverage/report.rb#120 - sig { abstract.returns(::String) } - def erb; end - - # source://spoom//lib/spoom/coverage/report.rb#115 - sig { override.returns(::String) } - def html; end -end - -# source://spoom//lib/spoom/coverage/report.rb#153 -class Spoom::Coverage::Cards::Map < ::Spoom::Coverage::Cards::Card - # source://spoom//lib/spoom/coverage/report.rb#164 - sig do - params( - file_tree: ::Spoom::FileTree, - nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], - nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float], - title: ::String - ).void - end - def initialize(file_tree:, nodes_strictnesses:, nodes_strictness_scores:, title: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/report.rb#123 -class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card - # source://spoom//lib/spoom/coverage/report.rb#132 - sig { params(snapshot: ::Spoom::Coverage::Snapshot, title: ::String).void } - def initialize(snapshot:, title: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/report.rb#143 - sig { returns(::Spoom::Coverage::D3::Pie::Calls) } - def pie_calls; end - - # source://spoom//lib/spoom/coverage/report.rb#138 - sig { returns(::Spoom::Coverage::D3::Pie::Sigils) } - def pie_sigils; end - - # source://spoom//lib/spoom/coverage/report.rb#148 - sig { returns(::Spoom::Coverage::D3::Pie::Sigs) } - def pie_sigs; end - - # source://spoom//lib/spoom/coverage/report.rb#129 - sig { returns(::Spoom::Coverage::Snapshot) } - def snapshot; end -end - -# source://spoom//lib/spoom/coverage/report.rb#126 -Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/coverage/report.rb#240 -class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb - # source://spoom//lib/spoom/coverage/report.rb#244 - sig { params(sorbet_intro_commit: T.nilable(::String), sorbet_intro_date: T.nilable(::Time)).void } - def initialize(sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/report.rb#250 - sig { override.returns(::String) } - def erb; end -end - -# source://spoom//lib/spoom/coverage/report.rb#177 -class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card - # source://spoom//lib/spoom/coverage/report.rb#181 - sig { params(title: ::String, timeline: ::Spoom::Coverage::D3::Timeline).void } - def initialize(title:, timeline:); end -end - -# source://spoom//lib/spoom/coverage/report.rb#194 -class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeline - # source://spoom//lib/spoom/coverage/report.rb#198 - sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/report.rb#212 -class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timeline - # source://spoom//lib/spoom/coverage/report.rb#216 - sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/report.rb#230 -class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Timeline - # source://spoom//lib/spoom/coverage/report.rb#234 - sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/report.rb#185 -class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timeline - # source://spoom//lib/spoom/coverage/report.rb#189 - sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/report.rb#203 -class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timeline - # source://spoom//lib/spoom/coverage/report.rb#207 - sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/report.rb#221 -class Spoom::Coverage::Cards::Timeline::Versions < ::Spoom::Coverage::Cards::Timeline - # source://spoom//lib/spoom/coverage/report.rb#225 - sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } - def initialize(snapshots:, title: T.unsafe(nil)); end -end - -# source://spoom//lib/spoom/coverage/d3/base.rb#6 -module Spoom::Coverage::D3 - class << self - # source://spoom//lib/spoom/coverage/d3.rb#61 - sig { params(palette: ::Spoom::Coverage::D3::ColorPalette).returns(::String) } - def header_script(palette); end - - # source://spoom//lib/spoom/coverage/d3.rb#21 - sig { returns(::String) } - def header_style; end - end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/d3/base.rb#7 -class Spoom::Coverage::D3::Base - abstract! - - # source://spoom//lib/spoom/coverage/d3/base.rb#17 - sig { params(id: ::String, data: T.untyped).void } - def initialize(id, data); end - - # source://spoom//lib/spoom/coverage/d3/base.rb#37 - sig { returns(::String) } - def html; end - - # source://spoom//lib/spoom/coverage/d3/base.rb#14 - sig { returns(::String) } - def id; end - - # @abstract - # - # source://spoom//lib/spoom/coverage/d3/base.rb#50 - sig { abstract.returns(::String) } - def script; end - - # source://spoom//lib/spoom/coverage/d3/base.rb#45 - sig { returns(::String) } - def tooltip; end - - class << self - # source://spoom//lib/spoom/coverage/d3/base.rb#31 - sig { returns(::String) } - def header_script; end - - # source://spoom//lib/spoom/coverage/d3/base.rb#26 - sig { returns(::String) } - def header_style; end - end -end - -# source://spoom//lib/spoom/coverage/d3.rb#12 -Spoom::Coverage::D3::COLOR_FALSE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/coverage/d3.rb#11 -Spoom::Coverage::D3::COLOR_IGNORE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/coverage/d3.rb#14 -Spoom::Coverage::D3::COLOR_STRICT = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/coverage/d3.rb#15 -Spoom::Coverage::D3::COLOR_STRONG = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/coverage/d3.rb#13 -Spoom::Coverage::D3::COLOR_TRUE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/coverage/d3/circle_map.rb#9 -class Spoom::Coverage::D3::CircleMap < ::Spoom::Coverage::D3::Base - # source://spoom//lib/spoom/coverage/d3/circle_map.rb#59 - sig { override.returns(::String) } - def script; end - - class << self - # source://spoom//lib/spoom/coverage/d3/circle_map.rb#40 - sig { returns(::String) } - def header_script; end - - # source://spoom//lib/spoom/coverage/d3/circle_map.rb#14 - sig { returns(::String) } - def header_style; end - end -end - -# source://spoom//lib/spoom/coverage/d3/circle_map.rb#148 -class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap - # source://spoom//lib/spoom/coverage/d3/circle_map.rb#159 - sig do - params( - id: ::String, - file_tree: ::Spoom::FileTree, - nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], - nodes_scores: T::Hash[::Spoom::FileTree::Node, ::Float] - ).void - end - def initialize(id, file_tree, nodes_strictnesses, nodes_scores); end - - # source://spoom//lib/spoom/coverage/d3/circle_map.rb#166 - sig { params(node: ::Spoom::FileTree::Node).returns(T::Hash[::Symbol, T.untyped]) } - def tree_node_to_json(node); end -end - -# source://spoom//lib/spoom/coverage/d3.rb#103 -class Spoom::Coverage::D3::ColorPalette < ::T::Struct - prop :ignore, ::String - prop :false, ::String - prop :true, ::String - prop :strict, ::String - prop :strong, ::String - - class << self - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/d3/pie.rb#9 -class Spoom::Coverage::D3::Pie < ::Spoom::Coverage::D3::Base - abstract! - - # source://spoom//lib/spoom/coverage/d3/pie.rb#16 - sig { params(id: ::String, title: ::String, data: T.untyped).void } - def initialize(id, title, data); end - - # source://spoom//lib/spoom/coverage/d3/pie.rb#56 - sig { override.returns(::String) } - def script; end - - class << self - # source://spoom//lib/spoom/coverage/d3/pie.rb#43 - sig { returns(::String) } - def header_script; end - - # source://spoom//lib/spoom/coverage/d3/pie.rb#25 - sig { returns(::String) } - def header_style; end - end -end - -# source://spoom//lib/spoom/coverage/d3/pie.rb#141 -class Spoom::Coverage::D3::Pie::Calls < ::Spoom::Coverage::D3::Pie - # source://spoom//lib/spoom/coverage/d3/pie.rb#145 - sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } - def initialize(id, title, snapshot); end - - # source://spoom//lib/spoom/coverage/d3/pie.rb#150 - sig { override.returns(::String) } - def tooltip; end -end - -# source://spoom//lib/spoom/coverage/d3/pie.rb#123 -class Spoom::Coverage::D3::Pie::Sigils < ::Spoom::Coverage::D3::Pie - # source://spoom//lib/spoom/coverage/d3/pie.rb#127 - sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } - def initialize(id, title, snapshot); end - - # source://spoom//lib/spoom/coverage/d3/pie.rb#132 - sig { override.returns(::String) } - def tooltip; end -end - -# source://spoom//lib/spoom/coverage/d3/pie.rb#159 -class Spoom::Coverage::D3::Pie::Sigs < ::Spoom::Coverage::D3::Pie - # source://spoom//lib/spoom/coverage/d3/pie.rb#163 - sig { params(id: ::String, title: ::String, snapshot: ::Spoom::Coverage::Snapshot).void } - def initialize(id, title, snapshot); end - - # source://spoom//lib/spoom/coverage/d3/pie.rb#172 - sig { override.returns(::String) } - def tooltip; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/d3/timeline.rb#9 -class Spoom::Coverage::D3::Timeline < ::Spoom::Coverage::D3::Base - abstract! - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#16 - sig { params(id: ::String, data: T.untyped, keys: T::Array[::String]).void } - def initialize(id, data, keys); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#187 - sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) } - def area(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#203 - sig { params(y: ::String, color: ::String, curve: ::String).returns(::String) } - def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end - - # @abstract - # - # source://spoom//lib/spoom/coverage/d3/timeline.rb#126 - sig { abstract.returns(::String) } - def plot; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#217 - sig { params(y: ::String).returns(::String) } - def points(y:); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#101 - sig { override.returns(::String) } - def script; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#129 - sig { returns(::String) } - def x_scale; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#145 - sig { returns(::String) } - def x_ticks; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#158 - sig { params(min: ::String, max: ::String, ticks: ::String).returns(::String) } - def y_scale(min:, max:, ticks:); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#174 - sig { params(ticks: ::String, format: ::String, padding: ::Integer).returns(::String) } - def y_ticks(ticks:, format:, padding:); end - - class << self - # source://spoom//lib/spoom/coverage/d3/timeline.rb#79 - sig { returns(::String) } - def header_script; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#25 - sig { returns(::String) } - def header_style; end - end -end - -# source://spoom//lib/spoom/coverage/d3/timeline.rb#448 -class Spoom::Coverage::D3::Timeline::Calls < ::Spoom::Coverage::D3::Timeline::Stacked - # source://spoom//lib/spoom/coverage/d3/timeline.rb#452 - sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#466 - sig { override.returns(::String) } - def tooltip; end -end - -# source://spoom//lib/spoom/coverage/d3/timeline.rb#505 -class Spoom::Coverage::D3::Timeline::RBIs < ::Spoom::Coverage::D3::Timeline::Stacked - # source://spoom//lib/spoom/coverage/d3/timeline.rb#509 - sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#577 - sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) } - def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#617 - sig { override.returns(::String) } - def plot; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#537 - sig { override.returns(::String) } - def script; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#523 - sig { override.returns(::String) } - def tooltip; end -end - -# source://spoom//lib/spoom/coverage/d3/timeline.rb#282 -class Spoom::Coverage::D3::Timeline::Runtimes < ::Spoom::Coverage::D3::Timeline - # source://spoom//lib/spoom/coverage/d3/timeline.rb#286 - sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#311 - sig { override.returns(::String) } - def plot; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#298 - sig { override.returns(::String) } - def tooltip; end -end - -# source://spoom//lib/spoom/coverage/d3/timeline.rb#421 -class Spoom::Coverage::D3::Timeline::Sigils < ::Spoom::Coverage::D3::Timeline::Stacked - # source://spoom//lib/spoom/coverage/d3/timeline.rb#425 - sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#439 - sig { override.returns(::String) } - def tooltip; end -end - -# source://spoom//lib/spoom/coverage/d3/timeline.rb#475 -class Spoom::Coverage::D3::Timeline::Sigs < ::Spoom::Coverage::D3::Timeline::Stacked - # source://spoom//lib/spoom/coverage/d3/timeline.rb#479 - sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#496 - sig { override.returns(::String) } - def tooltip; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/d3/timeline.rb#329 -class Spoom::Coverage::D3::Timeline::Stacked < ::Spoom::Coverage::D3::Timeline - abstract! - - # source://sorbet-runtime/0.5.10761/lib/types/private/abstract/declare.rb#37 - def initialize(*args, **_arg1, &blk); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#388 - sig { override.params(y: ::String, color: ::String, curve: ::String).returns(::String) } - def line(y:, color: T.unsafe(nil), curve: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#377 - sig { override.returns(::String) } - def plot; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#336 - sig { override.returns(::String) } - def script; end -end - -# source://spoom//lib/spoom/coverage/d3/timeline.rb#232 -class Spoom::Coverage::D3::Timeline::Versions < ::Spoom::Coverage::D3::Timeline - # source://spoom//lib/spoom/coverage/d3/timeline.rb#236 - sig { params(id: ::String, snapshots: T::Array[::Spoom::Coverage::Snapshot]).void } - def initialize(id, snapshots); end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#263 - sig { override.returns(::String) } - def plot; end - - # source://spoom//lib/spoom/coverage/d3/timeline.rb#249 - sig { override.returns(::String) } - def tooltip; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/report.rb#38 -class Spoom::Coverage::Page < ::Spoom::Coverage::Template - abstract! - - # source://spoom//lib/spoom/coverage/report.rb#53 - sig { params(title: ::String, palette: ::Spoom::Coverage::D3::ColorPalette, template: ::String).void } - def initialize(title:, palette:, template: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/report.rb#75 - sig { returns(::String) } - def body_html; end - - # @abstract - # - # source://spoom//lib/spoom/coverage/report.rb#80 - sig { abstract.returns(T::Array[::Spoom::Coverage::Cards::Card]) } - def cards; end - - # source://spoom//lib/spoom/coverage/report.rb#83 - sig { returns(::String) } - def footer_html; end - - # source://spoom//lib/spoom/coverage/report.rb#70 - sig { returns(::String) } - def header_html; end - - # source://spoom//lib/spoom/coverage/report.rb#65 - sig { returns(::String) } - def header_script; end - - # source://spoom//lib/spoom/coverage/report.rb#60 - sig { returns(::String) } - def header_style; end - - # source://spoom//lib/spoom/coverage/report.rb#50 - sig { returns(::Spoom::Coverage::D3::ColorPalette) } - def palette; end - - # source://spoom//lib/spoom/coverage/report.rb#47 - sig { returns(::String) } - def title; end -end - -# source://spoom//lib/spoom/coverage/report.rb#44 -Spoom::Coverage::Page::TEMPLATE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/coverage/report.rb#261 -class Spoom::Coverage::Report < ::Spoom::Coverage::Page - # source://spoom//lib/spoom/coverage/report.rb#276 - sig do - params( - project_name: ::String, - palette: ::Spoom::Coverage::D3::ColorPalette, - snapshots: T::Array[::Spoom::Coverage::Snapshot], - file_tree: ::Spoom::FileTree, - nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], - nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float], - sorbet_intro_commit: T.nilable(::String), - sorbet_intro_date: T.nilable(::Time) - ).void - end - def initialize(project_name:, palette:, snapshots:, file_tree:, nodes_strictnesses:, nodes_strictness_scores:, sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/report.rb#308 - sig { override.returns(T::Array[::Spoom::Coverage::Cards::Card]) } - def cards; end - - # source://spoom//lib/spoom/coverage/report.rb#297 - sig { override.returns(::String) } - def header_html; end -end - -# source://spoom//lib/spoom/coverage/snapshot.rb#6 -class Spoom::Coverage::Snapshot < ::T::Struct - prop :timestamp, ::Integer, default: T.unsafe(nil) - prop :version_static, T.nilable(::String), default: T.unsafe(nil) - prop :version_runtime, T.nilable(::String), default: T.unsafe(nil) - prop :duration, ::Integer, default: T.unsafe(nil) - prop :commit_sha, T.nilable(::String), default: T.unsafe(nil) - prop :commit_timestamp, T.nilable(::Integer), default: T.unsafe(nil) - prop :files, ::Integer, default: T.unsafe(nil) - prop :rbi_files, ::Integer, default: T.unsafe(nil) - prop :modules, ::Integer, default: T.unsafe(nil) - prop :classes, ::Integer, default: T.unsafe(nil) - prop :singleton_classes, ::Integer, default: T.unsafe(nil) - prop :methods_without_sig, ::Integer, default: T.unsafe(nil) - prop :methods_with_sig, ::Integer, default: T.unsafe(nil) - prop :calls_untyped, ::Integer, default: T.unsafe(nil) - prop :calls_typed, ::Integer, default: T.unsafe(nil) - prop :sigils, T::Hash[::String, ::Integer], default: T.unsafe(nil) - prop :methods_with_sig_excluding_rbis, ::Integer, default: T.unsafe(nil) - prop :methods_without_sig_excluding_rbis, ::Integer, default: T.unsafe(nil) - prop :sigils_excluding_rbis, T::Hash[::String, ::Integer], default: T.unsafe(nil) - - # source://spoom//lib/spoom/coverage/snapshot.rb#33 - sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } - def print(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end - - # source://spoom//lib/spoom/coverage/snapshot.rb#39 - sig { params(arg: T.untyped).returns(::String) } - def to_json(*arg); end - - class << self - # source://spoom//lib/spoom/coverage/snapshot.rb#47 - sig { params(json: ::String).returns(::Spoom::Coverage::Snapshot) } - def from_json(json); end - - # source://spoom//lib/spoom/coverage/snapshot.rb#52 - sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } - def from_obj(obj); end - - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# The strictness name as found in the Sorbet metrics file -# -# source://spoom//lib/spoom/coverage/snapshot.rb#30 -Spoom::Coverage::Snapshot::STRICTNESSES = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/coverage/snapshot.rb#95 -class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer - # source://spoom//lib/spoom/coverage/snapshot.rb#99 - sig { params(snapshot: ::Spoom::Coverage::Snapshot).void } - def print_snapshot(snapshot); end - - private - - # source://spoom//lib/spoom/coverage/snapshot.rb#158 - sig { params(value: T.nilable(::Integer), total: T.nilable(::Integer)).returns(::String) } - def percent(value, total); end - - # source://spoom//lib/spoom/coverage/snapshot.rb#147 - sig { params(hash: T::Hash[::String, ::Integer], total: ::Integer).void } - def print_map(hash, total); end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/report.rb#10 -class Spoom::Coverage::Template - abstract! - - # Create a new template from an Erb file path - # - # source://spoom//lib/spoom/coverage/report.rb#18 - sig { params(template: ::String).void } - def initialize(template:); end - - # source://spoom//lib/spoom/coverage/report.rb#23 - sig { returns(::String) } - def erb; end - - # source://spoom//lib/spoom/coverage/report.rb#33 - sig { returns(::Binding) } - def get_binding; end - - # source://spoom//lib/spoom/coverage/report.rb#28 - sig { returns(::String) } - def html; end -end - -# source://spoom//lib/spoom.rb#12 -class Spoom::Error < ::StandardError; end - -# source://spoom//lib/spoom/context/exec.rb#5 -class Spoom::ExecResult < ::T::Struct - const :out, ::String - const :err, T.nilable(::String) - const :status, T::Boolean - const :exit_code, ::Integer - - # source://spoom//lib/spoom/context/exec.rb#14 - sig { returns(::String) } - def to_s; end - - class << self - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://spoom//lib/spoom/file_collector.rb#5 -class Spoom::FileCollector - # Initialize a new file collector - # - # If `allow_extensions` is empty, all files are collected. - # If `allow_extensions` is an array of extensions, only files with one of these extensions are collected. - # - # source://spoom//lib/spoom/file_collector.rb#21 - sig { params(allow_extensions: T::Array[::String], exclude_patterns: T::Array[::String]).void } - def initialize(allow_extensions: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end - - # source://spoom//lib/spoom/file_collector.rb#9 - sig { returns(T::Array[::String]) } - def files; end - - # source://spoom//lib/spoom/file_collector.rb#33 - sig { params(path: ::String).void } - def visit_path(path); end - - # source://spoom//lib/spoom/file_collector.rb#28 - sig { params(paths: T::Array[::String]).void } - def visit_paths(paths); end - - private - - # source://spoom//lib/spoom/file_collector.rb#50 - sig { params(path: ::String).returns(::String) } - def clean_path(path); end - - # source://spoom//lib/spoom/file_collector.rb#67 - sig { params(path: ::String).returns(T::Boolean) } - def excluded_file?(path); end - - # source://spoom//lib/spoom/file_collector.rb#75 - sig { params(path: ::String).returns(T::Boolean) } - def excluded_path?(path); end - - # source://spoom//lib/spoom/file_collector.rb#62 - sig { params(path: ::String).void } - def visit_directory(path); end - - # source://spoom//lib/spoom/file_collector.rb#55 - sig { params(path: ::String).void } - def visit_file(path); end -end - -# Build a file hierarchy from a set of file paths. -# -# source://spoom//lib/spoom/file_tree.rb#6 -class Spoom::FileTree - # source://spoom//lib/spoom/file_tree.rb#10 - sig { params(paths: T::Enumerable[::String]).void } - def initialize(paths = T.unsafe(nil)); end - - # Add a `path` to the tree - # - # This will create all nodes until the root of `path`. - # - # source://spoom//lib/spoom/file_tree.rb#25 - sig { params(path: ::String).returns(::Spoom::FileTree::Node) } - def add_path(path); end - - # Add all `paths` to the tree - # - # source://spoom//lib/spoom/file_tree.rb#17 - sig { params(paths: T::Enumerable[::String]).void } - def add_paths(paths); end - - # All the nodes in this tree - # - # source://spoom//lib/spoom/file_tree.rb#45 - sig { returns(T::Array[::Spoom::FileTree::Node]) } - def nodes; end - - # Return a map of typing scores for each node in the tree - # - # source://spoom//lib/spoom/file_tree.rb#67 - sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } - def nodes_strictness_scores(context); end - - # Return a map of strictnesses for each node in the tree - # - # source://spoom//lib/spoom/file_tree.rb#59 - sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } - def nodes_strictnesses(context); end - - # All the paths in this tree - # - # source://spoom//lib/spoom/file_tree.rb#53 - sig { returns(T::Array[::String]) } - def paths; end - - # Return a map of typing scores for each path in the tree - # - # source://spoom//lib/spoom/file_tree.rb#75 - sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) } - def paths_strictness_scores(context); end - - # source://spoom//lib/spoom/file_tree.rb#80 - sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean).void } - def print(out: T.unsafe(nil), colors: T.unsafe(nil)); end - - # source://spoom//lib/spoom/file_tree.rb#86 - sig { params(context: ::Spoom::Context, out: T.any(::IO, ::StringIO), colors: T::Boolean).void } - def print_with_strictnesses(context, out: T.unsafe(nil), colors: T.unsafe(nil)); end - - # All root nodes - # - # source://spoom//lib/spoom/file_tree.rb#39 - sig { returns(T::Array[::Spoom::FileTree::Node]) } - def roots; end -end - -# A visitor that collects all the nodes in a tree -# -# source://spoom//lib/spoom/file_tree.rb#140 -class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor - # source://spoom//lib/spoom/file_tree.rb#147 - sig { void } - def initialize; end - - # source://spoom//lib/spoom/file_tree.rb#144 - sig { returns(T::Array[::Spoom::FileTree::Node]) } - def nodes; end - - # source://spoom//lib/spoom/file_tree.rb#153 - sig { override.params(node: ::Spoom::FileTree::Node).void } - def visit_node(node); end -end - -# A visitor that collects the typing score of each node in a tree -# -# source://spoom//lib/spoom/file_tree.rb#183 -class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses - # source://spoom//lib/spoom/file_tree.rb#190 - sig { params(context: ::Spoom::Context).void } - def initialize(context); end - - # source://spoom//lib/spoom/file_tree.rb#187 - sig { returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } - def scores; end - - # source://spoom//lib/spoom/file_tree.rb#197 - sig { override.params(node: ::Spoom::FileTree::Node).void } - def visit_node(node); end - - private - - # source://spoom//lib/spoom/file_tree.rb#206 - sig { params(node: ::Spoom::FileTree::Node).returns(::Float) } - def node_score(node); end - - # source://spoom//lib/spoom/file_tree.rb#215 - sig { params(strictness: T.nilable(::String)).returns(::Float) } - def strictness_score(strictness); end -end - -# A visitor that collects the strictness of each node in a tree -# -# source://spoom//lib/spoom/file_tree.rb#160 -class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor - # source://spoom//lib/spoom/file_tree.rb#167 - sig { params(context: ::Spoom::Context).void } - def initialize(context); end - - # source://spoom//lib/spoom/file_tree.rb#164 - sig { returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } - def strictnesses; end - - # source://spoom//lib/spoom/file_tree.rb#174 - sig { override.params(node: ::Spoom::FileTree::Node).void } - def visit_node(node); end -end - -# A node representing either a file or a directory inside a FileTree -# -# source://spoom//lib/spoom/file_tree.rb#94 -class Spoom::FileTree::Node < ::T::Struct - const :parent, T.nilable(::Spoom::FileTree::Node) - const :name, ::String - const :children, T::Hash[::String, ::Spoom::FileTree::Node], default: T.unsafe(nil) - - # Full path to this node from root - # - # source://spoom//lib/spoom/file_tree.rb#108 - sig { returns(::String) } - def path; end - - class << self - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# An internal class used to print a FileTree -# -# See `FileTree#print` -# -# source://spoom//lib/spoom/file_tree.rb#228 -class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor - # source://spoom//lib/spoom/file_tree.rb#238 - sig do - params( - strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], - out: T.any(::IO, ::StringIO), - colors: T::Boolean - ).void - end - def initialize(strictnesses, out: T.unsafe(nil), colors: T.unsafe(nil)); end - - # source://spoom//lib/spoom/file_tree.rb#246 - sig { override.params(node: ::Spoom::FileTree::Node).void } - def visit_node(node); end - - private - - # source://spoom//lib/spoom/file_tree.rb#271 - sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) } - def strictness_color(strictness); end -end - -# An abstract visitor for FileTree -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/file_tree.rb#117 -class Spoom::FileTree::Visitor - abstract! - - # source://sorbet-runtime/0.5.10761/lib/types/private/abstract/declare.rb#37 - def initialize(*args, **_arg1, &blk); end - - # source://spoom//lib/spoom/file_tree.rb#129 - sig { params(node: ::Spoom::FileTree::Node).void } - def visit_node(node); end - - # source://spoom//lib/spoom/file_tree.rb#134 - sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void } - def visit_nodes(nodes); end - - # source://spoom//lib/spoom/file_tree.rb#124 - sig { params(tree: ::Spoom::FileTree).void } - def visit_tree(tree); end -end - -# source://spoom//lib/spoom/context/git.rb#5 -module Spoom::Git; end - -# source://spoom//lib/spoom/context/git.rb#6 -class Spoom::Git::Commit < ::T::Struct - const :sha, ::String - const :time, ::Time - - # source://spoom//lib/spoom/context/git.rb#27 - sig { returns(::Integer) } - def timestamp; end - - class << self - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - - # Parse a line formated as `%h %at` into a `Commit` - # - # source://spoom//lib/spoom/context/git.rb#14 - sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) } - def parse_line(string); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/base.rb#5 -module Spoom::LSP; end - -# source://spoom//lib/spoom/sorbet/lsp.rb#13 -class Spoom::LSP::Client - # source://spoom//lib/spoom/sorbet/lsp.rb#17 - sig { params(sorbet_bin: ::String, sorbet_args: ::String, path: ::String).void } - def initialize(sorbet_bin, *sorbet_args, path: T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#229 - sig { void } - def close; end - - # source://spoom//lib/spoom/sorbet/lsp.rb#131 - sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } - def definitions(uri, line, column); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#212 - sig { params(uri: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } - def document_symbols(uri); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#89 - sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T.nilable(::Spoom::LSP::Hover)) } - def hover(uri, line, column); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#27 - sig { returns(::Integer) } - def next_id; end - - # LSP requests - # - # @raise [Error::AlreadyOpen] - # - # source://spoom//lib/spoom/sorbet/lsp.rb#72 - sig { params(workspace_path: ::String).void } - def open(workspace_path); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#54 - sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) } - def read; end - - # @raise [Error::BadHeaders] - # - # source://spoom//lib/spoom/sorbet/lsp.rb#43 - sig { returns(T.nilable(::String)) } - def read_raw; end - - # source://spoom//lib/spoom/sorbet/lsp.rb#173 - sig do - params( - uri: ::String, - line: ::Integer, - column: ::Integer, - include_decl: T::Boolean - ).returns(T::Array[::Spoom::LSP::Location]) - end - def references(uri, line, column, include_decl = T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#37 - sig { params(message: ::Spoom::LSP::Message).returns(T.nilable(T::Hash[T.untyped, T.untyped])) } - def send(message); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#32 - sig { params(json_string: ::String).void } - def send_raw(json_string); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#110 - sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::SignatureHelp]) } - def signatures(uri, line, column); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#197 - sig { params(query: ::String).returns(T::Array[::Spoom::LSP::DocumentSymbol]) } - def symbols(query); end - - # source://spoom//lib/spoom/sorbet/lsp.rb#152 - sig { params(uri: ::String, line: ::Integer, column: ::Integer).returns(T::Array[::Spoom::LSP::Location]) } - def type_definitions(uri, line, column); end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#178 -class Spoom::LSP::Diagnostic < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :range, ::Spoom::LSP::Range - const :code, ::Integer - const :message, ::String - const :informations, ::Object - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#202 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#207 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#191 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } - def from_json(json); end - - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#212 -class Spoom::LSP::DocumentSymbol < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :name, ::String - const :detail, T.nilable(::String) - const :kind, ::Integer - const :location, T.nilable(::Spoom::LSP::Location) - const :range, T.nilable(::Spoom::LSP::Range) - const :children, T::Array[::Spoom::LSP::DocumentSymbol] - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#240 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#272 - sig { returns(::String) } - def kind_string; end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#267 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#227 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } - def from_json(json); end - - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#276 -Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash) - -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#6 -class Spoom::LSP::Error < ::StandardError; end - -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#7 -class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end - -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#8 -class Spoom::LSP::Error::BadHeaders < ::Spoom::LSP::Error; end - -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#10 -class Spoom::LSP::Error::Diagnostics < ::Spoom::LSP::Error - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#32 - sig { params(uri: ::String, diagnostics: T::Array[::Spoom::LSP::Diagnostic]).void } - def initialize(uri, diagnostics); end - - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#17 - sig { returns(T::Array[::Spoom::LSP::Diagnostic]) } - def diagnostics; end - - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#14 - sig { returns(::String) } - def uri; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#23 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Error::Diagnostics) } - def from_json(json); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#19 -class Spoom::LSP::Hover < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :contents, ::String - const :range, T.nilable(T::Range[T.untyped]) - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#39 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#45 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#30 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } - def from_json(json); end - - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#112 -class Spoom::LSP::Location < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :uri, ::String - const :range, ::Spoom::LSP::Range - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#132 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#138 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#123 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } - def from_json(json); end - - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# A general message as defined by JSON-RPC. -# -# The language server protocol always uses `"2.0"` as the `jsonrpc` version. -# -# source://spoom//lib/spoom/sorbet/lsp/base.rb#12 -class Spoom::LSP::Message - # source://spoom//lib/spoom/sorbet/lsp/base.rb#19 - sig { void } - def initialize; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#24 - sig { returns(T::Hash[T.untyped, T.untyped]) } - def as_json; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#16 - sig { returns(::String) } - def jsonrpc; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#32 - sig { params(args: T.untyped).returns(::String) } - def to_json(*args); end -end - -# A notification message. -# -# A processed notification message must not send a response back. They work like events. -# -# source://spoom//lib/spoom/sorbet/lsp/base.rb#64 -class Spoom::LSP::Notification < ::Spoom::LSP::Message - # source://spoom//lib/spoom/sorbet/lsp/base.rb#74 - sig { params(method: ::String, params: T::Hash[T.untyped, T.untyped]).void } - def initialize(method, params); end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#68 - sig { returns(::String) } - def method; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#71 - sig { returns(T::Hash[T.untyped, T.untyped]) } - def params; end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#50 -class Spoom::LSP::Position < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :line, ::Integer - const :char, ::Integer - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#70 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#75 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#61 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } - def from_json(json); end - - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# @abstract Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#9 -module Spoom::LSP::PrintableSymbol - interface! - - # @abstract - # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#16 - sig { abstract.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#80 -class Spoom::LSP::Range < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :start, ::Spoom::LSP::Position - const :end, ::Spoom::LSP::Position - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#100 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#107 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#91 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } - def from_json(json); end - - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# A request message to describe a request between the client and the server. -# -# Every processed request must send a response back to the sender of the request. -# -# source://spoom//lib/spoom/sorbet/lsp/base.rb#40 -class Spoom::LSP::Request < ::Spoom::LSP::Message - # source://spoom//lib/spoom/sorbet/lsp/base.rb#53 - sig { params(id: ::Integer, method: ::String, params: T::Hash[T.untyped, T.untyped]).void } - def initialize(id, method, params); end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#44 - sig { returns(::Integer) } - def id; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#47 - sig { returns(::String) } - def method; end - - # source://spoom//lib/spoom/sorbet/lsp/base.rb#50 - sig { returns(T::Hash[T.untyped, T.untyped]) } - def params; end -end - -# source://spoom//lib/spoom/sorbet/lsp/errors.rb#40 -class Spoom::LSP::ResponseError < ::Spoom::LSP::Error - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#63 - sig { params(code: ::Integer, message: ::String, data: T::Hash[T.untyped, T.untyped]).void } - def initialize(code, message, data); end - - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#44 - sig { returns(::Integer) } - def code; end - - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#47 - sig { returns(T::Hash[T.untyped, T.untyped]) } - def data; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/errors.rb#53 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::ResponseError) } - def from_json(json); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#143 -class Spoom::LSP::SignatureHelp < ::T::Struct - include ::Spoom::LSP::PrintableSymbol - - const :label, T.nilable(::String) - const :doc, ::Object - const :params, T::Array[T.untyped] - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#165 - sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } - def accept_printer(printer); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#173 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#155 - sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } - def from_json(json); end - - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#309 -class Spoom::LSP::SymbolPrinter < ::Spoom::Printer - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#326 - sig do - params( - out: T.any(::IO, ::StringIO), - colors: T::Boolean, - indent_level: ::Integer, - prefix: T.nilable(::String) - ).void - end - def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil), prefix: T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#348 - sig { params(uri: ::String).returns(::String) } - def clean_uri(uri); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316 - sig { returns(T.nilable(::String)) } - def prefix; end - - # @return [String, nil] - # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#316 - def prefix=(_arg0); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#356 - sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } - def print_list(objects); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#336 - sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void } - def print_object(object); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#343 - sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } - def print_objects(objects); end - - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313 - sig { returns(T::Set[::Integer]) } - def seen; end - - # @return [Set<Integer>] - # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313 - def seen=(_arg0); end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/printer.rb#7 -class Spoom::Printer - include ::Spoom::Colorize - - abstract! - - # source://spoom//lib/spoom/printer.rb#19 - sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } - def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end - - # Colorize `string` with color if `@colors` - # - # source://spoom//lib/spoom/printer.rb#80 - sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } - def colorize(string, *color); end - - # Decrease indent level - # - # source://spoom//lib/spoom/printer.rb#33 - sig { void } - def dedent; end - - # Increase indent level - # - # source://spoom//lib/spoom/printer.rb#27 - sig { void } - def indent; end - - # source://spoom//lib/spoom/printer.rb#16 - sig { returns(T.any(::IO, ::StringIO)) } - def out; end - - # @return [IO, StringIO] - # - # source://spoom//lib/spoom/printer.rb#16 - def out=(_arg0); end - - # Print `string` into `out` - # - # source://spoom//lib/spoom/printer.rb#39 - sig { params(string: T.nilable(::String)).void } - def print(string); end - - # Print `string` colored with `color` into `out` - # - # Does not use colors unless `@colors`. - # - # source://spoom//lib/spoom/printer.rb#49 - sig { params(string: T.nilable(::String), color: ::Spoom::Color).void } - def print_colored(string, *color); end - - # Print `string` with indent and newline - # - # source://spoom//lib/spoom/printer.rb#64 - sig { params(string: T.nilable(::String)).void } - def printl(string); end - - # Print a new line into `out` - # - # source://spoom//lib/spoom/printer.rb#58 - sig { void } - def printn; end - - # Print an indent space into `out` - # - # source://spoom//lib/spoom/printer.rb#74 - sig { void } - def printt; end -end - -# source://spoom//lib/spoom.rb#10 -Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/config.rb#5 -module Spoom::Sorbet; end - -# source://spoom//lib/spoom/sorbet.rb#38 -Spoom::Sorbet::BIN_PATH = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet.rb#36 -Spoom::Sorbet::CONFIG_PATH = T.let(T.unsafe(nil), String) - -# Parse Sorbet config files -# -# Parses a Sorbet config file: -# -# ```ruby -# config = Spoom::Sorbet::Config.parse_file("sorbet/config") -# puts config.paths # "." -# ``` -# -# Parses a Sorbet config string: -# -# ```ruby -# config = Spoom::Sorbet::Config.parse_string(<<~CONFIG) -# a -# --file=b -# --ignore=c -# CONFIG -# puts config.paths # "a", "b" -# puts config.ignore # "c" -# ``` -# -# source://spoom//lib/spoom/sorbet/config.rb#26 -class Spoom::Sorbet::Config - # source://spoom//lib/spoom/sorbet/config.rb#38 - sig { void } - def initialize; end - - # @return [Array<String>] - # - # source://spoom//lib/spoom/sorbet/config.rb#32 - def allowed_extensions; end - - # @return [Array<String>] - # - # source://spoom//lib/spoom/sorbet/config.rb#32 - def allowed_extensions=(_arg0); end - - # source://spoom//lib/spoom/sorbet/config.rb#46 - sig { returns(::Spoom::Sorbet::Config) } - def copy; end - - # @return [Array<String>] - # - # source://spoom//lib/spoom/sorbet/config.rb#32 - def ignore; end - - # @return [Array<String>] - # - # source://spoom//lib/spoom/sorbet/config.rb#32 - def ignore=(_arg0); end - - # source://spoom//lib/spoom/sorbet/config.rb#35 - sig { returns(T::Boolean) } - def no_stdlib; end - - # @return [Boolean] - # - # source://spoom//lib/spoom/sorbet/config.rb#35 - def no_stdlib=(_arg0); end - - # Returns self as a string of options that can be passed to Sorbet - # - # Example: - # ~~~rb - # config = Sorbet::Config.new - # config.paths << "/foo" - # config.paths << "/bar" - # config.ignore << "/baz" - # config.allowed_extensions << ".rb" - # - # puts config.options_string # "/foo /bar --ignore /baz --allowed-extension .rb" - # ~~~ - # - # source://spoom//lib/spoom/sorbet/config.rb#68 - sig { returns(::String) } - def options_string; end - - # source://spoom//lib/spoom/sorbet/config.rb#32 - sig { returns(T::Array[::String]) } - def paths; end - - # @return [Array<String>] - # - # source://spoom//lib/spoom/sorbet/config.rb#32 - def paths=(_arg0); end - - class << self - # source://spoom//lib/spoom/sorbet/config.rb#81 - sig { params(sorbet_config_path: ::String).returns(::Spoom::Sorbet::Config) } - def parse_file(sorbet_config_path); end - - # source://spoom//lib/spoom/sorbet/config.rb#86 - sig { params(sorbet_config: ::String).returns(::Spoom::Sorbet::Config) } - def parse_string(sorbet_config); end - - private - - # source://spoom//lib/spoom/sorbet/config.rb#150 - sig { params(line: ::String).returns(::String) } - def parse_option(line); end - end -end - -# source://spoom//lib/spoom/sorbet/config.rb#29 -Spoom::Sorbet::Config::DEFAULT_ALLOWED_EXTENSIONS = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/sorbet.rb#14 -class Spoom::Sorbet::Error < ::StandardError - # source://spoom//lib/spoom/sorbet.rb#29 - sig { params(message: ::String, result: ::Spoom::ExecResult).void } - def initialize(message, result); end - - # source://spoom//lib/spoom/sorbet.rb#21 - sig { returns(::Spoom::ExecResult) } - def result; end -end - -# source://spoom//lib/spoom/sorbet.rb#17 -class Spoom::Sorbet::Error::Killed < ::Spoom::Sorbet::Error; end - -# source://spoom//lib/spoom/sorbet.rb#18 -class Spoom::Sorbet::Error::Segfault < ::Spoom::Sorbet::Error; end - -# source://spoom//lib/spoom/sorbet/errors.rb#6 -module Spoom::Sorbet::Errors - class << self - # source://spoom//lib/spoom/sorbet/errors.rb#13 - sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } - def sort_errors_by_code(errors); end - end -end - -# source://spoom//lib/spoom/sorbet/errors.rb#7 -Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/errors.rb#125 -class Spoom::Sorbet::Errors::Error - include ::Comparable - - # source://spoom//lib/spoom/sorbet/errors.rb#151 - sig do - params( - file: T.nilable(::String), - line: T.nilable(::Integer), - message: T.nilable(::String), - code: T.nilable(::Integer), - more: T::Array[::String] - ).void - end - def initialize(file, line, message, code, more = T.unsafe(nil)); end - - # By default errors are sorted by location - # - # source://spoom//lib/spoom/sorbet/errors.rb#162 - sig { params(other: T.untyped).returns(::Integer) } - def <=>(other); end - - # @return [Integer, nil] - # - # source://spoom//lib/spoom/sorbet/errors.rb#133 - def code; end - - # source://spoom//lib/spoom/sorbet/errors.rb#130 - sig { returns(T.nilable(::String)) } - def file; end - - # Other files associated with the error - # - # source://spoom//lib/spoom/sorbet/errors.rb#140 - sig { returns(T::Set[::String]) } - def files_from_error_sections; end - - # source://spoom//lib/spoom/sorbet/errors.rb#133 - sig { returns(T.nilable(::Integer)) } - def line; end - - # @return [String, nil] - # - # source://spoom//lib/spoom/sorbet/errors.rb#130 - def message; end - - # source://spoom//lib/spoom/sorbet/errors.rb#136 - sig { returns(T::Array[::String]) } - def more; end - - # source://spoom//lib/spoom/sorbet/errors.rb#169 - sig { returns(::String) } - def to_s; end -end - -# Parse errors from Sorbet output -# -# source://spoom//lib/spoom/sorbet/errors.rb#18 -class Spoom::Sorbet::Errors::Parser - # source://spoom//lib/spoom/sorbet/errors.rb#43 - sig { params(error_url_base: ::String).void } - def initialize(error_url_base: T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet/errors.rb#50 - sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } - def parse(output); end - - private - - # source://spoom//lib/spoom/sorbet/errors.rb#114 - sig { params(line: ::String).void } - def append_error(line); end - - # source://spoom//lib/spoom/sorbet/errors.rb#106 - sig { void } - def close_error; end - - # source://spoom//lib/spoom/sorbet/errors.rb#73 - sig { params(error_url_base: ::String).returns(::Regexp) } - def error_line_match_regexp(error_url_base); end - - # source://spoom//lib/spoom/sorbet/errors.rb#90 - sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) } - def match_error_line(line); end - - # source://spoom//lib/spoom/sorbet/errors.rb#99 - sig { params(error: ::Spoom::Sorbet::Errors::Error).void } - def open_error(error); end - - class << self - # source://spoom//lib/spoom/sorbet/errors.rb#36 - sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } - def parse_string(output, error_url_base: T.unsafe(nil)); end - end -end - -# source://spoom//lib/spoom/sorbet/errors.rb#21 -Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/sorbet.rb#37 -Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet.rb#40 -Spoom::Sorbet::KILLED_CODE = T.let(T.unsafe(nil), Integer) - -# source://spoom//lib/spoom/sorbet/metrics.rb#8 -module Spoom::Sorbet::MetricsParser - class << self - # source://spoom//lib/spoom/sorbet/metrics.rb#15 - sig { params(path: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } - def parse_file(path, prefix = T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet/metrics.rb#25 - sig { params(obj: T::Hash[::String, T.untyped], prefix: ::String).returns(T::Hash[::String, ::Integer]) } - def parse_hash(obj, prefix = T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet/metrics.rb#20 - sig { params(string: ::String, prefix: ::String).returns(T::Hash[::String, ::Integer]) } - def parse_string(string, prefix = T.unsafe(nil)); end - end -end - -# source://spoom//lib/spoom/sorbet/metrics.rb#9 -Spoom::Sorbet::MetricsParser::DEFAULT_PREFIX = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet.rb#41 -Spoom::Sorbet::SEGFAULT_CODE = T.let(T.unsafe(nil), Integer) - -# source://spoom//lib/spoom/sorbet/sigils.rb#9 -module Spoom::Sorbet::Sigils - class << self - # changes the sigil in the file at the passed path to the specified new strictness - # - # source://spoom//lib/spoom/sorbet/sigils.rb#72 - sig { params(path: T.any(::Pathname, ::String), new_strictness: ::String).returns(T::Boolean) } - def change_sigil_in_file(path, new_strictness); end - - # changes the sigil to have a new strictness in a list of files - # - # source://spoom//lib/spoom/sorbet/sigils.rb#83 - sig { params(path_list: T::Array[::String], new_strictness: ::String).returns(T::Array[::String]) } - def change_sigil_in_files(path_list, new_strictness); end - - # returns a string containing the strictness of a sigil in a file at the passed path - # * returns nil if no sigil - # - # source://spoom//lib/spoom/sorbet/sigils.rb#63 - sig { params(path: T.any(::Pathname, ::String)).returns(T.nilable(::String)) } - def file_strictness(path); end - - # returns the full sigil comment string for the passed strictness - # - # source://spoom//lib/spoom/sorbet/sigils.rb#38 - sig { params(strictness: ::String).returns(::String) } - def sigil_string(strictness); end - - # returns the strictness of a sigil in the passed file content string (nil if no sigil) - # - # source://spoom//lib/spoom/sorbet/sigils.rb#50 - sig { params(content: ::String).returns(T.nilable(::String)) } - def strictness_in_content(content); end - - # returns a string which is the passed content but with the sigil updated to a new strictness - # - # source://spoom//lib/spoom/sorbet/sigils.rb#56 - sig { params(content: ::String, new_strictness: ::String).returns(::String) } - def update_sigil(content, new_strictness); end - - # returns true if the passed string is a valid strictness (else false) - # - # source://spoom//lib/spoom/sorbet/sigils.rb#44 - sig { params(strictness: ::String).returns(T::Boolean) } - def valid_strictness?(strictness); end - end -end - -# source://spoom//lib/spoom/sorbet/sigils.rb#31 -Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://spoom//lib/spoom/sorbet/sigils.rb#13 -Spoom::Sorbet::Sigils::STRICTNESS_FALSE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/sigils.rb#12 -Spoom::Sorbet::Sigils::STRICTNESS_IGNORE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/sigils.rb#17 -Spoom::Sorbet::Sigils::STRICTNESS_INTERNAL = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/sigils.rb#15 -Spoom::Sorbet::Sigils::STRICTNESS_STRICT = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/sigils.rb#16 -Spoom::Sorbet::Sigils::STRICTNESS_STRONG = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/sigils.rb#14 -Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/sigils.rb#19 -Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/timeline.rb#5 -class Spoom::Timeline - # source://spoom//lib/spoom/timeline.rb#9 - sig { params(context: ::Spoom::Context, from: ::Time, to: ::Time).void } - def initialize(context, from, to); end - - # Return one commit for each date in `dates` - # - # source://spoom//lib/spoom/timeline.rb#36 - sig { params(dates: T::Array[::Time]).returns(T::Array[::Spoom::Git::Commit]) } - def commits_for_dates(dates); end - - # Return all months between `from` and `to` - # - # source://spoom//lib/spoom/timeline.rb#23 - sig { returns(T::Array[::Time]) } - def months; end - - # Return one commit for each month between `from` and `to` - # - # source://spoom//lib/spoom/timeline.rb#17 - sig { returns(T::Array[::Spoom::Git::Commit]) } - def ticks; end -end - -# source://spoom//lib/spoom/version.rb#5 -Spoom::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/tapioca@0.11.4.rbi b/sorbet/rbi/gems/tapioca@0.11.4.rbi deleted file mode 100644 index 971b3f6b..00000000 --- a/sorbet/rbi/gems/tapioca@0.11.4.rbi +++ /dev/null @@ -1,3268 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `tapioca` gem. -# Please instead update this file by running `bin/tapioca gem tapioca`. - -class Bundler::Dependency < ::Gem::Dependency - include ::Tapioca::Gemfile::AutoRequireHook -end - -# We need to do the alias-method-chain dance since Bootsnap does the same, -# and prepended modules and alias-method-chain don't play well together. -# -# So, why does Bootsnap do alias-method-chain and not prepend? Glad you asked! -# That's because RubyGems does alias-method-chain for Kernel#require and such, -# so, if Bootsnap were to do prepend, it might end up breaking RubyGems. -# -# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#68 -class Module - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#101 - def append_features(constant); end - - # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#71 - def autoload(const_name, path); end - - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#111 - def extend_object(obj); end - - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#91 - def prepend_features(constant); end -end - -# source://tapioca//lib/tapioca/rbi_ext/model.rb#4 -module RBI; end - -# source://tapioca//lib/tapioca/rbi_ext/model.rb#5 -class RBI::Tree < ::RBI::NodeWithComments - # source://rbi/0.0.16/lib/rbi/model.rb#115 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Tree).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi/0.0.16/lib/rbi/model.rb#122 - sig { params(node: ::RBI::Node).void } - def <<(node); end - - # source://rbi/0.0.16/lib/rbi/printer.rb#224 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi/0.0.16/lib/rbi/rewriters/add_sig_templates.rb#66 - sig { params(with_todo_comment: T::Boolean).void } - def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - - # source://rbi/0.0.16/lib/rbi/rewriters/annotate.rb#48 - sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } - def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/rbi_ext/model.rb#38 - sig do - params( - name: ::String, - superclass_name: T.nilable(::String), - block: T.nilable(T.proc.params(scope: ::RBI::Scope).void) - ).returns(::RBI::Scope) - end - def create_class(name, superclass_name: T.unsafe(nil), &block); end - - # source://tapioca//lib/tapioca/rbi_ext/model.rb#45 - sig { params(name: ::String, value: ::String).void } - def create_constant(name, value:); end - - # source://tapioca//lib/tapioca/rbi_ext/model.rb#55 - sig { params(name: ::String).void } - def create_extend(name); end - - # source://tapioca//lib/tapioca/rbi_ext/model.rb#50 - sig { params(name: ::String).void } - def create_include(name); end - - # source://tapioca//lib/tapioca/rbi_ext/model.rb#89 - sig do - params( - name: ::String, - parameters: T::Array[::RBI::TypedParam], - return_type: ::String, - class_method: T::Boolean, - visibility: ::RBI::Visibility, - comments: T::Array[::RBI::Comment] - ).void - end - def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/rbi_ext/model.rb#60 - sig { params(name: ::String).void } - def create_mixes_in_class_methods(name); end - - # source://tapioca//lib/tapioca/rbi_ext/model.rb#25 - sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } - def create_module(name, &block); end - - # source://tapioca//lib/tapioca/rbi_ext/model.rb#9 - sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } - def create_path(constant, &block); end - - # source://tapioca//lib/tapioca/rbi_ext/model.rb#74 - sig do - params( - name: ::String, - type: ::String, - variance: ::Symbol, - fixed: T.nilable(::String), - upper: T.nilable(::String), - lower: T.nilable(::String) - ).void - end - def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - - # source://rbi/0.0.16/lib/rbi/rewriters/deannotate.rb#40 - sig { params(annotation: ::String).void } - def deannotate!(annotation); end - - # source://rbi/0.0.16/lib/rbi/model.rb#128 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi/0.0.16/lib/rbi/rewriters/group_nodes.rb#38 - sig { void } - def group_nodes!; end - - # source://rbi/0.0.16/lib/rbi/index.rb#64 - sig { returns(::RBI::Index) } - def index; end - - # source://rbi/0.0.16/lib/rbi/rewriters/merge_trees.rb#318 - sig do - params( - other: ::RBI::Tree, - left_name: ::String, - right_name: ::String, - keep: ::RBI::Rewriters::Merge::Keep - ).returns(::RBI::MergeTree) - end - def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - # source://rbi/0.0.16/lib/rbi/rewriters/nest_non_public_methods.rb#45 - sig { void } - def nest_non_public_methods!; end - - # source://rbi/0.0.16/lib/rbi/rewriters/nest_singleton_methods.rb#35 - sig { void } - def nest_singleton_methods!; end - - # source://rbi/0.0.16/lib/rbi/model.rb#106 - sig { returns(T::Array[::RBI::Node]) } - def nodes; end - - # source://rbi/0.0.16/lib/rbi/printer.rb#231 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi/0.0.16/lib/rbi/rewriters/sort_nodes.rb#107 - sig { void } - def sort_nodes!; end - - private - - # source://tapioca//lib/tapioca/rbi_ext/model.rb#116 - sig { params(node: ::RBI::Node).returns(::RBI::Node) } - def create_node(node); end - - # source://tapioca//lib/tapioca/rbi_ext/model.rb#111 - sig { returns(T::Hash[::String, ::RBI::Node]) } - def nodes_cache; end -end - -# source://tapioca//lib/tapioca/rbi_ext/model.rb#126 -class RBI::TypedParam < ::T::Struct - const :param, ::RBI::Param - const :type, ::String - - class << self - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#5 -module T::Generic - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13 - def [](*types); end - - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21 - def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end - - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#37 - def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end -end - -# This module intercepts calls to generic type instantiations and type variable definitions. -# Tapioca stores the data from those calls in a `GenericTypeRegistry` which can then be used -# to look up the original call details when we are trying to do code generation. -# -# We are interested in the data of the `[]`, `type_member` and `type_template` calls which -# are all needed to generate good generic information at runtime. -# -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#12 -module T::Generic::TypeStoragePatch - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13 - def [](*types); end - - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21 - def type_member(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end - - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#37 - def type_template(variance = T.unsafe(nil), fixed: T.unsafe(nil), lower: T.unsafe(nil), upper: T.unsafe(nil), &bounds_proc); end -end - -# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#28 -module T::Private::Methods - class << self - # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#30 - def finalize_proc(decl); end - end -end - -class T::Private::Methods::Declaration < ::Struct - def bind; end - def bind=(_); end - def checked; end - def checked=(_); end - def finalized; end - def finalized=(_); end - def mod; end - def mod=(_); end - def mode; end - def mode=(_); end - def on_failure; end - def on_failure=(_); end - def override_allow_incompatible; end - def override_allow_incompatible=(_); end - def params; end - def params=(_); end - def raw; end - def raw=(_); end - def returns; end - def returns=(_); end - def type_parameters; end - def type_parameters=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -class T::Private::Methods::DeclarationBlock < ::Struct - def blk; end - def blk=(_); end - def final; end - def final=(_); end - def loc; end - def loc=(_); end - def mod; end - def mod=(_); end - def raw; end - def raw=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#29 -module T::Private::Methods::ProcBindPatch - # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#30 - def finalize_proc(decl); end -end - -class T::Types::Proc < ::T::Types::Base; end - -# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#6 -module T::Types::ProcBindPatch - # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#7 - def initialize(arg_types, returns, bind = T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#15 - def name; end -end - -# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#6 -class T::Types::Simple < ::T::Types::Base - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#64 - def name; end -end - -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#59 -module T::Types::Simple::GenericPatch - # This method intercepts calls to the `name` method for simple types, so that - # it can ask the name to the type if the type is generic, since, by this point, - # we've created a clone of that type with the `name` method returning the - # appropriate name for that specific concrete type. - # - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#64 - def name; end -end - -# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#7 -module T::Types::Simple::NamePatch - # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#10 - def name; end - - # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#16 - def qualified_name_of(constant); end -end - -# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#8 -T::Types::Simple::NamePatch::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) - -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#84 -module T::Utils::Private - class << self - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#86 - def coerce_and_check_module_types(val, check_val, check_module_type); end - end -end - -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#85 -module T::Utils::Private::PrivateCoercePatch - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#86 - def coerce_and_check_module_types(val, check_val, check_module_type); end -end - -# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#4 -module Tapioca - class << self - # source://tapioca//lib/tapioca.rb#19 - sig do - type_parameters(:Result) - .params( - blk: T.proc.returns(T.type_parameter(:Result)) - ).returns(T.type_parameter(:Result)) - end - def silence_warnings(&blk); end - end -end - -# source://tapioca//lib/tapioca.rb#37 -Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#60 -Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#59 -Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#58 -Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca/cli.rb#5 -class Tapioca::Cli < ::Thor - include ::Tapioca::CliHelper - include ::Tapioca::ConfigHelper - include ::Tapioca::EnvHelper - - # source://tapioca//lib/tapioca/cli.rb#336 - def __print_version; end - - # source://tapioca//lib/tapioca/cli.rb#316 - def annotations; end - - # source://tapioca//lib/tapioca/cli.rb#286 - def check_shims; end - - # source://tapioca//lib/tapioca/cli.rb#41 - def configure; end - - # source://tapioca//lib/tapioca/cli.rb#133 - def dsl(*constant_or_paths); end - - # source://tapioca//lib/tapioca/cli.rb#238 - def gem(*gems); end - - # source://tapioca//lib/tapioca/cli.rb#27 - def init; end - - # source://tapioca//lib/tapioca/cli.rb#52 - def require; end - - # source://tapioca//lib/tapioca/cli.rb#71 - def todo; end - - private - - # source://tapioca//lib/tapioca/cli.rb#350 - def print_init_next_steps; end - - class << self - # source://tapioca//lib/tapioca/cli.rb#342 - def exit_on_failure?; end - end -end - -# source://tapioca//lib/tapioca/cli.rb#10 -Tapioca::Cli::FILE_HEADER_OPTION_DESC = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca/helpers/cli_helper.rb#5 -module Tapioca::CliHelper - requires_ancestor { Thor::Shell } - - # source://tapioca//lib/tapioca/helpers/cli_helper.rb#33 - sig { params(options: T::Hash[::Symbol, T.untyped]).returns(T.nilable(::String)) } - def netrc_file(options); end - - # source://tapioca//lib/tapioca/helpers/cli_helper.rb#26 - sig { params(options: T::Hash[::Symbol, T.untyped]).returns(::Tapioca::RBIFormatter) } - def rbi_formatter(options); end - - # source://tapioca//lib/tapioca/helpers/cli_helper.rb#12 - sig { params(message: ::String, color: T.any(::Symbol, T::Array[::Symbol])).void } - def say_error(message = T.unsafe(nil), *color); end -end - -# source://tapioca//lib/tapioca/commands.rb#5 -module Tapioca::Commands; end - -# source://tapioca//lib/tapioca/commands/annotations.rb#6 -class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracker - # source://tapioca//lib/tapioca/commands/annotations.rb#18 - sig do - params( - central_repo_root_uris: T::Array[::String], - auth: T.nilable(::String), - netrc_file: T.nilable(::String), - central_repo_index_path: ::String, - typed_overrides: T::Hash[::String, ::String] - ).void - end - def initialize(central_repo_root_uris:, auth: T.unsafe(nil), netrc_file: T.unsafe(nil), central_repo_index_path: T.unsafe(nil), typed_overrides: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#36 - sig { override.void } - def execute; end - - private - - # source://tapioca//lib/tapioca/commands/annotations.rb#191 - sig { params(name: ::String, content: ::String).returns(::String) } - def add_header(name, content); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#211 - sig { params(name: ::String, content: ::String).returns(::String) } - def apply_typed_override(name, content); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#132 - sig { params(repo_uris: T::Array[::String], gem_name: ::String).void } - def fetch_annotation(repo_uris, gem_name); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#109 - sig { params(gem_names: T::Array[::String]).returns(T::Array[::String]) } - def fetch_annotations(gem_names); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#150 - sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } - def fetch_file(repo_uri, path); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#167 - sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } - def fetch_http_file(repo_uri, path); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#98 - sig { params(repo_uri: ::String, repo_number: T.nilable(::Integer)).returns(T.nilable(Tapioca::RepoIndex)) } - def fetch_index(repo_uri, repo_number:); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#77 - sig { returns(T::Hash[::String, Tapioca::RepoIndex]) } - def fetch_indexes; end - - # source://tapioca//lib/tapioca/commands/annotations.rb#159 - sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } - def fetch_local_file(repo_uri, path); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#46 - sig { returns(T::Array[::String]) } - def list_gemfile_gems; end - - # source://tapioca//lib/tapioca/commands/annotations.rb#223 - sig { params(gem_name: ::String, contents: T::Array[::String]).returns(T.nilable(::String)) } - def merge_files(gem_name, contents); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#56 - sig { params(project_gems: T::Array[::String]).void } - def remove_expired_annotations(project_gems); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#250 - sig { returns(T::Hash[::String, T.nilable(::String)]) } - def repo_tokens; end - - # source://tapioca//lib/tapioca/commands/annotations.rb#278 - sig { params(path: ::String, repo_uri: ::String, message: ::String).void } - def say_http_error(path, repo_uri, message:); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#262 - sig { params(repo_uri: ::String).returns(T.nilable(::String)) } - def token_for(repo_uri); end -end - -# source://tapioca//lib/tapioca/commands/check_shims.rb#6 -class Tapioca::Commands::CheckShims < ::Tapioca::Commands::CommandWithoutTracker - include ::Tapioca::SorbetHelper - include ::Tapioca::RBIFilesHelper - - # source://tapioca//lib/tapioca/commands/check_shims.rb#22 - sig do - params( - gem_rbi_dir: ::String, - dsl_rbi_dir: ::String, - annotations_rbi_dir: ::String, - shim_rbi_dir: ::String, - todo_rbi_file: ::String, - payload: T::Boolean, - number_of_workers: T.nilable(::Integer) - ).void - end - def initialize(gem_rbi_dir:, dsl_rbi_dir:, annotations_rbi_dir:, shim_rbi_dir:, todo_rbi_file:, payload:, number_of_workers:); end - - # source://tapioca//lib/tapioca/commands/check_shims.rb#42 - sig { override.void } - def execute; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://tapioca//lib/tapioca/commands/command.rb#6 -class Tapioca::Commands::Command - include ::Thor::Base - include ::Thor::Invocation - include ::Thor::Shell - include ::Tapioca::CliHelper - extend ::Thor::Base::ClassMethods - extend ::Thor::Invocation::ClassMethods - - abstract! - - # source://tapioca//lib/tapioca/commands/command.rb#20 - sig { void } - def initialize; end - - # @abstract - # - # source://tapioca//lib/tapioca/commands/command.rb#25 - sig { abstract.void } - def execute; end - - # source://thor/1.2.1/lib/thor/base.rb#139 - sig { returns(::Thor::Actions) } - def file_writer; end - - private - - # source://tapioca//lib/tapioca/commands/command.rb#46 - sig do - params( - path: T.any(::Pathname, ::String), - content: ::String, - force: T::Boolean, - skip: T::Boolean, - verbose: T::Boolean - ).void - end - def create_file(path, content, force: T.unsafe(nil), skip: T.unsafe(nil), verbose: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/commands/command.rb#30 - sig { params(command: ::Symbol, args: ::String).returns(::String) } - def default_command(command, *args); end - - # source://tapioca//lib/tapioca/commands/command.rb#56 - sig { params(path: T.any(::Pathname, ::String), verbose: T::Boolean).void } - def remove_file(path, verbose: T.unsafe(nil)); end -end - -# source://tapioca//lib/tapioca/commands/command.rb#10 -class Tapioca::Commands::Command::FileWriter < ::Thor - include ::Thor::Actions - extend ::Thor::Actions::ClassMethods -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://tapioca//lib/tapioca/commands/command_without_tracker.rb#6 -class Tapioca::Commands::CommandWithoutTracker < ::Tapioca::Commands::Command - abstract! - - # source://tapioca//lib/tapioca/commands/command_without_tracker.rb#12 - sig { void } - def initialize; end -end - -# source://tapioca//lib/tapioca/commands/configure.rb#6 -class Tapioca::Commands::Configure < ::Tapioca::Commands::CommandWithoutTracker - # source://tapioca//lib/tapioca/commands/configure.rb#14 - sig { params(sorbet_config: ::String, tapioca_config: ::String, default_postrequire: ::String).void } - def initialize(sorbet_config:, tapioca_config:, default_postrequire:); end - - # source://tapioca//lib/tapioca/commands/configure.rb#30 - sig { override.void } - def execute; end - - private - - # source://tapioca//lib/tapioca/commands/configure.rb#79 - sig { void } - def create_binstub; end - - # source://tapioca//lib/tapioca/commands/configure.rb#69 - sig { void } - def create_post_require; end - - # source://tapioca//lib/tapioca/commands/configure.rb#40 - sig { void } - def create_sorbet_config; end - - # source://tapioca//lib/tapioca/commands/configure.rb#50 - sig { void } - def create_tapioca_config; end - - # source://tapioca//lib/tapioca/commands/configure.rb#92 - sig { returns(::Bundler::Installer) } - def installer; end - - # source://tapioca//lib/tapioca/commands/configure.rb#97 - sig { returns(T.any(::Bundler::StubSpecification, ::Gem::Specification)) } - def spec; end -end - -# source://tapioca//lib/tapioca/commands/dsl.rb#6 -class Tapioca::Commands::Dsl < ::Tapioca::Commands::CommandWithoutTracker - include ::Tapioca::SorbetHelper - include ::Tapioca::RBIFilesHelper - - # source://tapioca//lib/tapioca/commands/dsl.rb#29 - sig do - params( - requested_constants: T::Array[::String], - requested_paths: T::Array[::Pathname], - outpath: ::Pathname, - only: T::Array[::String], - exclude: T::Array[::String], - file_header: T::Boolean, - tapioca_path: ::String, - should_verify: T::Boolean, - quiet: T::Boolean, - verbose: T::Boolean, - number_of_workers: T.nilable(::Integer), - auto_strictness: T::Boolean, - gem_dir: ::String, - rbi_formatter: ::Tapioca::RBIFormatter, - app_root: ::String - ).void - end - def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, should_verify: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#93 - sig { override.void } - def execute; end - - # source://tapioca//lib/tapioca/commands/dsl.rb#66 - sig { void } - def list_compilers; end - - private - - # source://tapioca//lib/tapioca/commands/dsl.rb#325 - sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } - def build_error_for_files(cause, files); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#249 - sig do - params( - constant_name: ::String, - rbi: ::RBI::File, - outpath: ::Pathname, - quiet: T::Boolean - ).returns(T.nilable(::Pathname)) - end - def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#187 - sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) } - def constantize(constant_names, ignore_missing: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#210 - sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } - def constantize_compilers(compiler_names); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#385 - sig { returns(T::Array[::String]) } - def constants_from_requested_paths; end - - # source://tapioca//lib/tapioca/commands/dsl.rb#158 - sig { returns(::Tapioca::Dsl::Pipeline) } - def create_pipeline; end - - # source://tapioca//lib/tapioca/commands/dsl.rb#288 - sig { params(constant_name: ::String).returns(::Pathname) } - def dsl_rbi_filename(constant_name); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#173 - sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) } - def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#380 - sig { params(constant: ::String).returns(::String) } - def generate_command_for(constant); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#267 - sig { params(dir: ::Pathname).void } - def perform_dsl_verification(dir); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#276 - sig { params(files: T::Set[::Pathname]).void } - def purge_stale_dsl_rbi_files(files); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#375 - sig { params(constant: ::String).returns(::String) } - def rbi_filename_for(constant); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#356 - sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } - def rbi_files_in(path); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#334 - sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } - def report_diff_and_exit_if_out_of_date(diff, command); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#229 - sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) } - def resolve(name); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#363 - sig { params(class_name: ::String).returns(::String) } - def underscore(class_name); end - - # source://tapioca//lib/tapioca/commands/dsl.rb#293 - sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } - def verify_dsl_rbi(tmp_dir:); end -end - -# source://tapioca//lib/tapioca/commands/gem.rb#6 -class Tapioca::Commands::Gem < ::Tapioca::Commands::Command - include ::Tapioca::SorbetHelper - include ::Tapioca::RBIFilesHelper - - # source://tapioca//lib/tapioca/commands/gem.rb#28 - sig do - params( - gem_names: T::Array[::String], - exclude: T::Array[::String], - prerequire: T.nilable(::String), - postrequire: ::String, - typed_overrides: T::Hash[::String, ::String], - outpath: ::Pathname, - file_header: T::Boolean, - include_doc: T::Boolean, - include_loc: T::Boolean, - include_exported_rbis: T::Boolean, - number_of_workers: T.nilable(::Integer), - auto_strictness: T::Boolean, - dsl_dir: ::String, - rbi_formatter: ::Tapioca::RBIFormatter - ).void - end - def initialize(gem_names:, exclude:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/commands/gem.rb#67 - sig { override.void } - def execute; end - - # source://tapioca//lib/tapioca/commands/gem.rb#105 - sig { params(should_verify: T::Boolean, exclude: T::Array[::String]).void } - def sync(should_verify: T.unsafe(nil), exclude: T.unsafe(nil)); end - - private - - # source://tapioca//lib/tapioca/commands/gem.rb#283 - sig { returns(T::Array[::String]) } - def added_rbis; end - - # source://tapioca//lib/tapioca/commands/gem.rb#344 - sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } - def build_error_for_files(cause, files); end - - # source://tapioca//lib/tapioca/commands/gem.rb#154 - sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } - def compile_gem_rbi(gem); end - - # source://tapioca//lib/tapioca/commands/gem.rb#278 - sig { params(gem_name: ::String).returns(::Pathname) } - def existing_rbi(gem_name); end - - # source://tapioca//lib/tapioca/commands/gem.rb#326 - sig { returns(T::Hash[::String, ::String]) } - def existing_rbis; end - - # source://tapioca//lib/tapioca/commands/gem.rb#290 - sig { params(gem_name: ::String).returns(::Pathname) } - def expected_rbi(gem_name); end - - # source://tapioca//lib/tapioca/commands/gem.rb#332 - sig { returns(T::Hash[::String, ::String]) } - def expected_rbis; end - - # source://tapioca//lib/tapioca/commands/gem.rb#295 - sig { params(gem_name: ::String).returns(T::Boolean) } - def gem_rbi_exists?(gem_name); end - - # source://tapioca//lib/tapioca/commands/gem.rb#339 - sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } - def gem_rbi_filename(gem_name, version); end - - # source://tapioca//lib/tapioca/commands/gem.rb#139 - sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } - def gems_to_generate(gem_names); end - - # source://tapioca//lib/tapioca/commands/gem.rb#349 - sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } - def merge_with_exported_rbi(gem, file); end - - # source://tapioca//lib/tapioca/commands/gem.rb#320 - sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } - def move(old_filename, new_filename); end - - # source://tapioca//lib/tapioca/commands/gem.rb#231 - sig { void } - def perform_additions; end - - # source://tapioca//lib/tapioca/commands/gem.rb#204 - sig { void } - def perform_removals; end - - # source://tapioca//lib/tapioca/commands/gem.rb#185 - sig { params(exclude: T::Array[::String]).void } - def perform_sync_verification(exclude: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/commands/gem.rb#273 - sig { returns(T::Array[::String]) } - def removed_rbis; end - - # source://tapioca//lib/tapioca/commands/gem.rb#300 - sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } - def report_diff_and_exit_if_out_of_date(diff, command); end -end - -# source://tapioca//lib/tapioca/commands/require.rb#6 -class Tapioca::Commands::Require < ::Tapioca::Commands::CommandWithoutTracker - # source://tapioca//lib/tapioca/commands/require.rb#13 - sig { params(requires_path: ::String, sorbet_config_path: ::String).void } - def initialize(requires_path:, sorbet_config_path:); end - - # source://tapioca//lib/tapioca/commands/require.rb#21 - sig { override.void } - def execute; end -end - -# source://tapioca//lib/tapioca/commands/todo.rb#6 -class Tapioca::Commands::Todo < ::Tapioca::Commands::CommandWithoutTracker - include ::Tapioca::SorbetHelper - - # source://tapioca//lib/tapioca/commands/todo.rb#15 - sig { params(todo_file: ::String, file_header: T::Boolean).void } - def initialize(todo_file:, file_header:); end - - # source://tapioca//lib/tapioca/commands/todo.rb#23 - sig { override.void } - def execute; end - - private - - # source://tapioca//lib/tapioca/commands/todo.rb#49 - sig { params(constants: T::Array[::String], command: ::String).returns(::RBI::File) } - def rbi(constants, command:); end - - # source://tapioca//lib/tapioca/commands/todo.rb#69 - sig { returns(T::Array[::String]) } - def unresolved_constants; end -end - -# source://tapioca//lib/tapioca/helpers/config_helper.rb#5 -module Tapioca::ConfigHelper - requires_ancestor { Thor } - - # source://tapioca//lib/tapioca/helpers/config_helper.rb#18 - sig { params(args: T.untyped, local_options: T.untyped, config: T.untyped).void } - def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/helpers/config_helper.rb#12 - sig { returns(::String) } - def command_name; end - - # source://tapioca//lib/tapioca/helpers/config_helper.rb#15 - sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) } - def defaults; end - - # source://tapioca//lib/tapioca/helpers/config_helper.rb#34 - sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) } - def options; end - - private - - # source://tapioca//lib/tapioca/helpers/config_helper.rb#151 - sig { params(msg: ::String).returns(::Tapioca::ConfigHelper::ConfigError) } - def build_error(msg); end - - # source://tapioca//lib/tapioca/helpers/config_helper.rb#176 - sig { params(config_file: ::String, errors: T::Array[::Tapioca::ConfigHelper::ConfigError]).returns(::String) } - def build_error_message(config_file, errors); end - - # source://tapioca//lib/tapioca/helpers/config_helper.rb#56 - sig do - params( - options: ::Thor::CoreExt::HashWithIndifferentAccess - ).returns(::Thor::CoreExt::HashWithIndifferentAccess) - end - def config_options(options); end - - # source://tapioca//lib/tapioca/helpers/config_helper.rb#46 - sig { params(options: T::Hash[::Symbol, ::Thor::Option]).void } - def filter_defaults(options); end - - # source://tapioca//lib/tapioca/helpers/config_helper.rb#194 - sig do - params( - options: T.nilable(::Thor::CoreExt::HashWithIndifferentAccess) - ).returns(::Thor::CoreExt::HashWithIndifferentAccess) - end - def merge_options(*options); end - - # source://tapioca//lib/tapioca/helpers/config_helper.rb#70 - sig { params(config_file: ::String, config: T::Hash[T.untyped, T.untyped]).void } - def validate_config!(config_file, config); end - - # source://tapioca//lib/tapioca/helpers/config_helper.rb#102 - sig do - params( - command_options: T::Hash[::Symbol, ::Thor::Option], - config_key: ::String, - config_options: T::Hash[T.untyped, T.untyped] - ).returns(T::Array[::Tapioca::ConfigHelper::ConfigError]) - end - def validate_config_options(command_options, config_key, config_options); end -end - -# source://tapioca//lib/tapioca/helpers/config_helper.rb#146 -class Tapioca::ConfigHelper::ConfigError < ::T::Struct - const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] - - class << self - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://tapioca//lib/tapioca/helpers/config_helper.rb#141 -class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct - const :message, ::String - const :colors, T::Array[::Symbol] - - class << self - # source://sorbet-runtime/0.5.10761/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://tapioca//lib/tapioca.rb#44 -Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#40 -Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#56 -Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#41 -Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#46 -Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) - -# source://tapioca//lib/tapioca.rb#38 -Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#39 -Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca/rbi_formatter.rb#29 -Tapioca::DEFAULT_RBI_FORMATTER = T.let(T.unsafe(nil), Tapioca::RBIFormatter) - -# source://tapioca//lib/tapioca.rb#55 -Tapioca::DEFAULT_RBI_MAX_LINE_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://tapioca//lib/tapioca.rb#42 -Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#43 -Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca/dsl/compilers.rb#5 -module Tapioca::Dsl; end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://tapioca//lib/tapioca/dsl/compiler.rb#6 -class Tapioca::Dsl::Compiler - extend T::Generic - include ::Tapioca::SorbetHelper - include ::Tapioca::RBIHelper - include ::Tapioca::Runtime::AttachedClassOf - include ::Tapioca::Runtime::Reflection - extend ::Tapioca::Runtime::AttachedClassOf - extend ::Tapioca::Runtime::Reflection - - abstract! - - ConstantType = type_member { { upper: Module } } - - # source://tapioca//lib/tapioca/dsl/compiler.rb#60 - sig { params(pipeline: ::Tapioca::Dsl::Pipeline, root: ::RBI::Tree, constant: ConstantType).void } - def initialize(pipeline, root, constant); end - - # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`. - # - # source://tapioca//lib/tapioca/dsl/compiler.rb#77 - sig { params(error: ::String).void } - def add_error(error); end - - # source://tapioca//lib/tapioca/dsl/compiler.rb#68 - sig { params(compiler_name: ::String).returns(T::Boolean) } - def compiler_enabled?(compiler_name); end - - # source://tapioca//lib/tapioca/dsl/compiler.rb#20 - sig { returns(ConstantType) } - def constant; end - - # @abstract - # - # source://tapioca//lib/tapioca/dsl/compiler.rb#73 - sig { abstract.void } - def decorate; end - - # source://tapioca//lib/tapioca/dsl/compiler.rb#23 - sig { returns(::RBI::Tree) } - def root; end - - private - - # source://tapioca//lib/tapioca/dsl/compiler.rb#126 - sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) } - def compile_method_parameters_to_rbi(method_def); end - - # source://tapioca//lib/tapioca/dsl/compiler.rb#162 - sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) } - def compile_method_return_type_to_rbi(method_def); end - - # source://tapioca//lib/tapioca/dsl/compiler.rb#116 - sig { params(scope: ::RBI::Scope, method_def: T.any(::Method, ::UnboundMethod), class_method: T::Boolean).void } - def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end - - # Get the types of each parameter from a method signature - # - # source://tapioca//lib/tapioca/dsl/compiler.rb#90 - sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) } - def parameters_types_from_signature(method_def, signature); end - - class << self - # @abstract - # - # source://tapioca//lib/tapioca/dsl/compiler.rb#34 - sig { abstract.returns(T::Enumerable[::Module]) } - def gather_constants; end - - # source://tapioca//lib/tapioca/dsl/compiler.rb#29 - sig { params(constant: ::Module).returns(T::Boolean) } - def handles?(constant); end - - # source://tapioca//lib/tapioca/dsl/compiler.rb#37 - sig { returns(T::Set[::Module]) } - def processable_constants; end - - private - - # source://tapioca//lib/tapioca/dsl/compiler.rb#47 - sig { returns(T::Enumerable[::Class]) } - def all_classes; end - - # source://tapioca//lib/tapioca/dsl/compiler.rb#53 - sig { returns(T::Enumerable[::Module]) } - def all_modules; end - end -end - -# source://tapioca//lib/tapioca/dsl/compilers.rb#6 -module Tapioca::Dsl::Compilers; end - -# DSL compilers are either built-in to Tapioca and live under the -# `Tapioca::Dsl::Compilers` namespace (i.e. this namespace), and -# can be referred to by just using the class name, or they live in -# a different namespace and can only be referred to using their fully -# qualified name. This constant encapsulates that dual lookup when -# a compiler needs to be resolved by name. -# -# source://tapioca//lib/tapioca/dsl/compilers.rb#13 -Tapioca::Dsl::Compilers::NAMESPACES = T.let(T.unsafe(nil), Array) - -# source://tapioca//lib/tapioca/dsl/pipeline.rb#6 -class Tapioca::Dsl::Pipeline - # source://tapioca//lib/tapioca/dsl/pipeline.rb#34 - sig do - params( - requested_constants: T::Array[::Module], - requested_paths: T::Array[::Pathname], - requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], - excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], - error_handler: T.proc.params(error: ::String).void, - number_of_workers: T.nilable(::Integer) - ).void - end - def initialize(requested_constants:, requested_paths: T.unsafe(nil), requested_compilers: T.unsafe(nil), excluded_compilers: T.unsafe(nil), error_handler: T.unsafe(nil), number_of_workers: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#10 - sig { returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) } - def active_compilers; end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#93 - sig { params(error: ::String).void } - def add_error(error); end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#98 - sig { params(compiler_name: ::String).returns(T::Boolean) } - def compiler_enabled?(compiler_name); end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#107 - sig { returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } - def compilers; end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#19 - sig { returns(T.proc.params(error: ::String).void) } - def error_handler; end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#22 - sig { returns(T::Array[::String]) } - def errors; end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#13 - sig { returns(T::Array[::Module]) } - def requested_constants; end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#16 - sig { returns(T::Array[::Pathname]) } - def requested_paths; end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#58 - sig do - type_parameters(:T) - .params( - blk: T.proc.params(constant: ::Module, rbi: ::RBI::File).returns(T.type_parameter(:T)) - ).returns(T::Array[T.type_parameter(:T)]) - end - def run(&blk); end - - private - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#193 - sig { void } - def abort_if_pending_migrations!; end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#139 - sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) } - def filter_anonymous_and_reloaded_constants(constants); end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#122 - sig do - params( - requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], - excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)] - ).returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) - end - def gather_active_compilers(requested_compilers, excluded_compilers); end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#130 - sig do - params( - requested_constants: T::Array[::Module], - requested_paths: T::Array[::Pathname] - ).returns(T::Set[::Module]) - end - def gather_constants(requested_constants, requested_paths); end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#167 - sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) } - def rbi_for_constant(constant); end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#186 - sig { params(error: ::String).returns(T.noreturn) } - def report_error(error); end -end - -# source://tapioca//lib/tapioca/helpers/env_helper.rb#5 -module Tapioca::EnvHelper - requires_ancestor { Thor } - - # source://tapioca//lib/tapioca/helpers/env_helper.rb#12 - sig { params(options: T::Hash[::Symbol, T.untyped]).void } - def set_environment(options); end -end - -class Tapioca::Error < ::StandardError; end - -# source://tapioca//lib/tapioca/executor.rb#5 -class Tapioca::Executor - # source://tapioca//lib/tapioca/executor.rb#11 - sig { params(queue: T::Array[T.untyped], number_of_workers: T.nilable(::Integer)).void } - def initialize(queue, number_of_workers: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/executor.rb#28 - sig do - type_parameters(:T) - .params( - block: T.proc.params(item: T.untyped).returns(T.type_parameter(:T)) - ).returns(T::Array[T.type_parameter(:T)]) - end - def run_in_parallel(&block); end -end - -# source://tapioca//lib/tapioca/executor.rb#8 -Tapioca::Executor::MINIMUM_ITEMS_PER_WORKER = T.let(T.unsafe(nil), Integer) - -# source://tapioca//lib/tapioca/gem/events.rb#5 -module Tapioca::Gem; end - -# source://tapioca//lib/tapioca/gem/events.rb#77 -class Tapioca::Gem::ConstNodeAdded < ::Tapioca::Gem::NodeAdded - # source://tapioca//lib/tapioca/gem/events.rb#84 - sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } - def initialize(symbol, constant, node); end - - # source://tapioca//lib/tapioca/gem/events.rb#81 - sig { returns(::RBI::Const) } - def node; end -end - -# source://tapioca//lib/tapioca/gem/events.rb#26 -class Tapioca::Gem::ConstantFound < ::Tapioca::Gem::Event - # source://tapioca//lib/tapioca/gem/events.rb#36 - sig { params(symbol: ::String, constant: ::BasicObject).void } - def initialize(symbol, constant); end - - # source://tapioca//lib/tapioca/gem/events.rb#33 - sig { returns(::BasicObject) } - def constant; end - - # source://tapioca//lib/tapioca/gem/events.rb#30 - sig { returns(::String) } - def symbol; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://tapioca//lib/tapioca/gem/events.rb#6 -class Tapioca::Gem::Event - abstract! - - # source://sorbet-runtime/0.5.10761/lib/types/private/abstract/declare.rb#37 - def initialize(*args, **_arg1, &blk); end -end - -# source://tapioca//lib/tapioca/gem/events.rb#43 -class Tapioca::Gem::ForeignConstantFound < ::Tapioca::Gem::ConstantFound - # source://tapioca//lib/tapioca/gem/events.rb#52 - sig { params(symbol: ::String, constant: ::Module).void } - def initialize(symbol, constant); end - - # source://tapioca//lib/tapioca/gem/events.rb#47 - sig { override.returns(::Module) } - def constant; end -end - -# source://tapioca//lib/tapioca/gem/events.rb#103 -class Tapioca::Gem::ForeignScopeNodeAdded < ::Tapioca::Gem::ScopeNodeAdded; end - -# source://tapioca//lib/tapioca/gem/listeners/base.rb#6 -module Tapioca::Gem::Listeners; end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://tapioca//lib/tapioca/gem/listeners/base.rb#7 -class Tapioca::Gem::Listeners::Base - abstract! - - # source://tapioca//lib/tapioca/gem/listeners/base.rb#14 - sig { params(pipeline: ::Tapioca::Gem::Pipeline).void } - def initialize(pipeline); end - - # source://tapioca//lib/tapioca/gem/listeners/base.rb#19 - sig { params(event: ::Tapioca::Gem::NodeAdded).void } - def dispatch(event); end - - private - - # source://tapioca//lib/tapioca/gem/listeners/base.rb#49 - sig { params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } - def ignore?(event); end - - # source://tapioca//lib/tapioca/gem/listeners/base.rb#37 - sig { params(event: ::Tapioca::Gem::ConstNodeAdded).void } - def on_const(event); end - - # source://tapioca//lib/tapioca/gem/listeners/base.rb#45 - sig { params(event: ::Tapioca::Gem::MethodNodeAdded).void } - def on_method(event); end - - # source://tapioca//lib/tapioca/gem/listeners/base.rb#41 - sig { params(event: ::Tapioca::Gem::ScopeNodeAdded).void } - def on_scope(event); end -end - -# source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#7 -class Tapioca::Gem::Listeners::DynamicMixins < ::Tapioca::Gem::Listeners::Base - include ::Tapioca::Runtime::AttachedClassOf - include ::Tapioca::Runtime::Reflection - - private - - # source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#31 - sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } - def ignore?(event); end - - # source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#15 - sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } - def on_scope(event); end -end - -# source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#7 -class Tapioca::Gem::Listeners::ForeignConstants < ::Tapioca::Gem::Listeners::Base - include ::Tapioca::Runtime::AttachedClassOf - include ::Tapioca::Runtime::Reflection - - private - - # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#60 - sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } - def ignore?(event); end - - # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#55 - sig { params(location: ::String).returns(T::Boolean) } - def mixed_in_by_gem?(location); end - - # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#15 - sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } - def on_scope(event); end -end - -# source://tapioca//lib/tapioca/gem/listeners/methods.rb#7 -class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base - include ::Tapioca::SorbetHelper - include ::Tapioca::RBIHelper - include ::Tapioca::Runtime::AttachedClassOf - include ::Tapioca::Runtime::Reflection - - private - - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#34 - sig { params(tree: ::RBI::Tree, module_name: ::String, mod: ::Module, for_visibility: T::Array[::Symbol]).void } - def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#63 - sig do - params( - tree: ::RBI::Tree, - symbol_name: ::String, - constant: ::Module, - method: T.nilable(::UnboundMethod), - visibility: ::RBI::Visibility - ).void - end - def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#191 - sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } - def ignore?(event); end - - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#184 - sig { params(constant: ::Module).returns(T.nilable(::UnboundMethod)) } - def initialize_method_for(constant); end - - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#165 - sig { params(mod: ::Module).returns(T::Hash[::Symbol, T::Array[::Symbol]]) } - def method_names_by_visibility(mod); end - - # Check whether the method is defined by the constant. - # - # In most cases, it works to check that the constant is the method owner. However, - # in the case that a method is also defined in a module prepended to the constant, it - # will be owned by the prepended module, not the constant. - # - # This method implements a better way of checking whether a constant defines a method. - # It walks up the ancestor tree via the `super_method` method; if any of the super - # methods are owned by the constant, it means that the constant declares the method. - # - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#151 - sig { params(method: ::UnboundMethod, constant: ::Module).returns(T::Boolean) } - def method_owned_by_constant?(method, constant); end - - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#16 - sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } - def on_scope(event); end - - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#174 - sig { params(constant: ::Module, method_name: ::String).returns(T::Boolean) } - def struct_method?(constant, method_name); end -end - -# source://tapioca//lib/tapioca/gem/listeners/mixins.rb#7 -class Tapioca::Gem::Listeners::Mixins < ::Tapioca::Gem::Listeners::Base - include ::Tapioca::Runtime::AttachedClassOf - include ::Tapioca::Runtime::Reflection - - private - - # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#42 - sig do - params( - tree: ::RBI::Tree, - constant: ::Module, - mods: T::Array[::Module], - mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type - ).void - end - def add_mixins(tree, constant, mods, mixin_type); end - - # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#84 - sig { params(mixin_name: ::String).returns(T::Boolean) } - def filtered_mixin?(mixin_name); end - - # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#91 - sig { params(constant: ::Module).returns(T::Array[::Module]) } - def interesting_ancestors_of(constant); end - - # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#75 - sig do - params( - constant: ::Module, - mixin: ::Module, - mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type - ).returns(T::Boolean) - end - def mixed_in_by_gem?(constant, mixin, mixin_type); end - - # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#15 - sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } - def on_scope(event); end -end - -# source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#7 -class Tapioca::Gem::Listeners::RemoveEmptyPayloadScopes < ::Tapioca::Gem::Listeners::Base - include ::Tapioca::Runtime::AttachedClassOf - include ::Tapioca::Runtime::Reflection - - private - - # source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#20 - sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } - def ignore?(event); end - - # source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#15 - sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } - def on_scope(event); end -end - -# source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#7 -class Tapioca::Gem::Listeners::SorbetEnums < ::Tapioca::Gem::Listeners::Base - private - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#25 - sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } - def ignore?(event); end - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#13 - sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } - def on_scope(event); end -end - -# source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#7 -class Tapioca::Gem::Listeners::SorbetHelpers < ::Tapioca::Gem::Listeners::Base - include ::Tapioca::Runtime::AttachedClassOf - include ::Tapioca::Runtime::Reflection - - private - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#28 - sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } - def ignore?(event); end - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#15 - sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } - def on_scope(event); end -end - -# source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#7 -class Tapioca::Gem::Listeners::SorbetProps < ::Tapioca::Gem::Listeners::Base - private - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#32 - sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } - def ignore?(event); end - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#13 - sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } - def on_scope(event); end -end - -# source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#7 -class Tapioca::Gem::Listeners::SorbetRequiredAncestors < ::Tapioca::Gem::Listeners::Base - private - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#23 - sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } - def ignore?(event); end - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#13 - sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } - def on_scope(event); end -end - -# source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#7 -class Tapioca::Gem::Listeners::SorbetSignatures < ::Tapioca::Gem::Listeners::Base - include ::Tapioca::Runtime::AttachedClassOf - include ::Tapioca::Runtime::Reflection - include ::Tapioca::SorbetHelper - include ::Tapioca::RBIHelper - - private - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#26 - sig { params(signature: T.untyped, parameters: T::Array[[::Symbol, ::String]]).returns(::RBI::Sig) } - def compile_signature(signature, parameters); end - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#78 - sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } - def ignore?(event); end - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#18 - sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } - def on_method(event); end - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#68 - sig { params(signature: T.untyped).returns(T::Boolean) } - def signature_final?(signature); end -end - -# source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#13 -Tapioca::Gem::Listeners::SorbetSignatures::TYPE_PARAMETER_MATCHER = T.let(T.unsafe(nil), Regexp) - -# source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#7 -class Tapioca::Gem::Listeners::SorbetTypeVariables < ::Tapioca::Gem::Listeners::Base - include ::Tapioca::Runtime::AttachedClassOf - include ::Tapioca::Runtime::Reflection - - private - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#27 - sig { params(tree: ::RBI::Tree, constant: ::Module).void } - def compile_type_variable_declarations(tree, constant); end - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#50 - sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } - def ignore?(event); end - - # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#15 - sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } - def on_scope(event); end -end - -# source://tapioca//lib/tapioca/gem/listeners/source_location.rb#7 -class Tapioca::Gem::Listeners::SourceLocation < ::Tapioca::Gem::Listeners::Base - private - - # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#41 - sig { params(node: ::RBI::NodeWithComments, file: T.nilable(::String), line: T.nilable(::Integer)).void } - def add_source_location_comment(node, file, line); end - - # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#13 - sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void } - def on_const(event); end - - # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#35 - sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } - def on_method(event); end - - # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#19 - sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } - def on_scope(event); end -end - -# source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#7 -class Tapioca::Gem::Listeners::Subconstants < ::Tapioca::Gem::Listeners::Base - include ::Tapioca::Runtime::AttachedClassOf - include ::Tapioca::Runtime::Reflection - - private - - # source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#36 - sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } - def ignore?(event); end - - # source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#15 - sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } - def on_scope(event); end -end - -# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#7 -class Tapioca::Gem::Listeners::YardDoc < ::Tapioca::Gem::Listeners::Base - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#27 - sig { params(pipeline: ::Tapioca::Gem::Pipeline).void } - def initialize(pipeline); end - - private - - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#55 - sig { params(name: ::String, sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } - def documentation_comments(name, sigs: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#99 - sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } - def ignore?(event); end - - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#36 - sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void } - def on_const(event); end - - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#46 - sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } - def on_method(event); end - - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#41 - sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } - def on_scope(event); end -end - -# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#10 -Tapioca::Gem::Listeners::YardDoc::IGNORED_COMMENTS = T.let(T.unsafe(nil), Array) - -# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#24 -Tapioca::Gem::Listeners::YardDoc::IGNORED_SIG_TAGS = T.let(T.unsafe(nil), Array) - -# source://tapioca//lib/tapioca/gem/events.rb#105 -class Tapioca::Gem::MethodNodeAdded < ::Tapioca::Gem::NodeAdded - # source://tapioca//lib/tapioca/gem/events.rb#130 - sig do - params( - symbol: ::String, - constant: ::Module, - method: ::UnboundMethod, - node: ::RBI::Method, - signature: T.untyped, - parameters: T::Array[[::Symbol, ::String]] - ).void - end - def initialize(symbol, constant, method, node, signature, parameters); end - - # source://tapioca//lib/tapioca/gem/events.rb#109 - sig { returns(::UnboundMethod) } - def method; end - - # source://tapioca//lib/tapioca/gem/events.rb#112 - sig { returns(::RBI::Method) } - def node; end - - # source://tapioca//lib/tapioca/gem/events.rb#118 - sig { returns(T::Array[[::Symbol, ::String]]) } - def parameters; end - - # source://tapioca//lib/tapioca/gem/events.rb#115 - sig { returns(T.untyped) } - def signature; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://tapioca//lib/tapioca/gem/events.rb#57 -class Tapioca::Gem::NodeAdded < ::Tapioca::Gem::Event - abstract! - - # source://tapioca//lib/tapioca/gem/events.rb#70 - sig { params(symbol: ::String, constant: ::Module).void } - def initialize(symbol, constant); end - - # source://tapioca//lib/tapioca/gem/events.rb#67 - sig { returns(::Module) } - def constant; end - - # source://tapioca//lib/tapioca/gem/events.rb#64 - sig { returns(::String) } - def symbol; end -end - -# source://tapioca//lib/tapioca/gem/pipeline.rb#6 -class Tapioca::Gem::Pipeline - include ::Tapioca::Runtime::AttachedClassOf - include ::Tapioca::Runtime::Reflection - include ::Tapioca::SorbetHelper - include ::Tapioca::RBIHelper - - # source://tapioca//lib/tapioca/gem/pipeline.rb#17 - sig { params(gem: ::Tapioca::Gemfile::GemSpec, include_doc: T::Boolean, include_loc: T::Boolean).void } - def initialize(gem, include_doc: T.unsafe(nil), include_loc: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#48 - sig { returns(::RBI::Tree) } - def compile; end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#110 - sig { params(name: T.any(::String, ::Symbol)).returns(T::Boolean) } - def constant_in_gem?(name); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#14 - sig { returns(::Tapioca::Gemfile::GemSpec) } - def gem; end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#122 - sig { params(method: ::UnboundMethod).returns(T::Boolean) } - def method_in_gem?(method); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#130 - sig { params(constant: ::Module).returns(T.nilable(::String)) } - def name_of(constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#69 - sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } - def push_const(symbol, constant, node); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#59 - sig { params(symbol: ::String, constant: ::BasicObject).void } - def push_constant(symbol, constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#64 - sig { params(symbol: ::String, constant: ::Module).void } - def push_foreign_constant(symbol, constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#83 - sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } - def push_foreign_scope(symbol, constant, node); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#97 - sig do - params( - symbol: ::String, - constant: ::Module, - method: ::UnboundMethod, - node: ::RBI::Method, - signature: T.untyped, - parameters: T::Array[[::Symbol, ::String]] - ).void - end - def push_method(symbol, constant, method, node, signature, parameters); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#76 - sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } - def push_scope(symbol, constant, node); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#54 - sig { params(symbol: ::String).void } - def push_symbol(symbol); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#102 - sig { params(symbol_name: ::String).returns(T::Boolean) } - def symbol_in_payload?(symbol_name); end - - private - - # source://tapioca//lib/tapioca/gem/pipeline.rb#376 - sig { params(name: ::String).void } - def add_to_alias_namespace(name); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#381 - sig { params(name: ::String).returns(T::Boolean) } - def alias_namespaced?(name); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#225 - sig { params(name: ::String, constant: ::Module).void } - def compile_alias(name, constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#211 - sig { params(symbol: ::String, constant: ::BasicObject).void } - def compile_constant(symbol, constant); end - - # Compile - # - # source://tapioca//lib/tapioca/gem/pipeline.rb#206 - sig { params(symbol: ::String, constant: ::Module).void } - def compile_foreign_constant(symbol, constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#283 - sig { params(name: ::String, constant: ::Module, foreign_constant: T::Boolean).void } - def compile_module(name, constant, foreign_constant: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#247 - sig { params(name: ::String, value: ::BasicObject).void } - def compile_object(name, value); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#308 - sig { params(constant: ::Class).returns(T.nilable(::String)) } - def compile_superclass(constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#357 - sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) } - def defined_in_gem?(constant, strict: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#158 - sig { params(event: ::Tapioca::Gem::Event).void } - def dispatch(event); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#398 - sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) } - def generic_name_of(constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#369 - sig { params(constant: ::Module).returns(T::Set[::String]) } - def get_file_candidates(constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#145 - sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } - def load_bootstrap_symbols(gem); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#388 - sig { params(name: ::String).void } - def mark_seen(name); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#414 - sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) } - def name_of_proxy_target(constant, class_name); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#153 - sig { returns(::Tapioca::Gem::Event) } - def next_event; end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#181 - sig { params(event: ::Tapioca::Gem::ConstantFound).void } - def on_constant(event); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#199 - sig { params(event: ::Tapioca::Gem::NodeAdded).void } - def on_node(event); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#172 - sig { params(event: ::Tapioca::Gem::SymbolFound).void } - def on_symbol(event); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#393 - sig { params(name: ::String).returns(T::Boolean) } - def seen?(name); end -end - -# source://tapioca//lib/tapioca/gem/pipeline.rb#11 -Tapioca::Gem::Pipeline::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array) - -# source://tapioca//lib/tapioca/gem/events.rb#90 -class Tapioca::Gem::ScopeNodeAdded < ::Tapioca::Gem::NodeAdded - # source://tapioca//lib/tapioca/gem/events.rb#97 - sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } - def initialize(symbol, constant, node); end - - # source://tapioca//lib/tapioca/gem/events.rb#94 - sig { returns(::RBI::Scope) } - def node; end -end - -# source://tapioca//lib/tapioca/gem/events.rb#13 -class Tapioca::Gem::SymbolFound < ::Tapioca::Gem::Event - # source://tapioca//lib/tapioca/gem/events.rb#20 - sig { params(symbol: ::String).void } - def initialize(symbol); end - - # source://tapioca//lib/tapioca/gem/events.rb#17 - sig { returns(::String) } - def symbol; end -end - -# source://tapioca//lib/tapioca/helpers/gem_helper.rb#5 -module Tapioca::GemHelper - # source://tapioca//lib/tapioca/helpers/gem_helper.rb#9 - sig { params(app_dir: T.any(::Pathname, ::String), full_gem_path: ::String).returns(T::Boolean) } - def gem_in_app_dir?(app_dir, full_gem_path); end - - # source://tapioca//lib/tapioca/helpers/gem_helper.rb#17 - sig { params(full_gem_path: ::String).returns(T::Boolean) } - def gem_in_bundle_path?(full_gem_path); end - - # source://tapioca//lib/tapioca/helpers/gem_helper.rb#22 - sig { params(full_gem_path: ::String).returns(T::Boolean) } - def gem_in_ruby_path?(full_gem_path); end - - # source://tapioca//lib/tapioca/helpers/gem_helper.rb#27 - sig { params(path: T.any(::Pathname, ::String)).returns(::String) } - def to_realpath(path); end - - private - - # source://tapioca//lib/tapioca/helpers/gem_helper.rb#36 - sig { params(path: T.any(::Pathname, ::String), dir: T.any(::Pathname, ::String)).returns(T::Boolean) } - def path_in_dir?(path, dir); end -end - -# source://tapioca//lib/tapioca/gemfile.rb#5 -class Tapioca::Gemfile - # source://tapioca//lib/tapioca/gemfile.rb#69 - sig { params(exclude: T::Array[::String]).void } - def initialize(exclude); end - - # source://tapioca//lib/tapioca/gemfile.rb#60 - sig { returns(::Bundler::Definition) } - def definition; end - - # source://tapioca//lib/tapioca/gemfile.rb#63 - sig { returns(T::Array[::Tapioca::Gemfile::GemSpec]) } - def dependencies; end - - # source://tapioca//lib/tapioca/gemfile.rb#80 - sig { params(gem_name: ::String).returns(T.nilable(::Tapioca::Gemfile::GemSpec)) } - def gem(gem_name); end - - # source://tapioca//lib/tapioca/gemfile.rb#66 - sig { returns(T::Array[::String]) } - def missing_specs; end - - # source://tapioca//lib/tapioca/gemfile.rb#85 - sig { void } - def require_bundle; end - - private - - # source://tapioca//lib/tapioca/gemfile.rb#130 - sig { returns(::String) } - def dir; end - - # source://tapioca//lib/tapioca/gemfile.rb#92 - sig { returns(::File) } - def gemfile; end - - # source://tapioca//lib/tapioca/gemfile.rb#125 - sig { returns(T::Array[::Symbol]) } - def groups; end - - # source://tapioca//lib/tapioca/gemfile.rb#95 - sig { returns([T::Array[::Tapioca::Gemfile::GemSpec], T::Array[::String]]) } - def load_dependencies; end - - # @return [File] - # - # source://tapioca//lib/tapioca/gemfile.rb#92 - def lockfile; end - - # source://tapioca//lib/tapioca/gemfile.rb#106 - sig { returns([T::Enumerable[T.any(::Bundler::StubSpecification, ::Gem::Specification)], T::Array[::String]]) } - def materialize_deps; end - - # source://tapioca//lib/tapioca/gemfile.rb#120 - sig { returns(::Bundler::Runtime) } - def runtime; end -end - -# This is a module that gets prepended to `Bundler::Dependency` and -# makes sure even gems marked as `require: false` are required during -# `Bundler.require`. -# -# source://tapioca//lib/tapioca/gemfile.rb#18 -module Tapioca::Gemfile::AutoRequireHook - requires_ancestor { Bundler::Dependency } - - # source://tapioca//lib/tapioca/gemfile.rb#39 - sig { returns(T.untyped) } - def autorequire; end - - class << self - # source://tapioca//lib/tapioca/gemfile.rb#30 - sig { params(exclude: T::Array[::String]).returns(T::Array[::String]) } - def exclude=(exclude); end - - # source://tapioca//lib/tapioca/gemfile.rb#33 - sig { params(name: T.untyped).returns(T::Boolean) } - def excluded?(name); end - end -end - -# source://tapioca//lib/tapioca/gemfile.rb#134 -class Tapioca::Gemfile::GemSpec - include ::Tapioca::GemHelper - - # source://tapioca//lib/tapioca/gemfile.rb#173 - sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void } - def initialize(spec); end - - # source://tapioca//lib/tapioca/gemfile.rb#183 - sig { params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://tapioca//lib/tapioca/gemfile.rb#203 - sig { params(path: ::String).returns(T::Boolean) } - def contains_path?(path); end - - # source://tapioca//lib/tapioca/gemfile.rb#222 - sig { returns(T::Boolean) } - def export_rbi_files?; end - - # source://tapioca//lib/tapioca/gemfile.rb#217 - sig { returns(T::Array[::String]) } - def exported_rbi_files; end - - # source://tapioca//lib/tapioca/gemfile.rb#227 - sig { returns(::RBI::MergeTree) } - def exported_rbi_tree; end - - # source://tapioca//lib/tapioca/gemfile.rb#170 - sig { returns(T::Array[::Pathname]) } - def files; end - - # source://tapioca//lib/tapioca/gemfile.rb#167 - sig { returns(::String) } - def full_gem_path; end - - # source://tapioca//lib/tapioca/gemfile.rb#188 - sig { params(gemfile_dir: ::String).returns(T::Boolean) } - def ignore?(gemfile_dir); end - - # source://tapioca//lib/tapioca/gemfile.rb#193 - sig { returns(::String) } - def name; end - - # source://tapioca//lib/tapioca/gemfile.rb#212 - sig { void } - def parse_yard_docs; end - - # source://tapioca//lib/tapioca/gemfile.rb#198 - sig { returns(::String) } - def rbi_file_name; end - - # source://tapioca//lib/tapioca/gemfile.rb#239 - sig { params(file: ::Pathname).returns(::Pathname) } - def relative_path_for(file); end - - # @return [String] - # - # source://tapioca//lib/tapioca/gemfile.rb#167 - def version; end - - private - - # source://tapioca//lib/tapioca/gemfile.rb#250 - sig { returns(T::Array[::Pathname]) } - def collect_files; end - - # source://tapioca//lib/tapioca/gemfile.rb#265 - sig { returns(T.nilable(T::Boolean)) } - def default_gem?; end - - # source://tapioca//lib/tapioca/gemfile.rb#323 - sig { returns(T::Boolean) } - def gem_ignored?; end - - # source://tapioca//lib/tapioca/gemfile.rb#302 - sig { params(path: ::String).returns(T::Boolean) } - def has_parent_gemspec?(path); end - - # source://tapioca//lib/tapioca/gemfile.rb#270 - sig { returns(::Regexp) } - def require_paths_prefix_matcher; end - - # source://tapioca//lib/tapioca/gemfile.rb#281 - sig { params(file: ::String).returns(::Pathname) } - def resolve_to_ruby_lib_dir(file); end - - # source://tapioca//lib/tapioca/gemfile.rb#295 - sig { returns(::String) } - def version_string; end - - class << self - # source://tapioca//lib/tapioca/gemfile.rb#142 - sig { returns(T::Hash[::String, ::Tapioca::Gemfile::GemSpec]) } - def spec_lookup_by_file_path; end - end -end - -# source://tapioca//lib/tapioca/gemfile.rb#154 -Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array) - -# source://tapioca//lib/tapioca/gemfile.rb#8 -Tapioca::Gemfile::Spec = T.type_alias { T.any(::Bundler::StubSpecification, ::Gem::Specification) } - -# source://tapioca//lib/tapioca/loaders/loader.rb#5 -module Tapioca::Loaders; end - -# source://tapioca//lib/tapioca/loaders/dsl.rb#6 -class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader - # source://tapioca//lib/tapioca/loaders/dsl.rb#29 - sig { params(tapioca_path: ::String, eager_load: T::Boolean, app_root: ::String).void } - def initialize(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/loaders/dsl.rb#20 - sig { override.void } - def load; end - - protected - - # source://tapioca//lib/tapioca/loaders/dsl.rb#61 - sig { void } - def load_application; end - - # source://tapioca//lib/tapioca/loaders/dsl.rb#43 - sig { void } - def load_dsl_compilers; end - - # source://tapioca//lib/tapioca/loaders/dsl.rb#38 - sig { void } - def load_dsl_extensions; end - - class << self - # source://tapioca//lib/tapioca/loaders/dsl.rb#13 - sig { params(tapioca_path: ::String, eager_load: T::Boolean, app_root: ::String).void } - def load_application(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil)); end - end -end - -# source://tapioca//lib/tapioca/loaders/gem.rb#6 -class Tapioca::Loaders::Gem < ::Tapioca::Loaders::Loader - # source://tapioca//lib/tapioca/loaders/gem.rb#46 - sig do - params( - bundle: ::Tapioca::Gemfile, - prerequire: T.nilable(::String), - postrequire: ::String, - default_command: ::String - ).void - end - def initialize(bundle:, prerequire:, postrequire:, default_command:); end - - # source://tapioca//lib/tapioca/loaders/gem.rb#32 - sig { override.void } - def load; end - - protected - - # source://tapioca//lib/tapioca/loaders/gem.rb#76 - sig { params(file: ::String, error: ::LoadError).void } - def explain_failed_require(file, error); end - - # source://tapioca//lib/tapioca/loaders/gem.rb#56 - sig { void } - def require_gem_file; end - - class << self - # source://tapioca//lib/tapioca/loaders/gem.rb#20 - sig do - params( - bundle: ::Tapioca::Gemfile, - prerequire: T.nilable(::String), - postrequire: ::String, - default_command: ::String - ).void - end - def load_application(bundle:, prerequire:, postrequire:, default_command:); end - end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://tapioca//lib/tapioca/loaders/loader.rb#6 -class Tapioca::Loaders::Loader - include ::Thor::Base - include ::Thor::Invocation - include ::Thor::Shell - include ::Tapioca::CliHelper - include ::Tapioca::GemHelper - extend ::Thor::Base::ClassMethods - extend ::Thor::Invocation::ClassMethods - - abstract! - - # source://sorbet-runtime/0.5.10761/lib/types/private/abstract/declare.rb#37 - def initialize(*args, **_arg1, &blk); end - - # @abstract - # - # source://tapioca//lib/tapioca/loaders/loader.rb#17 - sig { abstract.void } - def load; end - - private - - # source://tapioca//lib/tapioca/loaders/loader.rb#182 - sig { void } - def eager_load_rails_app; end - - # @return [Array<T.class_of(Rails::Engine)>] - # - # source://tapioca//lib/tapioca/loaders/loader.rb#153 - def engines; end - - # source://tapioca//lib/tapioca/loaders/loader.rb#24 - sig do - params( - gemfile: ::Tapioca::Gemfile, - initialize_file: T.nilable(::String), - require_file: T.nilable(::String) - ).void - end - def load_bundle(gemfile, initialize_file, require_file); end - - # source://tapioca//lib/tapioca/loaders/loader.rb#111 - sig { void } - def load_engines_in_classic_mode; end - - # source://tapioca//lib/tapioca/loaders/loader.rb#89 - sig { void } - def load_engines_in_zeitwerk_mode; end - - # source://tapioca//lib/tapioca/loaders/loader.rb#37 - sig { params(environment_load: T::Boolean, eager_load: T::Boolean, app_root: ::String).void } - def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil), app_root: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/loaders/loader.rb#64 - sig { void } - def load_rails_engines; end - - # source://tapioca//lib/tapioca/loaders/loader.rb#203 - sig { params(file: T.nilable(::String)).void } - def require_helper(file); end - - # source://tapioca//lib/tapioca/loaders/loader.rb#78 - def run_initializers; end - - # source://tapioca//lib/tapioca/loaders/loader.rb#167 - sig { params(path: ::String).void } - def safe_require(path); end - - # source://tapioca//lib/tapioca/loaders/loader.rb#174 - sig { void } - def silence_deprecations; end - - # source://tapioca//lib/tapioca/loaders/loader.rb#136 - sig { params(blk: T.proc.void).void } - def with_rails_application(&blk); end - - # source://tapioca//lib/tapioca/loaders/loader.rb#129 - sig { returns(T::Boolean) } - def zeitwerk_mode?; end -end - -# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#5 -module Tapioca::RBIFilesHelper - requires_ancestor { Tapioca::SorbetHelper } - requires_ancestor { Thor::Shell } - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#48 - sig do - params( - index: ::RBI::Index, - shim_rbi_dir: ::String, - todo_rbi_file: ::String - ).returns(T::Hash[::String, T::Array[::RBI::Node]]) - end - def duplicated_nodes_from_index(index, shim_rbi_dir:, todo_rbi_file:); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#13 - sig { params(index: ::RBI::Index, kind: ::String, file: ::String).void } - def index_rbi(index, kind, file); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#25 - sig { params(index: ::RBI::Index, kind: ::String, dir: ::String, number_of_workers: T.nilable(::Integer)).void } - def index_rbis(index, kind, dir, number_of_workers:); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#65 - sig { params(loc: ::RBI::Loc, path_prefix: T.nilable(::String)).returns(::String) } - def location_to_payload_url(loc, path_prefix:); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#86 - sig do - params( - command: ::String, - gem_dir: ::String, - dsl_dir: ::String, - auto_strictness: T::Boolean, - gems: T::Array[::Tapioca::Gemfile::GemSpec], - compilers: T::Enumerable[::Class] - ).void - end - def validate_rbi_files(command:, gem_dir:, dsl_dir:, auto_strictness:, gems: T.unsafe(nil), compilers: T.unsafe(nil)); end - - private - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#209 - sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[::RBI::Scope]) } - def extract_empty_scopes(nodes); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#214 - sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) } - def extract_methods_and_attrs(nodes); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#224 - sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Mixin, ::RBI::RequiresAncestor)]) } - def extract_mixins(nodes); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#234 - sig do - params( - nodes: T::Array[T.any(::RBI::Attr, ::RBI::Method)] - ).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) - end - def extract_nodes_with_sigs(nodes); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#202 - sig do - params( - nodes: T::Array[::RBI::Node], - shim_rbi_dir: ::String, - todo_rbi_file: ::String - ).returns(T::Array[::RBI::Node]) - end - def extract_shims_and_todos(nodes, shim_rbi_dir:, todo_rbi_file:); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#266 - sig { params(path: ::String).returns(::String) } - def gem_name_from_rbi_path(path); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#155 - sig { params(index: ::RBI::Index, files: T::Array[::String], number_of_workers: T.nilable(::Integer)).void } - def parse_and_index_files(index, files, number_of_workers:); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#171 - sig { params(nodes: T::Array[::RBI::Node], shim_rbi_dir: ::String, todo_rbi_file: ::String).returns(T::Boolean) } - def shims_or_todos_have_duplicates?(nodes, shim_rbi_dir:, todo_rbi_file:); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#239 - sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error], gem_dir: ::String).void } - def update_gem_rbis_strictnesses(errors, gem_dir); end -end - -# source://tapioca//lib/tapioca/rbi_formatter.rb#5 -class Tapioca::RBIFormatter < ::RBI::Formatter - # source://tapioca//lib/tapioca/rbi_formatter.rb#22 - sig { params(file: ::RBI::File).void } - def write_empty_body_comment!(file); end - - # source://tapioca//lib/tapioca/rbi_formatter.rb#15 - sig { params(file: ::RBI::File, command: ::String, reason: T.nilable(::String)).void } - def write_header!(file, command, reason: T.unsafe(nil)); end -end - -# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#5 -module Tapioca::RBIHelper - include ::Tapioca::SorbetHelper - extend ::Tapioca::SorbetHelper - extend ::Tapioca::RBIHelper - - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#91 - sig { params(type: ::String).returns(::String) } - def as_nilable_type(type); end - - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#72 - sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } - def create_block_param(name, type:); end - - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#62 - sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) } - def create_kw_opt_param(name, type:, default:); end - - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#57 - sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } - def create_kw_param(name, type:); end - - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#67 - sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } - def create_kw_rest_param(name, type:); end - - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#47 - sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) } - def create_opt_param(name, type:, default:); end - - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#42 - sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } - def create_param(name, type:); end - - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#52 - sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } - def create_rest_param(name, type:); end - - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#77 - sig { params(param: ::RBI::Param, type: ::String).returns(::RBI::TypedParam) } - def create_typed_param(param, type); end - - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#82 - sig { params(sig_string: ::String).returns(::String) } - def sanitize_signature_types(sig_string); end - - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#100 - sig { params(name: ::String).returns(T::Boolean) } - def valid_method_name?(name); end - - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#114 - sig { params(name: ::String).returns(T::Boolean) } - def valid_parameter_name?(name); end - - class << self - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#23 - sig do - params( - type: ::String, - variance: ::Symbol, - fixed: T.nilable(::String), - upper: T.nilable(::String), - lower: T.nilable(::String) - ).returns(::String) - end - def serialize_type_variable(type, variance, fixed, upper, lower); end - end -end - -# source://tapioca//lib/tapioca/repo_index.rb#5 -class Tapioca::RepoIndex - # source://tapioca//lib/tapioca/repo_index.rb#26 - sig { void } - def initialize; end - - # source://tapioca//lib/tapioca/repo_index.rb#31 - sig { params(gem_name: ::String).void } - def <<(gem_name); end - - # source://tapioca//lib/tapioca/repo_index.rb#36 - sig { returns(T::Enumerable[::String]) } - def gems; end - - # source://tapioca//lib/tapioca/repo_index.rb#41 - sig { params(gem_name: ::String).returns(T::Boolean) } - def has_gem?(gem_name); end - - class << self - # source://tapioca//lib/tapioca/repo_index.rb#18 - sig { params(hash: T::Hash[::String, T::Hash[T.untyped, T.untyped]]).returns(Tapioca::RepoIndex) } - def from_hash(hash); end - - # source://tapioca//lib/tapioca/repo_index.rb#13 - sig { params(json: ::String).returns(Tapioca::RepoIndex) } - def from_json(json); end - end -end - -# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#5 -module Tapioca::Runtime; end - -# This module should only be included when running versions of Ruby -# older than 3.2. Because the Class#attached_object method is not -# available, it implements finding the attached class of a singleton -# class by iterating through ObjectSpace. -module Tapioca::Runtime::AttachedClassOf - # source://tapioca//lib/tapioca/runtime/attached_class_of_32.rb#14 - sig { params(singleton_class: ::Class).returns(T.nilable(::Module)) } - def attached_class_of(singleton_class); end -end - -# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#6 -class Tapioca::Runtime::DynamicMixinCompiler - include ::Tapioca::Runtime::AttachedClassOf - include ::Tapioca::Runtime::Reflection - - # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#20 - sig { params(constant: ::Module).void } - def initialize(constant); end - - # @return [Array<Symbol>] - # - # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 - def class_attribute_predicates; end - - # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 - sig { returns(T::Array[::Symbol]) } - def class_attribute_readers; end - - # @return [Array<Symbol>] - # - # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 - def class_attribute_writers; end - - # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#137 - sig { params(tree: ::RBI::Tree).void } - def compile_class_attributes(tree); end - - # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#180 - sig { params(tree: ::RBI::Tree).returns([T::Array[::Module], T::Array[::Module]]) } - def compile_mixes_in_class_methods(tree); end - - # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#11 - sig { returns(T::Array[::Module]) } - def dynamic_extends; end - - # @return [Array<Module>] - # - # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#11 - def dynamic_includes; end - - # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#132 - sig { returns(T::Boolean) } - def empty_attributes?; end - - # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#222 - sig { params(qualified_mixin_name: ::String).returns(T::Boolean) } - def filtered_mixin?(qualified_mixin_name); end - - # @return [Array<Symbol>] - # - # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 - def instance_attribute_predicates; end - - # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 - sig { returns(T::Array[::Symbol]) } - def instance_attribute_readers; end - - # @return [Array<Symbol>] - # - # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 - def instance_attribute_writers; end - - # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#215 - sig { params(mod: ::Module, dynamic_extends: T::Array[::Module]).returns(T::Boolean) } - def module_included_by_another_dynamic_extend?(mod, dynamic_extends); end -end - -# This class is responsible for storing and looking up information related to generic types. -# -# The class stores 2 different kinds of data, in two separate lookup tables: -# 1. a lookup of generic type instances by name: `@generic_instances` -# 2. a lookup of type variable serializer by constant and type variable -# instance: `@type_variables` -# -# By storing the above data, we can cheaply query each constant against this registry -# to see if it declares any generic type variables. This becomes a simple lookup in the -# `@type_variables` hash table with the given constant. -# -# If there is no entry, then we can cheaply know that we can skip generic type -# information generation for this type. -# -# On the other hand, if we get a result, then the result will be a hash of type -# variable to type variable serializers. This allows us to associate type variables -# to the constant names that represent them, easily. -# -# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#23 -module Tapioca::Runtime::GenericTypeRegistry - class << self - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#80 - sig { params(instance: ::Object).returns(T::Boolean) } - def generic_type_instance?(instance); end - - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#85 - sig { params(constant: ::Module).returns(T.nilable(T::Array[::Tapioca::TypeVariableModule])) } - def lookup_type_variables(constant); end - - # This method is responsible for building the name of the instantiated concrete type - # and cloning the given constant so that we can return a type that is the same - # as the current type but is a different instance and has a different name method. - # - # We cache those cloned instances by their name in `@generic_instances`, so that - # we don't keep instantiating a new type every single time it is referenced. - # For example, `[Foo[Integer], Foo[Integer], Foo[Integer], Foo[String]]` will only - # result in 2 clones (1 for `Foo[Integer]` and another for `Foo[String]`) and - # 2 hash lookups (for the other two `Foo[Integer]`s). - # - # This method returns the created or cached clone of the constant. - # - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#65 - sig { params(constant: T.untyped, types: T.untyped).returns(::Module) } - def register_type(constant, types); end - - # This method is called from intercepted calls to `type_member` and `type_template`. - # We get passed all the arguments to those methods, as well as the `T::Types::TypeVariable` - # instance generated by the Sorbet defined `type_member`/`type_template` call on `T::Generic`. - # - # This method creates a `String` with that data and stores it in the - # `@type_variables` lookup table, keyed by the `constant` and `type_variable`. - # - # Finally, the original `type_variable` is returned from this method, so that the caller - # can return it from the original methods as well. - # - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#104 - sig { params(constant: T.untyped, type_variable: ::Tapioca::TypeVariableModule).void } - def register_type_variable(constant, type_variable); end - - private - - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#113 - sig { params(constant: ::Module, name: ::String).returns(::Module) } - def create_generic_type(constant, name); end - - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#155 - sig { params(constant: ::Class).returns(::Class) } - def create_safe_subclass(constant); end - - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#182 - sig { params(constant: ::Module).returns(T::Array[::Tapioca::TypeVariableModule]) } - def lookup_or_initialize_type_variables(constant); end - end -end - -# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#34 -class Tapioca::Runtime::GenericTypeRegistry::GenericType < ::T::Types::Simple - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#38 - sig { params(raw_type: ::Module, underlying_type: ::Module).void } - def initialize(raw_type, underlying_type); end - - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#45 - sig { params(obj: T.untyped).returns(T::Boolean) } - def valid?(obj); end -end - -module Tapioca::Runtime::Reflection - include ::Tapioca::Runtime::AttachedClassOf - extend ::Tapioca::Runtime::AttachedClassOf - extend ::Tapioca::Runtime::Reflection - - # source://tapioca//lib/tapioca/runtime/reflection.rb#77 - sig { params(constant: ::Module).returns(T::Array[::Module]) } - def ancestors_of(constant); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#92 - sig { params(object: ::BasicObject, other: ::BasicObject).returns(T::Boolean) } - def are_equal?(object, other); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#56 - sig { params(object: ::BasicObject).returns(::Class) } - def class_of(object); end - - # @param constant [BasicObject] - # @return [Boolean] - # - # source://tapioca//lib/tapioca/runtime/reflection.rb#38 - def constant_defined?(constant); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#49 - sig { params(symbol: ::String, inherit: T::Boolean, namespace: ::Module).returns(::BasicObject) } - def constantize(symbol, inherit: T.unsafe(nil), namespace: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#61 - sig { params(constant: ::Module).returns(T::Array[::Symbol]) } - def constants_of(constant); end - - # Returns an array with all classes that are < than the supplied class. - # - # class C; end - # descendants_of(C) # => [] - # - # class B < C; end - # descendants_of(C) # => [B] - # - # class A < B; end - # descendants_of(C) # => [B, A] - # - # class D < C; end - # descendants_of(C) # => [B, A, D] - # - # source://tapioca//lib/tapioca/runtime/reflection.rb#167 - sig do - type_parameters(:U) - .params( - klass: T.all(::Class, T.type_parameter(:U)) - ).returns(T::Array[T.type_parameter(:U)]) - end - def descendants_of(klass); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#189 - sig { params(constant: ::Module).returns(T::Set[::String]) } - def file_candidates_for(constant); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#112 - sig { params(constant: ::Module).returns(T::Array[::Module]) } - def inherited_ancestors_of(constant); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#145 - sig { params(constant: ::Module, method: ::Symbol).returns(::Method) } - def method_of(constant, method); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#66 - sig { params(constant: ::Module).returns(T.nilable(::String)) } - def name_of(constant); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#140 - sig { params(type: ::T::Types::Base).returns(::String) } - def name_of_type(type); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#87 - sig { params(object: ::BasicObject).returns(::Integer) } - def object_id_of(object); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#107 - sig { params(constant: ::Module).returns(T::Array[::Symbol]) } - def private_instance_methods_of(constant); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#102 - sig { params(constant: ::Module).returns(T::Array[::Symbol]) } - def protected_instance_methods_of(constant); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#97 - sig { params(constant: ::Module).returns(T::Array[::Symbol]) } - def public_instance_methods_of(constant); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#121 - sig { params(constant: ::Module).returns(T.nilable(::String)) } - def qualified_name_of(constant); end - - # Examines the call stack to identify the closest location where a "require" is performed - # by searching for the label "<top (required)>". If none is found, it returns the location - # labeled "<main>", which is the original call site. - # - # source://tapioca//lib/tapioca/runtime/reflection.rb#179 - sig { params(locations: T.nilable(T::Array[::Thread::Backtrace::Location])).returns(::String) } - def resolve_loc(locations); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#133 - sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) } - def signature_of(method); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#72 - sig { params(constant: ::Module).returns(::Class) } - def singleton_class_of(constant); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#82 - sig { params(constant: ::Class).returns(T.nilable(::Class)) } - def superclass_of(constant); end - - private - - # source://tapioca//lib/tapioca/runtime/reflection.rb#228 - sig { params(parent: ::Module, name: ::String).returns(T.nilable(::Module)) } - def child_module_for_parent_with_name(parent, name); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#239 - sig { params(method: ::UnboundMethod).returns(T::Boolean) } - def method_defined_by_forwardable_module?(method); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#214 - sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } - def methods_for(constant); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#198 - sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } - def relevant_methods_for(constant); end -end - -# source://tapioca//lib/tapioca/runtime/reflection.rb#25 -Tapioca::Runtime::Reflection::ANCESTORS_METHOD = T.let(T.unsafe(nil), UnboundMethod) - -# source://tapioca//lib/tapioca/runtime/reflection.rb#21 -Tapioca::Runtime::Reflection::CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) - -# source://tapioca//lib/tapioca/runtime/reflection.rb#22 -Tapioca::Runtime::Reflection::CONSTANTS_METHOD = T.let(T.unsafe(nil), UnboundMethod) - -# source://tapioca//lib/tapioca/runtime/reflection.rb#28 -Tapioca::Runtime::Reflection::EQUAL_METHOD = T.let(T.unsafe(nil), UnboundMethod) - -# source://tapioca//lib/tapioca/runtime/reflection.rb#32 -Tapioca::Runtime::Reflection::METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) - -# source://tapioca//lib/tapioca/runtime/reflection.rb#23 -Tapioca::Runtime::Reflection::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) - -# source://tapioca//lib/tapioca/runtime/reflection.rb#27 -Tapioca::Runtime::Reflection::OBJECT_ID_METHOD = T.let(T.unsafe(nil), UnboundMethod) - -# source://tapioca//lib/tapioca/runtime/reflection.rb#31 -Tapioca::Runtime::Reflection::PRIVATE_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) - -# source://tapioca//lib/tapioca/runtime/reflection.rb#30 -Tapioca::Runtime::Reflection::PROTECTED_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) - -# source://tapioca//lib/tapioca/runtime/reflection.rb#29 -Tapioca::Runtime::Reflection::PUBLIC_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) - -# source://tapioca//lib/tapioca/runtime/reflection.rb#35 -Tapioca::Runtime::Reflection::REQUIRED_FROM_LABELS = T.let(T.unsafe(nil), Array) - -# source://tapioca//lib/tapioca/runtime/reflection.rb#24 -Tapioca::Runtime::Reflection::SINGLETON_CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) - -# source://tapioca//lib/tapioca/runtime/reflection.rb#26 -Tapioca::Runtime::Reflection::SUPERCLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) - -# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#6 -module Tapioca::Runtime::Trackers - class << self - # source://tapioca//lib/tapioca/runtime/trackers.rb#34 - sig { void } - def disable_all!; end - - # source://tapioca//lib/tapioca/runtime/trackers.rb#39 - sig { params(tracker: ::Tapioca::Runtime::Trackers::Tracker).void } - def register_tracker(tracker); end - - # source://tapioca//lib/tapioca/runtime/trackers.rb#21 - sig do - type_parameters(:Return) - .params( - blk: T.proc.returns(T.type_parameter(:Return)) - ).returns(T.type_parameter(:Return)) - end - def with_trackers_enabled(&blk); end - end -end - -# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#7 -module Tapioca::Runtime::Trackers::Autoload - extend ::Tapioca::Runtime::Trackers::Tracker - - class << self - # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#19 - sig { void } - def eager_load_all!; end - - # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#31 - sig { params(constant_name: ::String).void } - def register(constant_name); end - - # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#42 - sig do - type_parameters(:Result) - .params( - block: T.proc.returns(T.type_parameter(:Result)) - ).returns(T.type_parameter(:Result)) - end - def with_disabled_exits(&block); end - end -end - -# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#11 -Tapioca::Runtime::Trackers::Autoload::NOOP_METHOD = T.let(T.unsafe(nil), Proc) - -# Registers a TracePoint immediately upon load to track points at which -# classes and modules are opened for definition. This is used to track -# correspondence between classes/modules and files, as this information isn't -# available in the ruby runtime without extra accounting. -module Tapioca::Runtime::Trackers::ConstantDefinition - extend ::Tapioca::Runtime::Trackers::Tracker - extend ::Tapioca::Runtime::AttachedClassOf - extend ::Tapioca::Runtime::Reflection - - class << self - # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#61 - def build_constant_location(tp, locations); end - - # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#55 - def disable!; end - - # Returns the files in which this class or module was opened. Doesn't know - # about situations where the class was opened prior to +require+ing, - # or where metaprogramming was used via +eval+, etc. - # - # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#71 - def files_for(klass); end - - # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#75 - def locations_for(klass); end - end -end - -module Tapioca::Runtime::Trackers::Mixin - extend ::Tapioca::Runtime::Trackers::Tracker - - class << self - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#56 - sig do - params( - mixin: ::Module - ).returns(T::Hash[::Tapioca::Runtime::Trackers::Mixin::Type, T::Hash[::Module, ::String]]) - end - def constants_with_mixin(mixin); end - - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#61 - sig do - params( - mixin: ::Module, - mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type, - constant: ::Module - ).returns(T.nilable(::String)) - end - def mixin_location(mixin, mixin_type, constant); end - - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#35 - sig { params(constant: ::Module, mixin: ::Module, mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type).void } - def register(constant, mixin, mixin_type); end - - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#43 - def resolve_to_attached_class(constant, mixin, mixin_type); end - - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#30 - sig do - type_parameters(:Result) - .params( - block: T.proc.returns(T.type_parameter(:Result)) - ).returns(T.type_parameter(:Result)) - end - def with_disabled_registration(&block); end - - private - - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#76 - sig do - params( - mixin: ::Module - ).returns(T::Hash[::Tapioca::Runtime::Trackers::Mixin::Type, T::Hash[::Module, ::String]]) - end - def find_or_initialize_mixin_lookup(mixin); end - - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#68 - sig do - params( - constant: ::Module, - mixin: ::Module, - mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type, - location: ::String - ).void - end - def register_with_location(constant, mixin, mixin_type, location); end - end -end - -class Tapioca::Runtime::Trackers::Mixin::Type < ::T::Enum - enums do - Prepend = new - Include = new - Extend = new - end -end - -# source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#7 -module Tapioca::Runtime::Trackers::RequiredAncestor - extend ::Tapioca::Runtime::Trackers::Tracker - - class << self - # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#15 - sig { params(requiring: ::T::Helpers, block: T.proc.void).void } - def register(requiring, block); end - - # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#23 - sig { params(mod: ::Module).returns(T::Array[T.proc.void]) } - def required_ancestors_blocks_by(mod); end - - # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#28 - sig { params(mod: ::Module).returns(T::Array[T.untyped]) } - def required_ancestors_by(mod); end - end -end - -# @abstract Subclasses must implement the `abstract` methods below. -module Tapioca::Runtime::Trackers::Tracker - abstract! - - # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#26 - sig { void } - def disable!; end - - # @return [Boolean] - # - # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#30 - def enabled?; end - - # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#34 - def with_disabled_tracker(&block); end - - class << self - # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#17 - sig { params(base: T.all(::Module, ::Tapioca::Runtime::Trackers::Tracker)).void } - def extended(base); end - end -end - -# source://tapioca//lib/tapioca.rb#33 -Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#32 -Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#5 -module Tapioca::SorbetHelper - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#33 - sig { params(sorbet_args: ::String).returns(::Spoom::ExecResult) } - def sorbet(*sorbet_args); end - - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#38 - sig { returns(::String) } - def sorbet_path; end - - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#45 - sig { params(feature: ::Symbol, version: T.nilable(::Gem::Version)).returns(T::Boolean) } - def sorbet_supports?(feature, version: T.unsafe(nil)); end -end - -# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#24 -Tapioca::SorbetHelper::FEATURE_REQUIREMENTS = T.let(T.unsafe(nil), Hash) - -# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#13 -Tapioca::SorbetHelper::SORBET_BIN = T.let(T.unsafe(nil), Pathname) - -# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#18 -Tapioca::SorbetHelper::SORBET_EXE_PATH_ENV_VAR = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#8 -Tapioca::SorbetHelper::SORBET_GEM_SPEC = T.let(T.unsafe(nil), Gem::Specification) - -# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#20 -Tapioca::SorbetHelper::SORBET_PAYLOAD_URL = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#22 -Tapioca::SorbetHelper::SPOOM_CONTEXT = T.let(T.unsafe(nil), Spoom::Context) - -# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#5 -module Tapioca::Static; end - -# source://tapioca//lib/tapioca/static/requires_compiler.rb#6 -class Tapioca::Static::RequiresCompiler - # source://tapioca//lib/tapioca/static/requires_compiler.rb#10 - sig { params(sorbet_path: ::String).void } - def initialize(sorbet_path); end - - # source://tapioca//lib/tapioca/static/requires_compiler.rb#15 - sig { returns(::String) } - def compile; end - - private - - # source://tapioca//lib/tapioca/static/requires_compiler.rb#29 - sig { params(config: ::Spoom::Sorbet::Config).returns(T::Array[::String]) } - def collect_files(config); end - - # source://tapioca//lib/tapioca/static/requires_compiler.rb#44 - sig { params(file_path: ::String).returns(T::Enumerable[::String]) } - def collect_requires(file_path); end - - # source://tapioca//lib/tapioca/static/requires_compiler.rb#51 - sig { params(config: ::Spoom::Sorbet::Config, file_path: ::Pathname).returns(T::Boolean) } - def file_ignored_by_sorbet?(config, file_path); end - - # source://tapioca//lib/tapioca/static/requires_compiler.rb#80 - sig { params(path: ::Pathname).returns(T::Array[::String]) } - def path_parts(path); end -end - -# source://tapioca//lib/tapioca/static/symbol_loader.rb#6 -module Tapioca::Static::SymbolLoader - extend ::Tapioca::SorbetHelper - extend ::Tapioca::Runtime::AttachedClassOf - extend ::Tapioca::Runtime::Reflection - - class << self - # source://tapioca//lib/tapioca/static/symbol_loader.rb#23 - sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } - def engine_symbols(gem); end - - # source://tapioca//lib/tapioca/static/symbol_loader.rb#40 - sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } - def gem_symbols(gem); end - - # source://tapioca//lib/tapioca/static/symbol_loader.rb#13 - sig { returns(T::Set[::String]) } - def payload_symbols; end - - # source://tapioca//lib/tapioca/static/symbol_loader.rb#45 - sig { params(paths: T::Array[::Pathname]).returns(T::Set[::String]) } - def symbols_from_paths(paths); end - - private - - # @return [Array<T.class_of(Rails::Engine)>] - # - # source://sorbet-runtime/0.5.10761/lib/types/private/methods/_methods.rb#255 - def engines(*args, **_arg1, &blk); end - - # source://tapioca//lib/tapioca/static/symbol_loader.rb#73 - sig { params(input: ::String, table_type: ::String).returns(::String) } - def symbol_table_json_from(input, table_type: T.unsafe(nil)); end - end -end - -# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#6 -class Tapioca::Static::SymbolTableParser - # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#30 - sig { void } - def initialize; end - - # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#65 - sig { params(name: ::String).returns(::String) } - def fully_qualified_name(name); end - - # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#36 - sig { params(object: T::Hash[::String, T.untyped]).void } - def parse_object(object); end - - # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#27 - sig { returns(T::Set[::String]) } - def symbols; end - - class << self - # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#15 - sig { params(json_string: ::String).returns(T::Set[::String]) } - def parse_json(json_string); end - end -end - -# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#9 -Tapioca::Static::SymbolTableParser::SKIP_PARSE_KINDS = T.let(T.unsafe(nil), Array) - -# source://tapioca//lib/tapioca.rb#35 -Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#34 -Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#122 -class Tapioca::TypeVariable < ::T::Types::TypeVariable - # @return [TypeVariable] a new instance of TypeVariable - # - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#123 - def initialize(name, variance); end - - # Returns the value of attribute name. - # - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#128 - def name; end -end - -# This is subclassing from `Module` so that instances of this type will be modules. -# The reason why we want that is because that means those instances will automatically -# get bound to the constant names they are assigned to by Ruby. As a result, we don't -# need to do any matching of constants to type variables to bind their names, Ruby will -# do that automatically for us and we get the `name` method for free from `Module`. -# -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#136 -class Tapioca::TypeVariableModule < ::Module - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#158 - sig do - params( - context: ::Module, - type: ::Tapioca::TypeVariableModule::Type, - variance: ::Symbol, - fixed: T.untyped, - lower: T.untyped, - upper: T.untyped, - bounds_proc: T.nilable(T.proc.returns(T::Hash[::Symbol, T.untyped])) - ).void - end - def initialize(context, type, variance, fixed, lower, upper, bounds_proc); end - - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#212 - sig { returns(::Tapioca::TypeVariable) } - def coerce_to_type_variable; end - - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#192 - sig { returns(T::Boolean) } - def fixed?; end - - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#173 - sig { returns(T.nilable(::String)) } - def name; end - - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#197 - sig { returns(::String) } - def serialize; end - - private - - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#246 - sig { returns(T::Hash[::Symbol, T.untyped]) } - def bounds; end - - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#222 - sig do - params( - fixed: T.untyped, - lower: T.untyped, - upper: T.untyped - ).returns(T.proc.returns(T::Hash[::Symbol, T.untyped])) - end - def build_bounds_proc(fixed, lower, upper); end - - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#236 - sig do - type_parameters(:Result) - .params( - block: T.proc.returns(T.type_parameter(:Result)) - ).returns(T.type_parameter(:Result)) - end - def with_bound_name_pre_3_0(&block); end -end - -# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#139 -class Tapioca::TypeVariableModule::Type < ::T::Enum - enums do - Member = new - Template = new - end -end - -# source://tapioca//lib/tapioca/version.rb#5 -Tapioca::VERSION = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca/helpers/source_uri.rb#6 -module URI - include ::URI::RFC2396_REGEXP -end - -# source://tapioca//lib/tapioca/helpers/source_uri.rb#7 -class URI::Source < ::URI::File - # source://tapioca//lib/tapioca/helpers/source_uri.rb#58 - sig { params(v: T.nilable(::String)).returns(T::Boolean) } - def check_host(v); end - - # source://uri/0.12.0/uri/generic.rb#243 - def gem_name; end - - # source://tapioca//lib/tapioca/helpers/source_uri.rb#25 - sig { returns(T.nilable(::String)) } - def gem_version; end - - # source://uri/0.12.0/uri/generic.rb#283 - def line_number; end - - # source://tapioca//lib/tapioca/helpers/source_uri.rb#51 - sig { params(v: T.nilable(::String)).void } - def set_path(v); end - - # source://tapioca//lib/tapioca/helpers/source_uri.rb#70 - sig { returns(::String) } - def to_s; end - - class << self - # source://tapioca//lib/tapioca/helpers/source_uri.rb#38 - sig do - params( - gem_name: ::String, - gem_version: T.nilable(::String), - path: ::String, - line_number: T.nilable(::String) - ).returns(::URI::Source) - end - def build(gem_name:, gem_version:, path:, line_number:); end - end -end - -# source://tapioca//lib/tapioca/helpers/source_uri.rb#10 -URI::Source::COMPONENT = T.let(T.unsafe(nil), Array) - -class URI::WSS < ::URI::WS; end diff --git a/sorbet/rbi/gems/thor@1.2.1.rbi b/sorbet/rbi/gems/thor@1.2.1.rbi deleted file mode 100644 index c307f289..00000000 --- a/sorbet/rbi/gems/thor@1.2.1.rbi +++ /dev/null @@ -1,3956 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `thor` gem. -# Please instead update this file by running `bin/tapioca gem thor`. - -# source://thor//lib/thor/command.rb#1 -class Thor - include ::Thor::Base - include ::Thor::Invocation - include ::Thor::Shell - extend ::Thor::Base::ClassMethods - extend ::Thor::Invocation::ClassMethods - - # source://thor//lib/thor.rb#505 - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - class << self - # Extend check unknown options to accept a hash of conditions. - # - # === Parameters - # options<Hash>: A hash containing :only and/or :except keys - # - # source://thor//lib/thor.rb#255 - def check_unknown_options!(options = T.unsafe(nil)); end - - # Overwrite check_unknown_options? to take subcommands and options into account. - # - # @return [Boolean] - # - # source://thor//lib/thor.rb#268 - def check_unknown_options?(config); end - - # Prints help information for the given command. - # - # ==== Parameters - # shell<Thor::Shell> - # command_name<String> - # - # source://thor//lib/thor.rb#172 - def command_help(shell, command_name); end - - # Sets the default command when thor is executed without an explicit command to be called. - # - # ==== Parameters - # meth<Symbol>:: name of the default command - # - # source://thor//lib/thor.rb#21 - def default_command(meth = T.unsafe(nil)); end - - # Sets the default command when thor is executed without an explicit command to be called. - # - # ==== Parameters - # meth<Symbol>:: name of the default command - # - # source://thor//lib/thor.rb#21 - def default_task(meth = T.unsafe(nil)); end - - # source://thor//lib/thor/base.rb#26 - def deprecation_warning(message); end - - # Defines the usage and the description of the next command. - # - # ==== Parameters - # usage<String> - # description<String> - # options<String> - # - # source://thor//lib/thor.rb#54 - def desc(usage, description, options = T.unsafe(nil)); end - - # Disable the check for required options for the given commands. - # This is useful if you have a command that does not need the required options - # to work, like help. - # - # ==== Parameters - # Symbol ...:: A list of commands that should be affected. - # - # source://thor//lib/thor.rb#339 - def disable_required_check!(*command_names); end - - # @return [Boolean] - # - # source://thor//lib/thor.rb#343 - def disable_required_check?(command); end - - # Prints help information for this class. - # - # ==== Parameters - # shell<Thor::Shell> - # - # source://thor//lib/thor.rb#195 - def help(shell, subcommand = T.unsafe(nil)); end - - # Defines the long description of the next command. - # - # ==== Parameters - # long description<String> - # - # source://thor//lib/thor.rb#71 - def long_desc(long_description, options = T.unsafe(nil)); end - - # Maps an input to a command. If you define: - # - # map "-T" => "list" - # - # Running: - # - # thor -T - # - # Will invoke the list command. - # - # ==== Parameters - # Hash[String|Array => Symbol]:: Maps the string or the strings in the array to the given command. - # - # source://thor//lib/thor.rb#93 - def map(mappings = T.unsafe(nil), **kw); end - - # Adds an option to the set of method options. If :for is given as option, - # it allows you to change the options from a previous defined command. - # - # def previous_command - # # magic - # end - # - # method_option :foo => :bar, :for => :previous_command - # - # def next_command - # # magic - # end - # - # ==== Parameters - # name<Symbol>:: The name of the argument. - # options<Hash>:: Described below. - # - # ==== Options - # :desc - Description for the argument. - # :required - If the argument is required or not. - # :default - Default value for this argument. It cannot be required and have default values. - # :aliases - Aliases for this option. - # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean. - # :banner - String to show on usage notes. - # :hide - If you want to hide this option from the help. - # - # source://thor//lib/thor.rb#155 - def method_option(name, options = T.unsafe(nil)); end - - # Declares the options for the next command to be declared. - # - # ==== Parameters - # Hash[Symbol => Object]:: The hash key is the name of the option and the value - # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric - # or :required (string). If you give a value, the type of the value is used. - # - # source://thor//lib/thor.rb#121 - def method_options(options = T.unsafe(nil)); end - - # Adds an option to the set of method options. If :for is given as option, - # it allows you to change the options from a previous defined command. - # - # def previous_command - # # magic - # end - # - # method_option :foo => :bar, :for => :previous_command - # - # def next_command - # # magic - # end - # - # ==== Parameters - # name<Symbol>:: The name of the argument. - # options<Hash>:: Described below. - # - # ==== Options - # :desc - Description for the argument. - # :required - If the argument is required or not. - # :default - Default value for this argument. It cannot be required and have default values. - # :aliases - Aliases for this option. - # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean. - # :banner - String to show on usage notes. - # :hide - If you want to hide this option from the help. - # - # source://thor//lib/thor.rb#155 - def option(name, options = T.unsafe(nil)); end - - # Declares the options for the next command to be declared. - # - # ==== Parameters - # Hash[Symbol => Object]:: The hash key is the name of the option and the value - # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric - # or :required (string). If you give a value, the type of the value is used. - # - # source://thor//lib/thor.rb#121 - def options(options = T.unsafe(nil)); end - - # Allows for custom "Command" package naming. - # - # === Parameters - # name<String> - # options<Hash> - # - # source://thor//lib/thor.rb#12 - def package_name(name, _ = T.unsafe(nil)); end - - # Returns commands ready to be printed. - # - # source://thor//lib/thor.rb#214 - def printable_commands(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # Returns commands ready to be printed. - # - # source://thor//lib/thor.rb#214 - def printable_tasks(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # Registers another Thor subclass as a command. - # - # ==== Parameters - # klass<Class>:: Thor subclass to register - # command<String>:: Subcommand name to use - # usage<String>:: Short usage for the subcommand - # description<String>:: Description for the subcommand - # - # source://thor//lib/thor.rb#37 - def register(klass, subcommand_name, usage, description, options = T.unsafe(nil)); end - - # Stop parsing of options as soon as an unknown option or a regular - # argument is encountered. All remaining arguments are passed to the command. - # This is useful if you have a command that can receive arbitrary additional - # options, and where those additional options should not be handled by - # Thor. - # - # ==== Example - # - # To better understand how this is useful, let's consider a command that calls - # an external command. A user may want to pass arbitrary options and - # arguments to that command. The command itself also accepts some options, - # which should be handled by Thor. - # - # class_option "verbose", :type => :boolean - # stop_on_unknown_option! :exec - # check_unknown_options! :except => :exec - # - # desc "exec", "Run a shell command" - # def exec(*args) - # puts "diagnostic output" if options[:verbose] - # Kernel.exec(*args) - # end - # - # Here +exec+ can be called with +--verbose+ to get diagnostic output, - # e.g.: - # - # $ thor exec --verbose echo foo - # diagnostic output - # foo - # - # But if +--verbose+ is given after +echo+, it is passed to +echo+ instead: - # - # $ thor exec echo --verbose foo - # --verbose foo - # - # ==== Parameters - # Symbol ...:: A list of commands that should be affected. - # - # source://thor//lib/thor.rb#325 - def stop_on_unknown_option!(*command_names); end - - # @return [Boolean] - # - # source://thor//lib/thor.rb#329 - def stop_on_unknown_option?(command); end - - # source://thor//lib/thor.rb#234 - def subcommand(subcommand, subcommand_class); end - - # source://thor//lib/thor.rb#230 - def subcommand_classes; end - - # source://thor//lib/thor.rb#225 - def subcommands; end - - # source://thor//lib/thor.rb#234 - def subtask(subcommand, subcommand_class); end - - # source://thor//lib/thor.rb#225 - def subtasks; end - - # Prints help information for the given command. - # - # ==== Parameters - # shell<Thor::Shell> - # command_name<String> - # - # source://thor//lib/thor.rb#172 - def task_help(shell, command_name); end - - protected - - # The banner for this class. You can customize it if you are invoking the - # thor class by another ways which is not the Thor::Runner. It receives - # the command that is going to be invoked and a boolean which indicates if - # the namespace should be displayed as arguments. - # - # source://thor//lib/thor.rb#400 - def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://thor//lib/thor.rb#406 - def baseclass; end - - # source://thor//lib/thor.rb#414 - def create_command(meth); end - - # source://thor//lib/thor.rb#414 - def create_task(meth); end - - # help command has the required check disabled by default. - # - # source://thor//lib/thor.rb#354 - def disable_required_check; end - - # The method responsible for dispatching given the args. - # - # @yield [instance] - # - # source://thor//lib/thor.rb#359 - def dispatch(meth, given_args, given_opts, config); end - - # source://thor//lib/thor.rb#410 - def dynamic_command_class; end - - # this is the logic that takes the command name passed in by the user - # and determines whether it is an unambiguous substrings of a command or - # alias name. - # - # source://thor//lib/thor.rb#476 - def find_command_possibilities(meth); end - - # this is the logic that takes the command name passed in by the user - # and determines whether it is an unambiguous substrings of a command or - # alias name. - # - # source://thor//lib/thor.rb#476 - def find_task_possibilities(meth); end - - # source://thor//lib/thor.rb#436 - def initialize_added; end - - # receives a (possibly nil) command name and returns a name that is in - # the commands hash. In addition to normalizing aliases, this logic - # will determine if a shortened command is an unambiguous substring of - # a command or alias. - # - # +normalize_command_name+ also converts names like +animal-prison+ - # into +animal_prison+. - # - # @raise [AmbiguousTaskError] - # - # source://thor//lib/thor.rb#455 - def normalize_command_name(meth); end - - # receives a (possibly nil) command name and returns a name that is in - # the commands hash. In addition to normalizing aliases, this logic - # will determine if a shortened command is an unambiguous substring of - # a command or alias. - # - # +normalize_command_name+ also converts names like +animal-prison+ - # into +animal_prison+. - # - # @raise [AmbiguousTaskError] - # - # source://thor//lib/thor.rb#455 - def normalize_task_name(meth); end - - # Retrieve the command name from given args. - # - # source://thor//lib/thor.rb#442 - def retrieve_command_name(args); end - - # Retrieve the command name from given args. - # - # source://thor//lib/thor.rb#442 - def retrieve_task_name(args); end - - # source://thor//lib/thor.rb#349 - def stop_on_unknown_option; end - - # source://thor//lib/thor.rb#491 - def subcommand_help(cmd); end - - # source://thor//lib/thor.rb#491 - def subtask_help(cmd); end - end -end - -# source://thor//lib/thor/actions/empty_directory.rb#2 -module Thor::Actions - mixes_in_class_methods ::Thor::Actions::ClassMethods - - # Extends initializer to add more configuration options. - # - # ==== Configuration - # behavior<Symbol>:: The actions default behavior. Can be :invoke or :revoke. - # It also accepts :force, :skip and :pretend to set the behavior - # and the respective option. - # - # destination_root<String>:: The root directory needed for some actions. - # - # source://thor//lib/thor/actions.rb#72 - def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end - - # Wraps an action object and call it accordingly to the thor class behavior. - # - # source://thor//lib/thor/actions.rb#89 - def action(instance); end - - # Create a new file relative to the destination root with the given data, - # which is the return value of a block or a data string. - # - # ==== Parameters - # destination<String>:: the relative path to the destination root. - # data<String|NilClass>:: the data to append to the file. - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Examples - # - # create_file "lib/fun_party.rb" do - # hostname = ask("What is the virtual hostname I should use?") - # "vhost.name = #{hostname}" - # end - # - # create_file "config/apache.conf", "your apache config" - # - # source://thor//lib/thor/actions/create_file.rb#22 - def add_file(destination, *args, &block); end - - # Create a new file relative to the destination root from the given source. - # - # ==== Parameters - # destination<String>:: the relative path to the destination root. - # source<String|NilClass>:: the relative path to the source root. - # config<Hash>:: give :verbose => false to not log the status. - # :: give :symbolic => false for hard link. - # - # ==== Examples - # - # create_link "config/apache.conf", "/etc/apache.conf" - # - # source://thor//lib/thor/actions/create_link.rb#17 - def add_link(destination, *args); end - - # Append text to a file. Since it depends on insert_into_file, it's reversible. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # data<String>:: the data to append to the file, can be also given as a block. - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Example - # - # append_to_file 'config/environments/test.rb', 'config.gem "rspec"' - # - # append_to_file 'config/environments/test.rb' do - # 'config.gem "rspec"' - # end - # - # source://thor//lib/thor/actions/file_manipulation.rb#195 - def append_file(path, *args, &block); end - - # Append text to a file. Since it depends on insert_into_file, it's reversible. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # data<String>:: the data to append to the file, can be also given as a block. - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Example - # - # append_to_file 'config/environments/test.rb', 'config.gem "rspec"' - # - # append_to_file 'config/environments/test.rb' do - # 'config.gem "rspec"' - # end - # - # source://thor//lib/thor/actions/file_manipulation.rb#195 - def append_to_file(path, *args, &block); end - - # Loads an external file and execute it in the instance binding. - # - # ==== Parameters - # path<String>:: The path to the file to execute. Can be a web address or - # a relative path from the source root. - # - # ==== Examples - # - # apply "http://gist.github.com/103208" - # - # apply "recipes/jquery.rb" - # - # source://thor//lib/thor/actions.rb#216 - def apply(path, config = T.unsafe(nil)); end - - # Returns the value of attribute behavior. - # - # source://thor//lib/thor/actions.rb#10 - def behavior; end - - # Sets the attribute behavior - # - # @param value the value to set the attribute behavior to. - # - # source://thor//lib/thor/actions.rb#10 - def behavior=(_arg0); end - - # Changes the mode of the given file or directory. - # - # ==== Parameters - # mode<Integer>:: the file mode - # path<String>:: the name of the file to change mode - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Example - # - # chmod "script/server", 0755 - # - # source://thor//lib/thor/actions/file_manipulation.rb#148 - def chmod(path, mode, config = T.unsafe(nil)); end - - # Comment all lines matching a given regex. It will leave the space - # which existed before the beginning of the line in tact and will insert - # a single space after the comment hash. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # flag<Regexp|String>:: the regexp or string used to decide which lines to comment - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Example - # - # comment_lines 'config/initializers/session_store.rb', /cookie_store/ - # - # source://thor//lib/thor/actions/file_manipulation.rb#312 - def comment_lines(path, flag, *args); end - - # ==== Examples - # - # copy_file "README", "doc/README" - # - # copy_file "doc/README" - # - # source://thor//lib/thor/actions/file_manipulation.rb#21 - def copy_file(source, *args, &block); end - - # Create a new file relative to the destination root with the given data, - # which is the return value of a block or a data string. - # - # ==== Parameters - # destination<String>:: the relative path to the destination root. - # data<String|NilClass>:: the data to append to the file. - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Examples - # - # create_file "lib/fun_party.rb" do - # hostname = ask("What is the virtual hostname I should use?") - # "vhost.name = #{hostname}" - # end - # - # create_file "config/apache.conf", "your apache config" - # - # source://thor//lib/thor/actions/create_file.rb#22 - def create_file(destination, *args, &block); end - - # Create a new file relative to the destination root from the given source. - # - # ==== Parameters - # destination<String>:: the relative path to the destination root. - # source<String|NilClass>:: the relative path to the source root. - # config<Hash>:: give :verbose => false to not log the status. - # :: give :symbolic => false for hard link. - # - # ==== Examples - # - # create_link "config/apache.conf", "/etc/apache.conf" - # - # source://thor//lib/thor/actions/create_link.rb#17 - def create_link(destination, *args); end - - # Returns the root for this thor class (also aliased as destination root). - # - # source://thor//lib/thor/actions.rb#99 - def destination_root; end - - # Sets the root for this thor class. Relatives path are added to the - # directory where the script was invoked and expanded. - # - # source://thor//lib/thor/actions.rb#106 - def destination_root=(root); end - - # Copies recursively the files from source directory to root directory. - # If any of the files finishes with .tt, it's considered to be a template - # and is placed in the destination without the extension .tt. If any - # empty directory is found, it's copied and all .empty_directory files are - # ignored. If any file name is wrapped within % signs, the text within - # the % signs will be executed as a method and replaced with the returned - # value. Let's suppose a doc directory with the following files: - # - # doc/ - # components/.empty_directory - # README - # rdoc.rb.tt - # %app_name%.rb - # - # When invoked as: - # - # directory "doc" - # - # It will create a doc directory in the destination with the following - # files (assuming that the `app_name` method returns the value "blog"): - # - # doc/ - # components/ - # README - # rdoc.rb - # blog.rb - # - # <b>Encoded path note:</b> Since Thor internals use Object#respond_to? to check if it can - # expand %something%, this `something` should be a public method in the class calling - # #directory. If a method is private, Thor stack raises PrivateMethodEncodedError. - # - # ==== Parameters - # source<String>:: the relative path to the source root. - # destination<String>:: the relative path to the destination root. - # config<Hash>:: give :verbose => false to not log the status. - # If :recursive => false, does not look for paths recursively. - # If :mode => :preserve, preserve the file mode from the source. - # If :exclude_pattern => /regexp/, prevents copying files that match that regexp. - # - # ==== Examples - # - # directory "doc" - # directory "doc", "docs", :recursive => false - # - # source://thor//lib/thor/actions/directory.rb#49 - def directory(source, *args, &block); end - - # Creates an empty directory. - # - # ==== Parameters - # destination<String>:: the relative path to the destination root. - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Examples - # - # empty_directory "doc" - # - # source://thor//lib/thor/actions/empty_directory.rb#13 - def empty_directory(destination, config = T.unsafe(nil)); end - - # Receives a file or directory and search for it in the source paths. - # - # @raise [Error] - # - # source://thor//lib/thor/actions.rb#133 - def find_in_source_paths(file); end - - # Gets the content at the given address and places it at the given relative - # destination. If a block is given instead of destination, the content of - # the url is yielded and used as location. - # - # +get+ relies on open-uri, so passing application user input would provide - # a command injection attack vector. - # - # ==== Parameters - # source<String>:: the address of the given content. - # destination<String>:: the relative path to the destination root. - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Examples - # - # get "http://gist.github.com/103208", "doc/README" - # - # get "http://gist.github.com/103208" do |content| - # content.split("\n").first - # end - # - # source://thor//lib/thor/actions/file_manipulation.rb#79 - def get(source, *args, &block); end - - # Run a regular expression replacement on a file. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # flag<Regexp|String>:: the regexp or string to be replaced - # replacement<String>:: the replacement, can be also given as a block - # config<Hash>:: give :verbose => false to not log the status, and - # :force => true, to force the replacement regardles of runner behavior. - # - # ==== Example - # - # gsub_file 'app/controllers/application_controller.rb', /#\s*(filter_parameter_logging :password)/, '\1' - # - # gsub_file 'README', /rake/, :green do |match| - # match << " no more. Use thor!" - # end - # - # source://thor//lib/thor/actions/file_manipulation.rb#265 - def gsub_file(path, flag, *args, &block); end - - # Goes to the root and execute the given block. - # - # source://thor//lib/thor/actions.rb#200 - def in_root; end - - # Injects text right after the class definition. Since it depends on - # insert_into_file, it's reversible. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # klass<String|Class>:: the class to be manipulated - # data<String>:: the data to append to the class, can be also given as a block. - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Examples - # - # inject_into_class "app/controllers/application_controller.rb", "ApplicationController", " filter_parameter :password\n" - # - # inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do - # " filter_parameter :password\n" - # end - # - # source://thor//lib/thor/actions/file_manipulation.rb#219 - def inject_into_class(path, klass, *args, &block); end - - # source://thor//lib/thor/actions/inject_into_file.rb#26 - def inject_into_file(destination, *args, &block); end - - # Injects text right after the module definition. Since it depends on - # insert_into_file, it's reversible. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # module_name<String|Class>:: the module to be manipulated - # data<String>:: the data to append to the class, can be also given as a block. - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Examples - # - # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper", " def help; 'help'; end\n" - # - # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper" do - # " def help; 'help'; end\n" - # end - # - # source://thor//lib/thor/actions/file_manipulation.rb#242 - def inject_into_module(path, module_name, *args, &block); end - - # source://thor//lib/thor/actions/inject_into_file.rb#26 - def insert_into_file(destination, *args, &block); end - - # Do something in the root or on a provided subfolder. If a relative path - # is given it's referenced from the current root. The full path is yielded - # to the block you provide. The path is set back to the previous path when - # the method exits. - # - # Returns the value yielded by the block. - # - # ==== Parameters - # dir<String>:: the directory to move to. - # config<Hash>:: give :verbose => true to log and use padding. - # - # source://thor//lib/thor/actions.rb#170 - def inside(dir = T.unsafe(nil), config = T.unsafe(nil), &block); end - - # Links the file from the relative source to the relative destination. If - # the destination is not given it's assumed to be equal to the source. - # - # ==== Parameters - # source<String>:: the relative path to the source root. - # destination<String>:: the relative path to the destination root. - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Examples - # - # link_file "README", "doc/README" - # - # link_file "doc/README" - # - # source://thor//lib/thor/actions/file_manipulation.rb#51 - def link_file(source, *args); end - - # Prepend text to a file. Since it depends on insert_into_file, it's reversible. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # data<String>:: the data to prepend to the file, can be also given as a block. - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Example - # - # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"' - # - # prepend_to_file 'config/environments/test.rb' do - # 'config.gem "rspec"' - # end - # - # source://thor//lib/thor/actions/file_manipulation.rb#173 - def prepend_file(path, *args, &block); end - - # Prepend text to a file. Since it depends on insert_into_file, it's reversible. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # data<String>:: the data to prepend to the file, can be also given as a block. - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Example - # - # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"' - # - # prepend_to_file 'config/environments/test.rb' do - # 'config.gem "rspec"' - # end - # - # source://thor//lib/thor/actions/file_manipulation.rb#173 - def prepend_to_file(path, *args, &block); end - - # Returns the given path relative to the absolute root (ie, root where - # the script started). - # - # source://thor//lib/thor/actions.rb#114 - def relative_to_original_destination_root(path, remove_dot = T.unsafe(nil)); end - - # Removes a file at the given location. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Example - # - # remove_file 'README' - # remove_file 'app/controllers/application_controller.rb' - # - # source://thor//lib/thor/actions/file_manipulation.rb#329 - def remove_dir(path, config = T.unsafe(nil)); end - - # Removes a file at the given location. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Example - # - # remove_file 'README' - # remove_file 'app/controllers/application_controller.rb' - # - # source://thor//lib/thor/actions/file_manipulation.rb#329 - def remove_file(path, config = T.unsafe(nil)); end - - # Executes a command returning the contents of the command. - # - # ==== Parameters - # command<String>:: the command to be executed. - # config<Hash>:: give :verbose => false to not log the status, :capture => true to hide to output. Specify :with - # to append an executable to command execution. - # - # ==== Example - # - # inside('vendor') do - # run('ln -s ~/edge rails') - # end - # - # source://thor//lib/thor/actions.rb#248 - def run(command, config = T.unsafe(nil)); end - - # Executes a ruby script (taking into account WIN32 platform quirks). - # - # ==== Parameters - # command<String>:: the command to be executed. - # config<Hash>:: give :verbose => false to not log the status. - # - # source://thor//lib/thor/actions.rb#285 - def run_ruby_script(command, config = T.unsafe(nil)); end - - # Holds source paths in instance so they can be manipulated. - # - # source://thor//lib/thor/actions.rb#127 - def source_paths; end - - # Gets an ERB template at the relative source, executes it and makes a copy - # at the relative destination. If the destination is not given it's assumed - # to be equal to the source removing .tt from the filename. - # - # ==== Parameters - # source<String>:: the relative path to the source root. - # destination<String>:: the relative path to the destination root. - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Examples - # - # template "README", "doc/README" - # - # template "doc/README" - # - # source://thor//lib/thor/actions/file_manipulation.rb#115 - def template(source, *args, &block); end - - # Run a thor command. A hash of options can be given and it's converted to - # switches. - # - # ==== Parameters - # command<String>:: the command to be invoked - # args<Array>:: arguments to the command - # config<Hash>:: give :verbose => false to not log the status, :capture => true to hide to output. - # Other options are given as parameter to Thor. - # - # - # ==== Examples - # - # thor :install, "http://gist.github.com/103208" - # #=> thor install http://gist.github.com/103208 - # - # thor :list, :all => true, :substring => 'rails' - # #=> thor list --all --substring=rails - # - # source://thor//lib/thor/actions.rb#308 - def thor(command, *args); end - - # Uncomment all lines matching a given regex. It will leave the space - # which existed before the comment hash in tact but will remove any spacing - # between the comment hash and the beginning of the line. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # flag<Regexp|String>:: the regexp or string used to decide which lines to uncomment - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Example - # - # uncomment_lines 'config/initializers/session_store.rb', /active_record/ - # - # source://thor//lib/thor/actions/file_manipulation.rb#293 - def uncomment_lines(path, flag, *args); end - - protected - - # source://thor//lib/thor/actions.rb#329 - def _cleanup_options_and_set(options, key); end - - # Allow current root to be shared between invocations. - # - # source://thor//lib/thor/actions.rb#325 - def _shared_configuration; end - - private - - # source://thor//lib/thor/actions/file_manipulation.rb#350 - def capture(*args); end - - # source://thor//lib/thor/actions/file_manipulation.rb#346 - def concat(string); end - - # Returns the value of attribute output_buffer. - # - # source://thor//lib/thor/actions/file_manipulation.rb#341 - def output_buffer; end - - # Sets the attribute output_buffer - # - # @param value the value to set the attribute output_buffer to. - # - # source://thor//lib/thor/actions/file_manipulation.rb#341 - def output_buffer=(_arg0); end - - # source://thor//lib/thor/actions/file_manipulation.rb#354 - def with_output_buffer(buf = T.unsafe(nil)); end - - class << self - # source://thor//lib/thor/actions.rb#12 - def included(base); end - end -end - -# Thor::Actions#capture depends on what kind of buffer is used in ERB. -# Thus CapturableERB fixes ERB to use String buffer. -# -# source://thor//lib/thor/actions/file_manipulation.rb#366 -class Thor::Actions::CapturableERB < ::ERB - # source://thor//lib/thor/actions/file_manipulation.rb#367 - def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end -end - -# source://thor//lib/thor/actions.rb#17 -module Thor::Actions::ClassMethods - # Add runtime options that help actions execution. - # - # source://thor//lib/thor/actions.rb#48 - def add_runtime_options!; end - - # Hold source paths for one Thor instance. source_paths_for_search is the - # method responsible to gather source_paths from this current class, - # inherited paths and the source root. - # - # source://thor//lib/thor/actions.rb#22 - def source_paths; end - - # Returns the source paths in the following order: - # - # 1) This class source paths - # 2) Source root - # 3) Parents source paths - # - # source://thor//lib/thor/actions.rb#38 - def source_paths_for_search; end - - # Stores and return the source root for this class - # - # source://thor//lib/thor/actions.rb#27 - def source_root(path = T.unsafe(nil)); end -end - -# CreateFile is a subset of Template, which instead of rendering a file with -# ERB, it gets the content from the user. -# -# source://thor//lib/thor/actions/create_file.rb#32 -class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory - # @return [CreateFile] a new instance of CreateFile - # - # source://thor//lib/thor/actions/create_file.rb#35 - def initialize(base, destination, data, config = T.unsafe(nil)); end - - # source://thor//lib/thor/actions/create_file.rb#33 - def data; end - - # Checks if the content of the file at the destination is identical to the rendered result. - # - # ==== Returns - # Boolean:: true if it is identical, false otherwise. - # - # @return [Boolean] - # - # source://thor//lib/thor/actions/create_file.rb#45 - def identical?; end - - # source://thor//lib/thor/actions/create_file.rb#59 - def invoke!; end - - # Holds the content to be added to the file. - # - # source://thor//lib/thor/actions/create_file.rb#51 - def render; end - - protected - - # Shows the file collision menu to the user and gets the result. - # - # @return [Boolean] - # - # source://thor//lib/thor/actions/create_file.rb#99 - def force_on_collision?; end - - # If force is true, run the action, otherwise check if it's not being - # skipped. If both are false, show the file_collision menu, if the menu - # returns true, force it, otherwise skip. - # - # source://thor//lib/thor/actions/create_file.rb#85 - def force_or_skip_or_conflict(force, skip, &block); end - - # Now on conflict we check if the file is identical or not. - # - # source://thor//lib/thor/actions/create_file.rb#72 - def on_conflict_behavior(&block); end -end - -# CreateLink is a subset of CreateFile, which instead of taking a block of -# data, just takes a source string from the user. -# -# source://thor//lib/thor/actions/create_link.rb#27 -class Thor::Actions::CreateLink < ::Thor::Actions::CreateFile - # source://thor//lib/thor/actions/create_link.rb#28 - def data; end - - # @return [Boolean] - # - # source://thor//lib/thor/actions/create_link.rb#56 - def exists?; end - - # Checks if the content of the file at the destination is identical to the rendered result. - # - # ==== Returns - # Boolean:: true if it is identical, false otherwise. - # - # @return [Boolean] - # - # source://thor//lib/thor/actions/create_link.rb#35 - def identical?; end - - # source://thor//lib/thor/actions/create_link.rb#40 - def invoke!; end -end - -# source://thor//lib/thor/actions/directory.rb#55 -class Thor::Actions::Directory < ::Thor::Actions::EmptyDirectory - # @return [Directory] a new instance of Directory - # - # source://thor//lib/thor/actions/directory.rb#58 - def initialize(base, source, destination = T.unsafe(nil), config = T.unsafe(nil), &block); end - - # source://thor//lib/thor/actions/directory.rb#64 - def invoke!; end - - # source://thor//lib/thor/actions/directory.rb#69 - def revoke!; end - - # Returns the value of attribute source. - # - # source://thor//lib/thor/actions/directory.rb#56 - def source; end - - protected - - # source://thor//lib/thor/actions/directory.rb#75 - def execute!; end - - # source://thor//lib/thor/actions/directory.rb#99 - def file_level_lookup(previous_lookup); end - - # source://thor//lib/thor/actions/directory.rb#103 - def files(lookup); end -end - -# source://thor//lib/thor/actions/empty_directory.rb#23 -class Thor::Actions::EmptyDirectory - # Initializes given the source and destination. - # - # ==== Parameters - # base<Thor::Base>:: A Thor::Base instance - # source<String>:: Relative path to the source of this file - # destination<String>:: Relative path to the destination of this file - # config<Hash>:: give :verbose => false to not log the status. - # - # @return [EmptyDirectory] a new instance of EmptyDirectory - # - # source://thor//lib/thor/actions/empty_directory.rb#34 - def initialize(base, destination, config = T.unsafe(nil)); end - - # source://thor//lib/thor/actions/empty_directory.rb#24 - def base; end - - # source://thor//lib/thor/actions/empty_directory.rb#24 - def config; end - - # source://thor//lib/thor/actions/empty_directory.rb#24 - def destination; end - - # Checks if the destination file already exists. - # - # ==== Returns - # Boolean:: true if the file exists, false otherwise. - # - # @return [Boolean] - # - # source://thor//lib/thor/actions/empty_directory.rb#45 - def exists?; end - - # source://thor//lib/thor/actions/empty_directory.rb#24 - def given_destination; end - - # source://thor//lib/thor/actions/empty_directory.rb#49 - def invoke!; end - - # source://thor//lib/thor/actions/empty_directory.rb#24 - def relative_destination; end - - # source://thor//lib/thor/actions/empty_directory.rb#56 - def revoke!; end - - protected - - # Filenames in the encoded form are converted. If you have a file: - # - # %file_name%.rb - # - # It calls #file_name from the base and replaces %-string with the - # return value (should be String) of #file_name: - # - # user.rb - # - # The method referenced can be either public or private. - # - # source://thor//lib/thor/actions/empty_directory.rb#103 - def convert_encoded_instructions(filename); end - - # Sets the absolute destination value from a relative destination value. - # It also stores the given and relative destination. Let's suppose our - # script is being executed on "dest", it sets the destination root to - # "dest". The destination, given_destination and relative_destination - # are related in the following way: - # - # inside "bar" do - # empty_directory "baz" - # end - # - # destination #=> dest/bar/baz - # relative_destination #=> bar/baz - # given_destination #=> baz - # - # source://thor//lib/thor/actions/empty_directory.rb#85 - def destination=(destination); end - - # Receives a hash of options and just execute the block if some - # conditions are met. - # - # source://thor//lib/thor/actions/empty_directory.rb#113 - def invoke_with_conflict_check(&block); end - - # What to do when the destination file already exists. - # - # source://thor//lib/thor/actions/empty_directory.rb#132 - def on_conflict_behavior; end - - # source://thor//lib/thor/actions/empty_directory.rb#126 - def on_file_clash_behavior; end - - # Shortcut for pretend. - # - # @return [Boolean] - # - # source://thor//lib/thor/actions/empty_directory.rb#67 - def pretend?; end - - # Shortcut to say_status shell method. - # - # source://thor//lib/thor/actions/empty_directory.rb#138 - def say_status(status, color); end -end - -# source://thor//lib/thor/actions/inject_into_file.rb#36 -class Thor::Actions::InjectIntoFile < ::Thor::Actions::EmptyDirectory - # @return [InjectIntoFile] a new instance of InjectIntoFile - # - # source://thor//lib/thor/actions/inject_into_file.rb#39 - def initialize(base, destination, data, config); end - - # Returns the value of attribute behavior. - # - # source://thor//lib/thor/actions/inject_into_file.rb#37 - def behavior; end - - # Returns the value of attribute flag. - # - # source://thor//lib/thor/actions/inject_into_file.rb#37 - def flag; end - - # source://thor//lib/thor/actions/inject_into_file.rb#52 - def invoke!; end - - # Returns the value of attribute replacement. - # - # source://thor//lib/thor/actions/inject_into_file.rb#37 - def replacement; end - - # source://thor//lib/thor/actions/inject_into_file.rb#72 - def revoke!; end - - protected - - # Adds the content to the file. - # - # source://thor//lib/thor/actions/inject_into_file.rb#108 - def replace!(regexp, string, force); end - - # source://thor//lib/thor/actions/inject_into_file.rb#88 - def say_status(behavior, warning: T.unsafe(nil), color: T.unsafe(nil)); end -end - -# Injects the given content into a file. Different from gsub_file, this -# method is reversible. -# -# ==== Parameters -# destination<String>:: Relative path to the destination root -# data<String>:: Data to add to the file. Can be given as a block. -# config<Hash>:: give :verbose => false to not log the status and the flag -# for injection (:after or :before) or :force => true for -# insert two or more times the same content. -# -# ==== Examples -# -# insert_into_file "config/environment.rb", "config.gem :thor", :after => "Rails::Initializer.run do |config|\n" -# -# insert_into_file "config/environment.rb", :after => "Rails::Initializer.run do |config|\n" do -# gems = ask "Which gems would you like to add?" -# gems.split(" ").map{ |gem| " config.gem :#{gem}" }.join("\n") -# end -# -# source://thor//lib/thor/actions/inject_into_file.rb#24 -Thor::Actions::WARNINGS = T.let(T.unsafe(nil), Hash) - -# source://thor//lib/thor/error.rb#60 -class Thor::AmbiguousCommandError < ::Thor::Error; end - -# source://thor//lib/thor/error.rb#62 -Thor::AmbiguousTaskError = Thor::AmbiguousCommandError - -# source://thor//lib/thor/parser/argument.rb#2 -class Thor::Argument - # @raise [ArgumentError] - # @return [Argument] a new instance of Argument - # - # source://thor//lib/thor/parser/argument.rb#8 - def initialize(name, options = T.unsafe(nil)); end - - # Returns the value of attribute banner. - # - # source://thor//lib/thor/parser/argument.rb#5 - def banner; end - - # Returns the value of attribute default. - # - # source://thor//lib/thor/parser/argument.rb#5 - def default; end - - # Returns the value of attribute description. - # - # source://thor//lib/thor/parser/argument.rb#5 - def description; end - - # Returns the value of attribute enum. - # - # source://thor//lib/thor/parser/argument.rb#5 - def enum; end - - # Returns the value of attribute name. - # - # source://thor//lib/thor/parser/argument.rb#5 - def human_name; end - - # Returns the value of attribute name. - # - # source://thor//lib/thor/parser/argument.rb#5 - def name; end - - # Returns the value of attribute required. - # - # source://thor//lib/thor/parser/argument.rb#5 - def required; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/argument.rb#31 - def required?; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/argument.rb#35 - def show_default?; end - - # Returns the value of attribute type. - # - # source://thor//lib/thor/parser/argument.rb#5 - def type; end - - # source://thor//lib/thor/parser/argument.rb#27 - def usage; end - - protected - - # source://thor//lib/thor/parser/argument.rb#55 - def default_banner; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/argument.rb#51 - def valid_type?(type); end - - # @raise [ArgumentError] - # - # source://thor//lib/thor/parser/argument.rb#46 - def validate!; end -end - -# source://thor//lib/thor/parser/argument.rb#3 -Thor::Argument::VALID_TYPES = T.let(T.unsafe(nil), Array) - -# source://thor//lib/thor/parser/arguments.rb#2 -class Thor::Arguments - # Takes an array of Thor::Argument objects. - # - # @return [Arguments] a new instance of Arguments - # - # source://thor//lib/thor/parser/arguments.rb#26 - def initialize(arguments = T.unsafe(nil)); end - - # source://thor//lib/thor/parser/arguments.rb#44 - def parse(args); end - - # source://thor//lib/thor/parser/arguments.rb#57 - def remaining; end - - private - - # Raises an error if @non_assigned_required array is not empty. - # - # @raise [RequiredArgumentMissingError] - # - # source://thor//lib/thor/parser/arguments.rb#170 - def check_requirement!; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/arguments.rb#88 - def current_is_value?; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/arguments.rb#68 - def last?; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/arguments.rb#63 - def no_or_skip?(arg); end - - # Runs through the argument array getting all strings until no string is - # found or a switch is found. - # - # ["a", "b", "c"] - # - # And returns it as an array: - # - # ["a", "b", "c"] - # - # source://thor//lib/thor/parser/arguments.rb#122 - def parse_array(name); end - - # Runs through the argument array getting strings that contains ":" and - # mark it as a hash: - # - # [ "name:string", "age:integer" ] - # - # Becomes: - # - # { "name" => "string", "age" => "integer" } - # - # source://thor//lib/thor/parser/arguments.rb#101 - def parse_hash(name); end - - # Check if the peek is numeric format and return a Float or Integer. - # Check if the peek is included in enum if enum is provided. - # Otherwise raises an error. - # - # source://thor//lib/thor/parser/arguments.rb#133 - def parse_numeric(name); end - - # Parse string: - # for --string-arg, just return the current value in the pile - # for --no-string-arg, nil - # Check if the peek is included in enum if enum is provided. Otherwise raises an error. - # - # source://thor//lib/thor/parser/arguments.rb#154 - def parse_string(name); end - - # source://thor//lib/thor/parser/arguments.rb#72 - def peek; end - - # source://thor//lib/thor/parser/arguments.rb#76 - def shift; end - - # source://thor//lib/thor/parser/arguments.rb#80 - def unshift(arg); end - - class << self - # source://thor//lib/thor/parser/arguments.rb#19 - def parse(*args); end - - # Receives an array of args and returns two arrays, one with arguments - # and one with switches. - # - # source://thor//lib/thor/parser/arguments.rb#8 - def split(args); end - end -end - -# source://thor//lib/thor/parser/arguments.rb#3 -Thor::Arguments::NUMERIC = T.let(T.unsafe(nil), Regexp) - -# source://thor//lib/thor/shell.rb#4 -module Thor::Base - include ::Thor::Invocation - include ::Thor::Shell - - mixes_in_class_methods ::Thor::Base::ClassMethods - mixes_in_class_methods ::Thor::Invocation::ClassMethods - - # It receives arguments in an Array and two hashes, one for options and - # other for configuration. - # - # Notice that it does not check if all required arguments were supplied. - # It should be done by the parser. - # - # ==== Parameters - # args<Array[Object]>:: An array of objects. The objects are applied to their - # respective accessors declared with <tt>argument</tt>. - # - # options<Hash>:: An options hash that will be available as self.options. - # The hash given is converted to a hash with indifferent - # access, magic predicates (options.skip?) and then frozen. - # - # config<Hash>:: Configuration for this Thor class. - # - # source://thor//lib/thor/base.rb#53 - def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end - - # Returns the value of attribute args. - # - # source://thor//lib/thor/base.rb#35 - def args; end - - # Sets the attribute args - # - # @param value the value to set the attribute args to. - # - # source://thor//lib/thor/base.rb#35 - def args=(_arg0); end - - # Returns the value of attribute options. - # - # source://thor//lib/thor/base.rb#35 - def options; end - - # Sets the attribute options - # - # @param value the value to set the attribute options to. - # - # source://thor//lib/thor/base.rb#35 - def options=(_arg0); end - - # Returns the value of attribute parent_options. - # - # source://thor//lib/thor/base.rb#35 - def parent_options; end - - # Sets the attribute parent_options - # - # @param value the value to set the attribute parent_options to. - # - # source://thor//lib/thor/base.rb#35 - def parent_options=(_arg0); end - - class << self - # source://thor//lib/thor/base.rb#100 - def included(base); end - - # Whenever a class inherits from Thor or Thor::Group, we should track the - # class and the file on Thor::Base. This is the method responsible for it. - # - # source://thor//lib/thor/base.rb#128 - def register_klass_file(klass); end - - # Returns the shell used in all Thor classes. If you are in a Unix platform - # it will use a colored log, otherwise it will use a basic one without color. - # - # source://thor//lib/thor/shell.rb#11 - def shell; end - - # Sets the attribute shell - # - # @param value the value to set the attribute shell to. - # - # source://thor//lib/thor/shell.rb#6 - def shell=(_arg0); end - - # Returns the files where the subclasses are kept. - # - # ==== Returns - # Hash[path<String> => Class] - # - # source://thor//lib/thor/base.rb#121 - def subclass_files; end - - # Returns the classes that inherits from Thor or Thor::Group. - # - # ==== Returns - # Array[Class] - # - # source://thor//lib/thor/base.rb#112 - def subclasses; end - end -end - -# source://thor//lib/thor/base.rb#137 -module Thor::Base::ClassMethods - # Returns the commands for this Thor class and all subclasses. - # - # ==== Returns - # Hash:: An ordered hash with commands names as keys and Thor::Command - # objects as values. - # - # source://thor//lib/thor/base.rb#383 - def all_commands; end - - # Returns the commands for this Thor class and all subclasses. - # - # ==== Returns - # Hash:: An ordered hash with commands names as keys and Thor::Command - # objects as values. - # - # source://thor//lib/thor/base.rb#383 - def all_tasks; end - - # If you want to use defaults that don't match the type of an option, - # either specify `check_default_type: false` or call `allow_incompatible_default_type!` - # - # source://thor//lib/thor/base.rb#173 - def allow_incompatible_default_type!; end - - # Adds an argument to the class and creates an attr_accessor for it. - # - # Arguments are different from options in several aspects. The first one - # is how they are parsed from the command line, arguments are retrieved - # from position: - # - # thor command NAME - # - # Instead of: - # - # thor command --name=NAME - # - # Besides, arguments are used inside your code as an accessor (self.argument), - # while options are all kept in a hash (self.options). - # - # Finally, arguments cannot have type :default or :boolean but can be - # optional (supplying :optional => :true or :required => false), although - # you cannot have a required argument after a non-required argument. If you - # try it, an error is raised. - # - # ==== Parameters - # name<Symbol>:: The name of the argument. - # options<Hash>:: Described below. - # - # ==== Options - # :desc - Description for the argument. - # :required - If the argument is required or not. - # :optional - If the argument is optional or not. - # :type - The type of the argument, can be :string, :hash, :array, :numeric. - # :default - Default value for this argument. It cannot be required and have default values. - # :banner - String to show on usage notes. - # - # ==== Errors - # ArgumentError:: Raised if you supply a required argument after a non required one. - # - # source://thor//lib/thor/base.rb#245 - def argument(name, options = T.unsafe(nil)); end - - # Returns this class arguments, looking up in the ancestors chain. - # - # ==== Returns - # Array[Thor::Argument] - # - # source://thor//lib/thor/base.rb#277 - def arguments; end - - # source://thor//lib/thor/base.rb#146 - def attr_accessor(*_arg0); end - - # source://thor//lib/thor/base.rb#138 - def attr_reader(*_arg0); end - - # source://thor//lib/thor/base.rb#142 - def attr_writer(*_arg0); end - - # source://thor//lib/thor/base.rb#177 - def check_default_type; end - - # If you want to raise an error when the default value of an option does not match - # the type call check_default_type! - # This will be the default; for compatibility a deprecation warning is issued if necessary. - # - # source://thor//lib/thor/base.rb#167 - def check_default_type!; end - - # source://thor//lib/thor/base.rb#156 - def check_unknown_options; end - - # If you want to raise an error for unknown options, call check_unknown_options! - # This is disabled by default to allow dynamic invocations. - # - # source://thor//lib/thor/base.rb#152 - def check_unknown_options!; end - - # @return [Boolean] - # - # source://thor//lib/thor/base.rb#160 - def check_unknown_options?(config); end - - # Adds an option to the set of class options - # - # ==== Parameters - # name<Symbol>:: The name of the argument. - # options<Hash>:: Described below. - # - # ==== Options - # :desc:: -- Description for the argument. - # :required:: -- If the argument is required or not. - # :default:: -- Default value for this argument. - # :group:: -- The group for this options. Use by class options to output options in different levels. - # :aliases:: -- Aliases for this option. <b>Note:</b> Thor follows a convention of one-dash-one-letter options. Thus aliases like "-something" wouldn't be parsed; use either "\--something" or "-s" instead. - # :type:: -- The type of the argument, can be :string, :hash, :array, :numeric or :boolean. - # :banner:: -- String to show on usage notes. - # :hide:: -- If you want to hide this option from the help. - # - # source://thor//lib/thor/base.rb#312 - def class_option(name, options = T.unsafe(nil)); end - - # Adds a bunch of options to the set of class options. - # - # class_options :foo => false, :bar => :required, :baz => :string - # - # If you prefer more detailed declaration, check class_option. - # - # ==== Parameters - # Hash[Symbol => Object] - # - # source://thor//lib/thor/base.rb#290 - def class_options(options = T.unsafe(nil)); end - - # Returns the commands for this Thor class. - # - # ==== Returns - # Hash:: An ordered hash with commands names as keys and Thor::Command - # objects as values. - # - # source://thor//lib/thor/base.rb#372 - def commands; end - - # If true, option set will not suspend the execution of the command when - # a required option is not provided. - # - # @return [Boolean] - # - # source://thor//lib/thor/base.rb#191 - def disable_required_check?(command_name); end - - # A flag that makes the process exit with status 1 if any error happens. - # - # @return [Boolean] - # - # source://thor//lib/thor/base.rb#529 - def exit_on_failure?; end - - # Defines the group. This is used when thor list is invoked so you can specify - # that only commands from a pre-defined group will be shown. Defaults to standard. - # - # ==== Parameters - # name<String|Symbol> - # - # source://thor//lib/thor/base.rb#358 - def group(name = T.unsafe(nil)); end - - # @raise [InvocationError] - # - # source://thor//lib/thor/base.rb#519 - def handle_argument_error(command, error, args, arity); end - - # @raise [UndefinedCommandError] - # - # source://thor//lib/thor/base.rb#514 - def handle_no_command_error(command, has_namespace = T.unsafe(nil)); end - - # @raise [UndefinedCommandError] - # - # source://thor//lib/thor/base.rb#514 - def handle_no_task_error(command, has_namespace = T.unsafe(nil)); end - - # Sets the namespace for the Thor or Thor::Group class. By default the - # namespace is retrieved from the class name. If your Thor class is named - # Scripts::MyScript, the help method, for example, will be called as: - # - # thor scripts:my_script -h - # - # If you change the namespace: - # - # namespace :my_scripts - # - # You change how your commands are invoked: - # - # thor my_scripts -h - # - # Finally, if you change your namespace to default: - # - # namespace :default - # - # Your commands can be invoked with a shortcut. Instead of: - # - # thor :my_command - # - # source://thor//lib/thor/base.rb#467 - def namespace(name = T.unsafe(nil)); end - - # All methods defined inside the given block are not added as commands. - # - # So you can do: - # - # class MyScript < Thor - # no_commands do - # def this_is_not_a_command - # end - # end - # end - # - # You can also add the method and remove it from the command list: - # - # class MyScript < Thor - # def this_is_not_a_command - # end - # remove_command :this_is_not_a_command - # end - # - # source://thor//lib/thor/base.rb#431 - def no_commands(&block); end - - # @return [Boolean] - # - # source://thor//lib/thor/base.rb#441 - def no_commands?; end - - # source://thor//lib/thor/base.rb#437 - def no_commands_context; end - - # All methods defined inside the given block are not added as commands. - # - # So you can do: - # - # class MyScript < Thor - # no_commands do - # def this_is_not_a_command - # end - # end - # end - # - # You can also add the method and remove it from the command list: - # - # class MyScript < Thor - # def this_is_not_a_command - # end - # remove_command :this_is_not_a_command - # end - # - # source://thor//lib/thor/base.rb#431 - def no_tasks(&block); end - - # Allows to use private methods from parent in child classes as commands. - # - # ==== Parameters - # names<Array>:: Method names to be used as commands - # - # ==== Examples - # - # public_command :foo - # public_command :foo, :bar, :baz - # - # source://thor//lib/thor/base.rb#507 - def public_command(*names); end - - # Allows to use private methods from parent in child classes as commands. - # - # ==== Parameters - # names<Array>:: Method names to be used as commands - # - # ==== Examples - # - # public_command :foo - # public_command :foo, :bar, :baz - # - # source://thor//lib/thor/base.rb#507 - def public_task(*names); end - - # Removes a previous defined argument. If :undefine is given, undefine - # accessors as well. - # - # ==== Parameters - # names<Array>:: Arguments to be removed - # - # ==== Examples - # - # remove_argument :foo - # remove_argument :foo, :bar, :baz, :undefine => true - # - # source://thor//lib/thor/base.rb#327 - def remove_argument(*names); end - - # Removes a previous defined class option. - # - # ==== Parameters - # names<Array>:: Class options to be removed - # - # ==== Examples - # - # remove_class_option :foo - # remove_class_option :foo, :bar, :baz - # - # source://thor//lib/thor/base.rb#346 - def remove_class_option(*names); end - - # Removes a given command from this Thor class. This is usually done if you - # are inheriting from another class and don't want it to be available - # anymore. - # - # By default it only remove the mapping to the command. But you can supply - # :undefine => true to undefine the method from the class as well. - # - # ==== Parameters - # name<Symbol|String>:: The name of the command to be removed - # options<Hash>:: You can give :undefine => true if you want commands the method - # to be undefined from the class as well. - # - # source://thor//lib/thor/base.rb#401 - def remove_command(*names); end - - # Removes a given command from this Thor class. This is usually done if you - # are inheriting from another class and don't want it to be available - # anymore. - # - # By default it only remove the mapping to the command. But you can supply - # :undefine => true to undefine the method from the class as well. - # - # ==== Parameters - # name<Symbol|String>:: The name of the command to be removed - # options<Hash>:: You can give :undefine => true if you want commands the method - # to be undefined from the class as well. - # - # source://thor//lib/thor/base.rb#401 - def remove_task(*names); end - - # Parses the command and options from the given args, instantiate the class - # and invoke the command. This method is used when the arguments must be parsed - # from an array. If you are inside Ruby and want to use a Thor class, you - # can simply initialize it: - # - # script = MyScript.new(args, options, config) - # script.invoke(:command, first_arg, second_arg, third_arg) - # - # source://thor//lib/thor/base.rb#483 - def start(given_args = T.unsafe(nil), config = T.unsafe(nil)); end - - # If true, option parsing is suspended as soon as an unknown option or a - # regular argument is encountered. All remaining arguments are passed to - # the command as regular arguments. - # - # @return [Boolean] - # - # source://thor//lib/thor/base.rb#185 - def stop_on_unknown_option?(command_name); end - - # source://thor//lib/thor/base.rb#202 - def strict_args_position; end - - # If you want only strict string args (useful when cascading thor classes), - # call strict_args_position! This is disabled by default to allow dynamic - # invocations. - # - # source://thor//lib/thor/base.rb#198 - def strict_args_position!; end - - # @return [Boolean] - # - # source://thor//lib/thor/base.rb#206 - def strict_args_position?(config); end - - # Returns the commands for this Thor class. - # - # ==== Returns - # Hash:: An ordered hash with commands names as keys and Thor::Command - # objects as values. - # - # source://thor//lib/thor/base.rb#372 - def tasks; end - - protected - - # SIGNATURE: Sets the baseclass. This is where the superclass lookup - # finishes. - # - # source://thor//lib/thor/base.rb#679 - def baseclass; end - - # The basename of the program invoking the thor class. - # - # source://thor//lib/thor/base.rb#673 - def basename; end - - # Build an option and adds it to the given scope. - # - # ==== Parameters - # name<Symbol>:: The name of the argument. - # options<Hash>:: Described in both class_option and method_option. - # scope<Hash>:: Options hash that is being built up - # - # source://thor//lib/thor/base.rb#590 - def build_option(name, options, scope); end - - # Receives a hash of options, parse them and add to the scope. This is a - # fast way to set a bunch of options: - # - # build_options :foo => true, :bar => :required, :baz => :string - # - # ==== Parameters - # Hash[Symbol => Object] - # - # source://thor//lib/thor/base.rb#601 - def build_options(options, scope); end - - # Prints the class options per group. If an option does not belong to - # any group, it's printed as Class option. - # - # source://thor//lib/thor/base.rb#539 - def class_options_help(shell, groups = T.unsafe(nil)); end - - # SIGNATURE: Creates a new command if valid_command? is true. This method is - # called when a new method is added to the class. - # - # source://thor//lib/thor/base.rb#684 - def create_command(meth); end - - # SIGNATURE: Creates a new command if valid_command? is true. This method is - # called when a new method is added to the class. - # - # source://thor//lib/thor/base.rb#684 - def create_task(meth); end - - # SIGNATURE: The hook invoked by start. - # - # @raise [NotImplementedError] - # - # source://thor//lib/thor/base.rb#694 - def dispatch(command, given_args, given_opts, config); end - - # Finds a command with the given name. If the command belongs to the current - # class, just return it, otherwise dup it and add the fresh copy to the - # current command hash. - # - # source://thor//lib/thor/base.rb#610 - def find_and_refresh_command(name); end - - # Finds a command with the given name. If the command belongs to the current - # class, just return it, otherwise dup it and add the fresh copy to the - # current command hash. - # - # source://thor//lib/thor/base.rb#610 - def find_and_refresh_task(name); end - - # Retrieves a value from superclass. If it reaches the baseclass, - # returns default. - # - # source://thor//lib/thor/base.rb#651 - def from_superclass(method, default = T.unsafe(nil)); end - - # Everytime someone inherits from a Thor class, register the klass - # and file into baseclass. - # - # source://thor//lib/thor/base.rb#623 - def inherited(klass); end - - # SIGNATURE: Defines behavior when the initialize method is added to the - # class. - # - # source://thor//lib/thor/base.rb#690 - def initialize_added; end - - # Raises an error if the word given is a Thor reserved word. - # - # @return [Boolean] - # - # source://thor//lib/thor/base.rb#579 - def is_thor_reserved_word?(word, type); end - - # Fire this callback whenever a method is added. Added methods are - # tracked as commands by invoking the create_command method. - # - # source://thor//lib/thor/base.rb#631 - def method_added(meth); end - - # Receives a set of options and print them. - # - # source://thor//lib/thor/base.rb#557 - def print_options(shell, options, group_name = T.unsafe(nil)); end -end - -# source://thor//lib/thor/command.rb#2 -class Thor::Command < ::Struct - # @return [Command] a new instance of Command - # - # source://thor//lib/thor/command.rb#5 - def initialize(name, description, long_description, usage, options = T.unsafe(nil)); end - - # Returns the formatted usage by injecting given required arguments - # and required options into the given usage. - # - # source://thor//lib/thor/command.rb#41 - def formatted_usage(klass, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#14 - def hidden?; end - - # By default, a command invokes a method in the thor class. You can change this - # implementation to create custom commands. - # - # source://thor//lib/thor/command.rb#20 - def run(instance, args = T.unsafe(nil)); end - - protected - - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#105 - def handle_argument_error?(instance, error, caller); end - - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#112 - def handle_no_method_error?(instance, error, caller); end - - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#95 - def local_method?(instance, name); end - - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#78 - def not_debugging?(instance); end - - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#91 - def private_method?(instance); end - - # Given a target, checks if this class name is a public method. - # - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#87 - def public_method?(instance); end - - # Add usage with required arguments - # - # source://thor//lib/thor/command.rb#68 - def required_arguments_for(klass, usage); end - - # source://thor//lib/thor/command.rb#82 - def required_options; end - - # source://thor//lib/thor/command.rb#100 - def sans_backtrace(backtrace, caller); end - - private - - # source://thor//lib/thor/command.rb#9 - def initialize_copy(other); end -end - -# source://thor//lib/thor/command.rb#3 -Thor::Command::FILE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#2 -module Thor::CoreExt; end - -# A hash with indifferent access and magic predicates. -# -# hash = Thor::CoreExt::HashWithIndifferentAccess.new 'foo' => 'bar', 'baz' => 'bee', 'force' => true -# -# hash[:foo] #=> 'bar' -# hash['foo'] #=> 'bar' -# hash.foo? #=> true -# -# source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#11 -class Thor::CoreExt::HashWithIndifferentAccess < ::Hash - # @return [HashWithIndifferentAccess] a new instance of HashWithIndifferentAccess - # - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#12 - def initialize(hash = T.unsafe(nil)); end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#19 - def [](key); end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#23 - def []=(key, value); end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#27 - def delete(key); end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#31 - def except(*keys); end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#37 - def fetch(key, *args); end - - # @return [Boolean] - # - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#41 - def key?(key); end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#49 - def merge(other); end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#53 - def merge!(other); end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#68 - def replace(other_hash); end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#60 - def reverse_merge(other); end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#64 - def reverse_merge!(other_hash); end - - # Convert to a Hash with String keys. - # - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#73 - def to_hash; end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#45 - def values_at(*indices); end - - protected - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#79 - def convert_key(key); end - - # Magic predicates. For instance: - # - # options.force? # => !!options['force'] - # options.shebang # => "/usr/lib/local/ruby" - # options.test_framework?(:rspec) # => options[:test_framework] == :rspec - # - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#89 - def method_missing(method, *args); end -end - -# source://thor//lib/thor/error.rb#2 -Thor::Correctable = DidYouMean::Correctable - -# A dynamic command that handles method missing scenarios. -# -# source://thor//lib/thor/command.rb#128 -class Thor::DynamicCommand < ::Thor::Command - # @return [DynamicCommand] a new instance of DynamicCommand - # - # source://thor//lib/thor/command.rb#129 - def initialize(name, options = T.unsafe(nil)); end - - # source://thor//lib/thor/command.rb#133 - def run(instance, args = T.unsafe(nil)); end -end - -# source://thor//lib/thor/command.rb#141 -Thor::DynamicTask = Thor::DynamicCommand - -# Thor::Error is raised when it's caused by wrong usage of thor classes. Those -# errors have their backtrace suppressed and are nicely shown to the user. -# -# Errors that are caused by the developer, like declaring a method which -# overwrites a thor keyword, SHOULD NOT raise a Thor::Error. This way, we -# ensure that developer errors are shown with full backtrace. -# -# source://thor//lib/thor/error.rb#23 -class Thor::Error < ::StandardError; end - -# Thor has a special class called Thor::Group. The main difference to Thor class -# is that it invokes all commands at once. It also include some methods that allows -# invocations to be done at the class method, which are not available to Thor -# commands. -# -# source://thor//lib/thor/group.rb#7 -class Thor::Group - include ::Thor::Base - include ::Thor::Invocation - include ::Thor::Shell - extend ::Thor::Base::ClassMethods - extend ::Thor::Invocation::ClassMethods - - protected - - # Shortcut to invoke with padding and block handling. Use internally by - # invoke and invoke_from_option class methods. - # - # source://thor//lib/thor/group.rb#265 - def _invoke_for_class_method(klass, command = T.unsafe(nil), *args, &block); end - - class << self - # Overwrite class options help to allow invoked generators options to be - # shown recursively when invoking a generator. - # - # source://thor//lib/thor/group.rb#161 - def class_options_help(shell, groups = T.unsafe(nil)); end - - # The description for this Thor::Group. If none is provided, but a source root - # exists, tries to find the USAGE one folder above it, otherwise searches - # in the superclass. - # - # ==== Parameters - # description<String>:: The description for this Thor::Group. - # - # source://thor//lib/thor/group.rb#16 - def desc(description = T.unsafe(nil)); end - - # Get invocations array and merge options from invocations. Those - # options are added to group_options hash. Options that already exists - # in base_options are not added twice. - # - # source://thor//lib/thor/group.rb#172 - def get_options_from_invocations(group_options, base_options); end - - # @raise [error] - # - # source://thor//lib/thor/group.rb#207 - def handle_argument_error(command, error, _args, arity); end - - # Prints help information. - # - # ==== Options - # short:: When true, shows only usage. - # - # source://thor//lib/thor/group.rb#29 - def help(shell); end - - # Stores invocation blocks used on invoke_from_option. - # - # source://thor//lib/thor/group.rb#45 - def invocation_blocks; end - - # Stores invocations for this class merging with superclass values. - # - # source://thor//lib/thor/group.rb#39 - def invocations; end - - # Invoke the given namespace or class given. It adds an instance - # method that will invoke the klass and command. You can give a block to - # configure how it will be invoked. - # - # The namespace/class given will have its options showed on the help - # usage. Check invoke_from_option for more information. - # - # source://thor//lib/thor/group.rb#56 - def invoke(*names, &block); end - - # Invoke a thor class based on the value supplied by the user to the - # given option named "name". A class option must be created before this - # method is invoked for each name given. - # - # ==== Examples - # - # class GemGenerator < Thor::Group - # class_option :test_framework, :type => :string - # invoke_from_option :test_framework - # end - # - # ==== Boolean options - # - # In some cases, you want to invoke a thor class if some option is true or - # false. This is automatically handled by invoke_from_option. Then the - # option name is used to invoke the generator. - # - # ==== Preparing for invocation - # - # In some cases you want to customize how a specified hook is going to be - # invoked. You can do that by overwriting the class method - # prepare_for_invocation. The class method must necessarily return a klass - # and an optional command. - # - # ==== Custom invocations - # - # You can also supply a block to customize how the option is going to be - # invoked. The block receives two parameters, an instance of the current - # class and the klass to be invoked. - # - # source://thor//lib/thor/group.rb#110 - def invoke_from_option(*names, &block); end - - # Returns commands ready to be printed. - # - # source://thor//lib/thor/group.rb#199 - def printable_commands(*_arg0); end - - # Returns commands ready to be printed. - # - # source://thor//lib/thor/group.rb#199 - def printable_tasks(*_arg0); end - - # Remove a previously added invocation. - # - # ==== Examples - # - # remove_invocation :test_framework - # - # source://thor//lib/thor/group.rb#149 - def remove_invocation(*names); end - - protected - - # The banner for this class. You can customize it if you are invoking the - # thor class by another ways which is not the Thor::Runner. - # - # source://thor//lib/thor/group.rb#238 - def banner; end - - # source://thor//lib/thor/group.rb#248 - def baseclass; end - - # source://thor//lib/thor/group.rb#252 - def create_command(meth); end - - # source://thor//lib/thor/group.rb#252 - def create_task(meth); end - - # The method responsible for dispatching given the args. - # - # @yield [instance] - # - # source://thor//lib/thor/group.rb#217 - def dispatch(command, given_args, given_opts, config); end - - # Represents the whole class as a command. - # - # source://thor//lib/thor/group.rb#243 - def self_command; end - - # Represents the whole class as a command. - # - # source://thor//lib/thor/group.rb#243 - def self_task; end - end -end - -# Shortcuts for help. -# -# source://thor//lib/thor/base.rb#17 -Thor::HELP_MAPPINGS = T.let(T.unsafe(nil), Array) - -# A command that is hidden in help messages but still invocable. -# -# source://thor//lib/thor/command.rb#120 -class Thor::HiddenCommand < ::Thor::Command - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#121 - def hidden?; end -end - -# source://thor//lib/thor/command.rb#125 -Thor::HiddenTask = Thor::HiddenCommand - -# source://thor//lib/thor/invocation.rb#2 -module Thor::Invocation - mixes_in_class_methods ::Thor::Invocation::ClassMethods - - # Make initializer aware of invocations and the initialization args. - # - # source://thor//lib/thor/invocation.rb#23 - def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil), &block); end - - # Make the current command chain accessible with in a Thor-(sub)command - # - # source://thor//lib/thor/invocation.rb#30 - def current_command_chain; end - - # Receives a name and invokes it. The name can be a string (either "command" or - # "namespace:command"), a Thor::Command, a Class or a Thor instance. If the - # command cannot be guessed by name, it can also be supplied as second argument. - # - # You can also supply the arguments, options and configuration values for - # the command to be invoked, if none is given, the same values used to - # initialize the invoker are used to initialize the invoked. - # - # When no name is given, it will invoke the default command of the current class. - # - # ==== Examples - # - # class A < Thor - # def foo - # invoke :bar - # invoke "b:hello", ["Erik"] - # end - # - # def bar - # invoke "b:hello", ["Erik"] - # end - # end - # - # class B < Thor - # def hello(name) - # puts "hello #{name}" - # end - # end - # - # You can notice that the method "foo" above invokes two commands: "bar", - # which belongs to the same class and "hello" which belongs to the class B. - # - # By using an invocation system you ensure that a command is invoked only once. - # In the example above, invoking "foo" will invoke "b:hello" just once, even - # if it's invoked later by "bar" method. - # - # When class A invokes class B, all arguments used on A initialization are - # supplied to B. This allows lazy parse of options. Let's suppose you have - # some rspec commands: - # - # class Rspec < Thor::Group - # class_option :mock_framework, :type => :string, :default => :rr - # - # def invoke_mock_framework - # invoke "rspec:#{options[:mock_framework]}" - # end - # end - # - # As you noticed, it invokes the given mock framework, which might have its - # own options: - # - # class Rspec::RR < Thor::Group - # class_option :style, :type => :string, :default => :mock - # end - # - # Since it's not rspec concern to parse mock framework options, when RR - # is invoked all options are parsed again, so RR can extract only the options - # that it's going to use. - # - # If you want Rspec::RR to be initialized with its own set of options, you - # have to do that explicitly: - # - # invoke "rspec:rr", [], :style => :foo - # - # Besides giving an instance, you can also give a class to invoke: - # - # invoke Rspec::RR, [], :style => :foo - # - # source://thor//lib/thor/invocation.rb#102 - def invoke(name = T.unsafe(nil), *args); end - - # Invoke all commands for the current instance. - # - # source://thor//lib/thor/invocation.rb#133 - def invoke_all; end - - # Invoke the given command if the given args. - # - # source://thor//lib/thor/invocation.rb#122 - def invoke_command(command, *args); end - - # Invoke the given command if the given args. - # - # source://thor//lib/thor/invocation.rb#122 - def invoke_task(command, *args); end - - # Invokes using shell padding. - # - # source://thor//lib/thor/invocation.rb#138 - def invoke_with_padding(*args); end - - protected - - # Initialize klass using values stored in the @_initializer. - # - # source://thor//lib/thor/invocation.rb#166 - def _parse_initialization_options(args, opts, config); end - - # This method simply retrieves the class and command to be invoked. - # If the name is nil or the given name is a command in the current class, - # use the given name and return self as class. Otherwise, call - # prepare_for_invocation in the current class. - # - # source://thor//lib/thor/invocation.rb#153 - def _retrieve_class_and_command(name, sent_command = T.unsafe(nil)); end - - # This method simply retrieves the class and command to be invoked. - # If the name is nil or the given name is a command in the current class, - # use the given name and return self as class. Otherwise, call - # prepare_for_invocation in the current class. - # - # source://thor//lib/thor/invocation.rb#153 - def _retrieve_class_and_task(name, sent_command = T.unsafe(nil)); end - - # Configuration values that are shared between invocations. - # - # source://thor//lib/thor/invocation.rb#145 - def _shared_configuration; end - - class << self - # source://thor//lib/thor/invocation.rb#3 - def included(base); end - end -end - -# source://thor//lib/thor/invocation.rb#8 -module Thor::Invocation::ClassMethods - # This method is responsible for receiving a name and find the proper - # class and command for it. The key is an optional parameter which is - # available only in class methods invocations (i.e. in Thor::Group). - # - # source://thor//lib/thor/invocation.rb#12 - def prepare_for_invocation(key, name); end -end - -# Raised when a command was found, but not invoked properly. -# -# source://thor//lib/thor/error.rb#65 -class Thor::InvocationError < ::Thor::Error; end - -# source://thor//lib/thor/line_editor/basic.rb#2 -module Thor::LineEditor - class << self - # source://thor//lib/thor/line_editor.rb#10 - def best_available; end - - # source://thor//lib/thor/line_editor.rb#6 - def readline(prompt, options = T.unsafe(nil)); end - end -end - -# source://thor//lib/thor/line_editor/basic.rb#3 -class Thor::LineEditor::Basic - # @return [Basic] a new instance of Basic - # - # source://thor//lib/thor/line_editor/basic.rb#10 - def initialize(prompt, options); end - - # Returns the value of attribute options. - # - # source://thor//lib/thor/line_editor/basic.rb#4 - def options; end - - # Returns the value of attribute prompt. - # - # source://thor//lib/thor/line_editor/basic.rb#4 - def prompt; end - - # source://thor//lib/thor/line_editor/basic.rb#15 - def readline; end - - private - - # @return [Boolean] - # - # source://thor//lib/thor/line_editor/basic.rb#32 - def echo?; end - - # source://thor//lib/thor/line_editor/basic.rb#22 - def get_input; end - - class << self - # @return [Boolean] - # - # source://thor//lib/thor/line_editor/basic.rb#6 - def available?; end - end -end - -# source://thor//lib/thor/line_editor/readline.rb#3 -class Thor::LineEditor::Readline < ::Thor::LineEditor::Basic - # source://thor//lib/thor/line_editor/readline.rb#13 - def readline; end - - private - - # @return [Boolean] - # - # source://thor//lib/thor/line_editor/readline.rb#28 - def add_to_history?; end - - # source://thor//lib/thor/line_editor/readline.rb#42 - def completion_options; end - - # source://thor//lib/thor/line_editor/readline.rb#32 - def completion_proc; end - - # @return [Boolean] - # - # source://thor//lib/thor/line_editor/readline.rb#46 - def use_path_completion?; end - - class << self - # @return [Boolean] - # - # source://thor//lib/thor/line_editor/readline.rb#4 - def available?; end - end -end - -# source://thor//lib/thor/line_editor/readline.rb#50 -class Thor::LineEditor::Readline::PathCompletion - # @return [PathCompletion] a new instance of PathCompletion - # - # source://thor//lib/thor/line_editor/readline.rb#54 - def initialize(text); end - - # source://thor//lib/thor/line_editor/readline.rb#58 - def matches; end - - private - - # source://thor//lib/thor/line_editor/readline.rb#68 - def absolute_matches; end - - # source://thor//lib/thor/line_editor/readline.rb#82 - def base_path; end - - # source://thor//lib/thor/line_editor/readline.rb#78 - def glob_pattern; end - - # source://thor//lib/thor/line_editor/readline.rb#64 - def relative_matches; end - - # Returns the value of attribute text. - # - # source://thor//lib/thor/line_editor/readline.rb#51 - def text; end -end - -# source://thor//lib/thor/error.rb#101 -class Thor::MalformattedArgumentError < ::Thor::InvocationError; end - -# source://thor//lib/thor/nested_context.rb#2 -class Thor::NestedContext - # @return [NestedContext] a new instance of NestedContext - # - # source://thor//lib/thor/nested_context.rb#3 - def initialize; end - - # source://thor//lib/thor/nested_context.rb#7 - def enter; end - - # @return [Boolean] - # - # source://thor//lib/thor/nested_context.rb#15 - def entered?; end - - private - - # source://thor//lib/thor/nested_context.rb#25 - def pop; end - - # source://thor//lib/thor/nested_context.rb#21 - def push; end -end - -# source://thor//lib/thor/error.rb#8 -class Thor::NoKwargSpellChecker < ::DidYouMean::SpellChecker - # source://thor//lib/thor/error.rb#9 - def initialize(dictionary); end -end - -# source://thor//lib/thor/parser/option.rb#2 -class Thor::Option < ::Thor::Argument - # @return [Option] a new instance of Option - # - # source://thor//lib/thor/parser/option.rb#7 - def initialize(name, options = T.unsafe(nil)); end - - # Returns the value of attribute aliases. - # - # source://thor//lib/thor/parser/option.rb#3 - def aliases; end - - # source://thor//lib/thor/parser/option.rb#105 - def array?; end - - # source://thor//lib/thor/parser/option.rb#105 - def boolean?; end - - # Returns the value of attribute group. - # - # source://thor//lib/thor/parser/option.rb#3 - def group; end - - # source://thor//lib/thor/parser/option.rb#105 - def hash?; end - - # Returns the value of attribute hide. - # - # source://thor//lib/thor/parser/option.rb#3 - def hide; end - - # source://thor//lib/thor/parser/option.rb#79 - def human_name; end - - # Returns the value of attribute lazy_default. - # - # source://thor//lib/thor/parser/option.rb#3 - def lazy_default; end - - # source://thor//lib/thor/parser/option.rb#105 - def numeric?; end - - # Returns the value of attribute repeatable. - # - # source://thor//lib/thor/parser/option.rb#3 - def repeatable; end - - # source://thor//lib/thor/parser/option.rb#105 - def string?; end - - # source://thor//lib/thor/parser/option.rb#75 - def switch_name; end - - # source://thor//lib/thor/parser/option.rb#83 - def usage(padding = T.unsafe(nil)); end - - protected - - # source://thor//lib/thor/parser/option.rb#155 - def dasherize(str); end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/option.rb#147 - def dasherized?; end - - # source://thor//lib/thor/parser/option.rb#151 - def undasherize(str); end - - # @raise [ArgumentError] - # - # source://thor//lib/thor/parser/option.rb#113 - def validate!; end - - # source://thor//lib/thor/parser/option.rb#118 - def validate_default_type!; end - - class << self - # This parse quick options given as method_options. It makes several - # assumptions, but you can be more specific using the option method. - # - # parse :foo => "bar" - # #=> Option foo with default value bar - # - # parse [:foo, :baz] => "bar" - # #=> Option foo with default value bar and alias :baz - # - # parse :foo => :required - # #=> Required option foo without default value - # - # parse :foo => 2 - # #=> Option foo with default value 2 and type numeric - # - # parse :foo => :numeric - # #=> Option foo without default value and type numeric - # - # parse :foo => true - # #=> Option foo with default value true and type boolean - # - # The valid types are :boolean, :numeric, :hash, :array and :string. If none - # is given a default type is assumed. This default type accepts arguments as - # string (--foo=value) or booleans (just --foo). - # - # By default all options are optional, unless :required is given. - # - # source://thor//lib/thor/parser/option.rb#45 - def parse(key, value); end - end -end - -# source://thor//lib/thor/parser/option.rb#5 -Thor::Option::VALID_TYPES = T.let(T.unsafe(nil), Array) - -# source://thor//lib/thor/parser/options.rb#2 -class Thor::Options < ::Thor::Arguments - # Takes a hash of Thor::Option and a hash with defaults. - # - # If +stop_on_unknown+ is true, #parse will stop as soon as it encounters - # an unknown option or a regular argument. - # - # @return [Options] a new instance of Options - # - # source://thor//lib/thor/parser/options.rb#32 - def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil)); end - - # @raise [UnknownArgumentError] - # - # source://thor//lib/thor/parser/options.rb#141 - def check_unknown!; end - - # source://thor//lib/thor/parser/options.rb#88 - def parse(args); end - - # source://thor//lib/thor/parser/options.rb#64 - def peek; end - - # source://thor//lib/thor/parser/options.rb#60 - def remaining; end - - # source://thor//lib/thor/parser/options.rb#78 - def shift; end - - # source://thor//lib/thor/parser/options.rb#83 - def unshift(arg, is_value: T.unsafe(nil)); end - - protected - - # source://thor//lib/thor/parser/options.rb#151 - def assign_result!(option, result); end - - # Check if the current value in peek is a registered switch. - # - # Two booleans are returned. The first is true if the current value - # starts with a hyphen; the second is true if it is a registered switch. - # - # @return [Boolean] - # - # source://thor//lib/thor/parser/options.rb#165 - def current_is_switch?; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/options.rb#177 - def current_is_switch_formatted?; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/options.rb#187 - def current_is_value?; end - - # Check if the given argument is actually a shortcut. - # - # source://thor//lib/thor/parser/options.rb#206 - def normalize_switch(arg); end - - # Parse boolean values which can be given as --foo=true, --foo or --no-foo. - # - # source://thor//lib/thor/parser/options.rb#217 - def parse_boolean(switch); end - - # Parse the value at the peek analyzing if it requires an input or not. - # - # source://thor//lib/thor/parser/options.rb#235 - def parse_peek(switch, option); end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/options.rb#210 - def parsing_options?; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/options.rb#192 - def switch?(arg); end - - # source://thor//lib/thor/parser/options.rb#196 - def switch_option(arg); end - - class << self - # Receives a hash and makes it switches. - # - # source://thor//lib/thor/parser/options.rb#11 - def to_switches(options); end - end -end - -# source://thor//lib/thor/parser/options.rb#5 -Thor::Options::EQ_RE = T.let(T.unsafe(nil), Regexp) - -# source://thor//lib/thor/parser/options.rb#3 -Thor::Options::LONG_RE = T.let(T.unsafe(nil), Regexp) - -# source://thor//lib/thor/parser/options.rb#8 -Thor::Options::OPTS_END = T.let(T.unsafe(nil), String) - -# source://thor//lib/thor/parser/options.rb#7 -Thor::Options::SHORT_NUM = T.let(T.unsafe(nil), Regexp) - -# source://thor//lib/thor/parser/options.rb#4 -Thor::Options::SHORT_RE = T.let(T.unsafe(nil), Regexp) - -# Allow either -x -v or -xv style for single char args -# -# source://thor//lib/thor/parser/options.rb#6 -Thor::Options::SHORT_SQ_RE = T.let(T.unsafe(nil), Regexp) - -# Adds a compatibility layer to your Thor classes which allows you to use -# rake package tasks. For example, to use rspec rake tasks, one can do: -# -# require 'thor/rake_compat' -# require 'rspec/core/rake_task' -# -# class Default < Thor -# include Thor::RakeCompat -# -# RSpec::Core::RakeTask.new(:spec) do |t| -# t.spec_opts = ['--options', './.rspec'] -# t.spec_files = FileList['spec/**/*_spec.rb'] -# end -# end -# -# source://thor//lib/thor/rake_compat.rb#20 -module Thor::RakeCompat - include ::FileUtils::StreamUtils_ - include ::FileUtils - include ::Rake::FileUtilsExt - include ::Rake::DSL - - class << self - # @private - # - # source://thor//lib/thor/rake_compat.rb#27 - def included(base); end - - # source://thor//lib/thor/rake_compat.rb#23 - def rake_classes; end - end -end - -# source://thor//lib/thor/error.rb#98 -class Thor::RequiredArgumentMissingError < ::Thor::InvocationError; end - -# source://thor//lib/thor/util.rb#4 -module Thor::Sandbox; end - -# source://thor//lib/thor/shell.rb#23 -module Thor::Shell - # Add shell to initialize config values. - # - # ==== Configuration - # shell<Object>:: An instance of the shell to be used. - # - # ==== Examples - # - # class MyScript < Thor - # argument :first, :type => :numeric - # end - # - # MyScript.new [1.0], { :foo => :bar }, :shell => Thor::Shell::Basic.new - # - # source://thor//lib/thor/shell.rb#44 - def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end - - # source://thor//lib/thor/shell.rb#59 - def ask(*args, &block); end - - # source://thor//lib/thor/shell.rb#59 - def error(*args, &block); end - - # source://thor//lib/thor/shell.rb#59 - def file_collision(*args, &block); end - - # source://thor//lib/thor/shell.rb#59 - def no?(*args, &block); end - - # source://thor//lib/thor/shell.rb#59 - def print_in_columns(*args, &block); end - - # source://thor//lib/thor/shell.rb#59 - def print_table(*args, &block); end - - # source://thor//lib/thor/shell.rb#59 - def print_wrapped(*args, &block); end - - # source://thor//lib/thor/shell.rb#59 - def say(*args, &block); end - - # source://thor//lib/thor/shell.rb#59 - def say_error(*args, &block); end - - # source://thor//lib/thor/shell.rb#59 - def say_status(*args, &block); end - - # source://thor//lib/thor/shell.rb#59 - def set_color(*args, &block); end - - # Holds the shell for the given Thor instance. If no shell is given, - # it gets a default shell from Thor::Base.shell. - # - # source://thor//lib/thor/shell.rb#52 - def shell; end - - # Sets the attribute shell - # - # @param value the value to set the attribute shell to. - # - # source://thor//lib/thor/shell.rb#25 - def shell=(_arg0); end - - # source://thor//lib/thor/shell.rb#59 - def terminal_width(*args, &block); end - - # Yields the given block with padding. - # - # source://thor//lib/thor/shell.rb#66 - def with_padding; end - - # source://thor//lib/thor/shell.rb#59 - def yes?(*args, &block); end - - protected - - # Allow shell to be shared between invocations. - # - # source://thor//lib/thor/shell.rb#77 - def _shared_configuration; end -end - -# source://thor//lib/thor/shell/basic.rb#3 -class Thor::Shell::Basic - # Initialize base, mute and padding to nil. - # - # @return [Basic] a new instance of Basic - # - # source://thor//lib/thor/shell/basic.rb#11 - def initialize; end - - # Asks something to the user and receives a response. - # - # If a default value is specified it will be presented to the user - # and allows them to select that value with an empty response. This - # option is ignored when limited answers are supplied. - # - # If asked to limit the correct responses, you can pass in an - # array of acceptable answers. If one of those is not supplied, - # they will be shown a message stating that one of those answers - # must be given and re-asked the question. - # - # If asking for sensitive information, the :echo option can be set - # to false to mask user input from $stdin. - # - # If the required input is a path, then set the path option to - # true. This will enable tab completion for file paths relative - # to the current working directory on systems that support - # Readline. - # - # ==== Example - # ask("What is your name?") - # - # ask("What is the planet furthest from the sun?", :default => "Pluto") - # - # ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"]) - # - # ask("What is your password?", :echo => false) - # - # ask("Where should the file be saved?", :path => true) - # - # source://thor//lib/thor/shell/basic.rb#78 - def ask(statement, *args); end - - # Returns the value of attribute base. - # - # source://thor//lib/thor/shell/basic.rb#6 - def base; end - - # Sets the attribute base - # - # @param value the value to set the attribute base to. - # - # source://thor//lib/thor/shell/basic.rb#6 - def base=(_arg0); end - - # Called if something goes wrong during the execution. This is used by Thor - # internally and should not be used inside your scripts. If something went - # wrong, you can always raise an exception. If you raise a Thor::Error, it - # will be rescued and wrapped in the method below. - # - # source://thor//lib/thor/shell/basic.rb#342 - def error(statement); end - - # Deals with file collision and returns true if the file should be - # overwritten and false otherwise. If a block is given, it uses the block - # response as the content for the diff. - # - # ==== Parameters - # destination<String>:: the destination file to solve conflicts - # block<Proc>:: an optional block that returns the value to be used in diff and merge - # - # source://thor//lib/thor/shell/basic.rb#285 - def file_collision(destination); end - - # Sets the output padding while executing a block and resets it. - # - # source://thor//lib/thor/shell/basic.rb#41 - def indent(count = T.unsafe(nil)); end - - # Mute everything that's inside given block - # - # source://thor//lib/thor/shell/basic.rb#20 - def mute; end - - # Check if base is muted - # - # @return [Boolean] - # - # source://thor//lib/thor/shell/basic.rb#29 - def mute?; end - - # Make a question the to user and returns true if the user replies "n" or - # "no". - # - # @return [Boolean] - # - # source://thor//lib/thor/shell/basic.rb#154 - def no?(statement, color = T.unsafe(nil)); end - - # Returns the value of attribute padding. - # - # source://thor//lib/thor/shell/basic.rb#7 - def padding; end - - # Sets the output padding, not allowing less than zero values. - # - # source://thor//lib/thor/shell/basic.rb#35 - def padding=(value); end - - # Prints values in columns - # - # ==== Parameters - # Array[String, String, ...] - # - # source://thor//lib/thor/shell/basic.rb#163 - def print_in_columns(array); end - - # Prints a table. - # - # ==== Parameters - # Array[Array[String, String, ...]] - # - # ==== Options - # indent<Integer>:: Indent the first column by indent value. - # colwidth<Integer>:: Force the first column to colwidth spaces wide. - # - # source://thor//lib/thor/shell/basic.rb#185 - def print_table(array, options = T.unsafe(nil)); end - - # Prints a long string, word-wrapping the text to the current width of the - # terminal display. Ideal for printing heredocs. - # - # ==== Parameters - # String - # - # ==== Options - # indent<Integer>:: Indent each line of the printed paragraph by indent value. - # - # source://thor//lib/thor/shell/basic.rb#247 - def print_wrapped(message, options = T.unsafe(nil)); end - - # Say (print) something to the user. If the sentence ends with a whitespace - # or tab character, a new line is not appended (print + flush). Otherwise - # are passed straight to puts (behavior got from Highline). - # - # ==== Example - # say("I know you knew that.") - # - # source://thor//lib/thor/shell/basic.rb#96 - def say(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end - - # Say (print) an error to the user. If the sentence ends with a whitespace - # or tab character, a new line is not appended (print + flush). Otherwise - # are passed straight to puts (behavior got from Highline). - # - # ==== Example - # say_error("error: something went wrong") - # - # source://thor//lib/thor/shell/basic.rb#113 - def say_error(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end - - # Say a status with the given color and appends the message. Since this - # method is used frequently by actions, it allows nil or false to be given - # in log_status, avoiding the message from being shown. If a Symbol is - # given in log_status, it's used as the color. - # - # source://thor//lib/thor/shell/basic.rb#128 - def say_status(status, message, log_status = T.unsafe(nil)); end - - # Apply color to the given string with optional bold. Disabled in the - # Thor::Shell::Basic class. - # - # source://thor//lib/thor/shell/basic.rb#349 - def set_color(string, *_arg1); end - - # source://thor//lib/thor/shell/basic.rb#326 - def terminal_width; end - - # Make a question the to user and returns true if the user replies "y" or - # "yes". - # - # @return [Boolean] - # - # source://thor//lib/thor/shell/basic.rb#147 - def yes?(statement, color = T.unsafe(nil)); end - - protected - - # source://thor//lib/thor/shell/basic.rb#486 - def answer_match(possibilities, answer, case_insensitive); end - - # source://thor//lib/thor/shell/basic.rb#443 - def as_unicode; end - - # source://thor//lib/thor/shell/basic.rb#473 - def ask_filtered(statement, color, options); end - - # source://thor//lib/thor/shell/basic.rb#456 - def ask_simply(statement, color, options); end - - # @return [Boolean] - # - # source://thor//lib/thor/shell/basic.rb#360 - def can_display_colors?; end - - # Calculate the dynamic width of the terminal - # - # source://thor//lib/thor/shell/basic.rb#415 - def dynamic_width; end - - # source://thor//lib/thor/shell/basic.rb#419 - def dynamic_width_stty; end - - # source://thor//lib/thor/shell/basic.rb#423 - def dynamic_width_tput; end - - # source://thor//lib/thor/shell/basic.rb#387 - def file_collision_help; end - - # source://thor//lib/thor/shell/basic.rb#507 - def git_merge_tool; end - - # @return [Boolean] - # - # source://thor//lib/thor/shell/basic.rb#377 - def is?(value); end - - # source://thor//lib/thor/shell/basic.rb#364 - def lookup_color(color); end - - # source://thor//lib/thor/shell/basic.rb#494 - def merge(destination, content); end - - # source://thor//lib/thor/shell/basic.rb#503 - def merge_tool; end - - # source://thor//lib/thor/shell/basic.rb#355 - def prepare_message(message, *color); end - - # @return [Boolean] - # - # source://thor//lib/thor/shell/basic.rb#410 - def quiet?; end - - # source://thor//lib/thor/shell/basic.rb#399 - def show_diff(destination, content); end - - # source://thor//lib/thor/shell/basic.rb#373 - def stderr; end - - # source://thor//lib/thor/shell/basic.rb#369 - def stdout; end - - # source://thor//lib/thor/shell/basic.rb#431 - def truncate(string, width); end - - # @return [Boolean] - # - # source://thor//lib/thor/shell/basic.rb#427 - def unix?; end -end - -# source://thor//lib/thor/shell/basic.rb#4 -Thor::Shell::Basic::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) - -# Inherit from Thor::Shell::Basic and add set_color behavior. Check -# Thor::Shell::Basic to see all available methods. -# -# source://thor//lib/thor/shell/color.rb#8 -class Thor::Shell::Color < ::Thor::Shell::Basic - # Set color by using a string or one of the defined constants. If a third - # option is set to true, it also adds bold to the string. This is based - # on Highline implementation and it automatically appends CLEAR to the end - # of the returned String. - # - # Pass foreground, background and bold options to this method as - # symbols. - # - # Example: - # - # set_color "Hi!", :red, :on_white, :bold - # - # The available colors are: - # - # :bold - # :black - # :red - # :green - # :yellow - # :blue - # :magenta - # :cyan - # :white - # :on_black - # :on_red - # :on_green - # :on_yellow - # :on_blue - # :on_magenta - # :on_cyan - # :on_white - # - # source://thor//lib/thor/shell/color.rb#79 - def set_color(string, *colors); end - - protected - - # @return [Boolean] - # - # source://thor//lib/thor/shell/color.rb#107 - def are_colors_disabled?; end - - # @return [Boolean] - # - # source://thor//lib/thor/shell/color.rb#103 - def are_colors_supported?; end - - # @return [Boolean] - # - # source://thor//lib/thor/shell/color.rb#99 - def can_display_colors?; end - - # Check if Diff::LCS is loaded. If it is, use it to create pretty output - # for diff. - # - # @return [Boolean] - # - # source://thor//lib/thor/shell/color.rb#144 - def diff_lcs_loaded?; end - - # source://thor//lib/thor/shell/color.rb#127 - def output_diff_line(diff); end - - # Overwrite show_diff to show diff with colors if Diff::LCS is - # available. - # - # source://thor//lib/thor/shell/color.rb#114 - def show_diff(destination, content); end -end - -# Set the terminal's foreground ANSI color to black. -# -# source://thor//lib/thor/shell/color.rb#15 -Thor::Shell::Color::BLACK = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground ANSI color to blue. -# -# source://thor//lib/thor/shell/color.rb#23 -Thor::Shell::Color::BLUE = T.let(T.unsafe(nil), String) - -# The start of an ANSI bold sequence. -# -# source://thor//lib/thor/shell/color.rb#12 -Thor::Shell::Color::BOLD = T.let(T.unsafe(nil), String) - -# Embed in a String to clear all previous ANSI sequences. -# -# source://thor//lib/thor/shell/color.rb#10 -Thor::Shell::Color::CLEAR = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground ANSI color to cyan. -# -# source://thor//lib/thor/shell/color.rb#27 -Thor::Shell::Color::CYAN = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground ANSI color to green. -# -# source://thor//lib/thor/shell/color.rb#19 -Thor::Shell::Color::GREEN = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground ANSI color to magenta. -# -# source://thor//lib/thor/shell/color.rb#25 -Thor::Shell::Color::MAGENTA = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to black. -# -# source://thor//lib/thor/shell/color.rb#32 -Thor::Shell::Color::ON_BLACK = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to blue. -# -# source://thor//lib/thor/shell/color.rb#40 -Thor::Shell::Color::ON_BLUE = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to cyan. -# -# source://thor//lib/thor/shell/color.rb#44 -Thor::Shell::Color::ON_CYAN = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to green. -# -# source://thor//lib/thor/shell/color.rb#36 -Thor::Shell::Color::ON_GREEN = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to magenta. -# -# source://thor//lib/thor/shell/color.rb#42 -Thor::Shell::Color::ON_MAGENTA = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to red. -# -# source://thor//lib/thor/shell/color.rb#34 -Thor::Shell::Color::ON_RED = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to white. -# -# source://thor//lib/thor/shell/color.rb#46 -Thor::Shell::Color::ON_WHITE = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to yellow. -# -# source://thor//lib/thor/shell/color.rb#38 -Thor::Shell::Color::ON_YELLOW = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground ANSI color to red. -# -# source://thor//lib/thor/shell/color.rb#17 -Thor::Shell::Color::RED = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground ANSI color to white. -# -# source://thor//lib/thor/shell/color.rb#29 -Thor::Shell::Color::WHITE = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground ANSI color to yellow. -# -# source://thor//lib/thor/shell/color.rb#21 -Thor::Shell::Color::YELLOW = T.let(T.unsafe(nil), String) - -# Inherit from Thor::Shell::Basic and add set_color behavior. Check -# Thor::Shell::Basic to see all available methods. -# -# source://thor//lib/thor/shell/html.rb#8 -class Thor::Shell::HTML < ::Thor::Shell::Basic - # Ask something to the user and receives a response. - # - # ==== Example - # ask("What is your name?") - # - # TODO: Implement #ask for Thor::Shell::HTML - # - # @raise [NotImplementedError] - # - # source://thor//lib/thor/shell/html.rb#70 - def ask(statement, color = T.unsafe(nil)); end - - # Set color by using a string or one of the defined constants. If a third - # option is set to true, it also adds bold to the string. This is based - # on Highline implementation and it automatically appends CLEAR to the end - # of the returned String. - # - # source://thor//lib/thor/shell/html.rb#51 - def set_color(string, *colors); end - - protected - - # @return [Boolean] - # - # source://thor//lib/thor/shell/html.rb#76 - def can_display_colors?; end - - # Check if Diff::LCS is loaded. If it is, use it to create pretty output - # for diff. - # - # @return [Boolean] - # - # source://thor//lib/thor/shell/html.rb#113 - def diff_lcs_loaded?; end - - # source://thor//lib/thor/shell/html.rb#96 - def output_diff_line(diff); end - - # Overwrite show_diff to show diff with colors if Diff::LCS is - # available. - # - # source://thor//lib/thor/shell/html.rb#83 - def show_diff(destination, content); end -end - -# Set the terminal's foreground HTML color to black. -# -# source://thor//lib/thor/shell/html.rb#13 -Thor::Shell::HTML::BLACK = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground HTML color to blue. -# -# source://thor//lib/thor/shell/html.rb#21 -Thor::Shell::HTML::BLUE = T.let(T.unsafe(nil), String) - -# The start of an HTML bold sequence. -# -# source://thor//lib/thor/shell/html.rb#10 -Thor::Shell::HTML::BOLD = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground HTML color to cyan. -# -# source://thor//lib/thor/shell/html.rb#25 -Thor::Shell::HTML::CYAN = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground HTML color to green. -# -# source://thor//lib/thor/shell/html.rb#17 -Thor::Shell::HTML::GREEN = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground HTML color to magenta. -# -# source://thor//lib/thor/shell/html.rb#23 -Thor::Shell::HTML::MAGENTA = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to black. -# -# source://thor//lib/thor/shell/html.rb#30 -Thor::Shell::HTML::ON_BLACK = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to blue. -# -# source://thor//lib/thor/shell/html.rb#38 -Thor::Shell::HTML::ON_BLUE = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to cyan. -# -# source://thor//lib/thor/shell/html.rb#42 -Thor::Shell::HTML::ON_CYAN = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to green. -# -# source://thor//lib/thor/shell/html.rb#34 -Thor::Shell::HTML::ON_GREEN = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to magenta. -# -# source://thor//lib/thor/shell/html.rb#40 -Thor::Shell::HTML::ON_MAGENTA = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to red. -# -# source://thor//lib/thor/shell/html.rb#32 -Thor::Shell::HTML::ON_RED = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to white. -# -# source://thor//lib/thor/shell/html.rb#44 -Thor::Shell::HTML::ON_WHITE = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to yellow. -# -# source://thor//lib/thor/shell/html.rb#36 -Thor::Shell::HTML::ON_YELLOW = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground HTML color to red. -# -# source://thor//lib/thor/shell/html.rb#15 -Thor::Shell::HTML::RED = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground HTML color to white. -# -# source://thor//lib/thor/shell/html.rb#27 -Thor::Shell::HTML::WHITE = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground HTML color to yellow. -# -# source://thor//lib/thor/shell/html.rb#19 -Thor::Shell::HTML::YELLOW = T.let(T.unsafe(nil), String) - -# source://thor//lib/thor/shell.rb#24 -Thor::Shell::SHELL_DELEGATED_METHODS = T.let(T.unsafe(nil), Array) - -# source://thor//lib/thor/base.rb#23 -Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String) - -# Thor methods that should not be overwritten by the user. -# -# source://thor//lib/thor/base.rb#20 -Thor::THOR_RESERVED_WORDS = T.let(T.unsafe(nil), Array) - -# source://thor//lib/thor/command.rb#117 -Thor::Task = Thor::Command - -# Raised when a command was not found. -# -# source://thor//lib/thor/error.rb#27 -class Thor::UndefinedCommandError < ::Thor::Error - include ::DidYouMean::Correctable - - # @return [UndefinedCommandError] a new instance of UndefinedCommandError - # - # source://thor//lib/thor/error.rb#46 - def initialize(command, all_commands, namespace); end - - # Returns the value of attribute all_commands. - # - # source://thor//lib/thor/error.rb#44 - def all_commands; end - - # Returns the value of attribute command. - # - # source://thor//lib/thor/error.rb#44 - def command; end -end - -# source://thor//lib/thor/error.rb#28 -class Thor::UndefinedCommandError::SpellChecker - # @return [SpellChecker] a new instance of SpellChecker - # - # source://thor//lib/thor/error.rb#31 - def initialize(error); end - - # source://thor//lib/thor/error.rb#35 - def corrections; end - - # Returns the value of attribute error. - # - # source://thor//lib/thor/error.rb#29 - def error; end - - # source://thor//lib/thor/error.rb#39 - def spell_checker; end -end - -# source://thor//lib/thor/error.rb#58 -Thor::UndefinedTaskError = Thor::UndefinedCommandError - -# source://thor//lib/thor/error.rb#68 -class Thor::UnknownArgumentError < ::Thor::Error - include ::DidYouMean::Correctable - - # @return [UnknownArgumentError] a new instance of UnknownArgumentError - # - # source://thor//lib/thor/error.rb#88 - def initialize(switches, unknown); end - - # Returns the value of attribute switches. - # - # source://thor//lib/thor/error.rb#86 - def switches; end - - # Returns the value of attribute unknown. - # - # source://thor//lib/thor/error.rb#86 - def unknown; end -end - -# source://thor//lib/thor/error.rb#69 -class Thor::UnknownArgumentError::SpellChecker - # @return [SpellChecker] a new instance of SpellChecker - # - # source://thor//lib/thor/error.rb#72 - def initialize(error); end - - # source://thor//lib/thor/error.rb#76 - def corrections; end - - # Returns the value of attribute error. - # - # source://thor//lib/thor/error.rb#70 - def error; end - - # source://thor//lib/thor/error.rb#81 - def spell_checker; end -end - -# This module holds several utilities: -# -# 1) Methods to convert thor namespaces to constants and vice-versa. -# -# Thor::Util.namespace_from_thor_class(Foo::Bar::Baz) #=> "foo:bar:baz" -# -# 2) Loading thor files and sandboxing: -# -# Thor::Util.load_thorfile("~/.thor/foo") -# -# source://thor//lib/thor/util.rb#17 -module Thor::Util - class << self - # Receives a string and convert it to camel case. camel_case returns CamelCase. - # - # ==== Parameters - # String - # - # ==== Returns - # String - # - # source://thor//lib/thor/util.rb#104 - def camel_case(str); end - - # Returns a string that has had any glob characters escaped. - # The glob characters are `* ? { } [ ]`. - # - # ==== Examples - # - # Thor::Util.escape_globs('[apps]') # => '\[apps\]' - # - # ==== Parameters - # String - # - # ==== Returns - # String - # - # source://thor//lib/thor/util.rb#263 - def escape_globs(path); end - - # Returns a string that has had any HTML characters escaped. - # - # ==== Examples - # - # Thor::Util.escape_html('<div>') # => "<div>" - # - # ==== Parameters - # String - # - # ==== Returns - # String - # - # source://thor//lib/thor/util.rb#279 - def escape_html(string); end - - # Receives a namespace and search for it in the Thor::Base subclasses. - # - # ==== Parameters - # namespace<String>:: The namespace to search for. - # - # source://thor//lib/thor/util.rb#24 - def find_by_namespace(namespace); end - - # Receives a namespace and tries to retrieve a Thor or Thor::Group class - # from it. It first searches for a class using the all the given namespace, - # if it's not found, removes the highest entry and searches for the class - # again. If found, returns the highest entry as the class name. - # - # ==== Examples - # - # class Foo::Bar < Thor - # def baz - # end - # end - # - # class Baz::Foo < Thor::Group - # end - # - # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command - # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil - # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz" - # - # ==== Parameters - # namespace<String> - # - # source://thor//lib/thor/util.rb#131 - def find_class_and_command_by_namespace(namespace, fallback = T.unsafe(nil)); end - - # Receives a namespace and tries to retrieve a Thor or Thor::Group class - # from it. It first searches for a class using the all the given namespace, - # if it's not found, removes the highest entry and searches for the class - # again. If found, returns the highest entry as the class name. - # - # ==== Examples - # - # class Foo::Bar < Thor - # def baz - # end - # end - # - # class Baz::Foo < Thor::Group - # end - # - # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command - # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil - # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz" - # - # ==== Parameters - # namespace<String> - # - # source://thor//lib/thor/util.rb#131 - def find_class_and_task_by_namespace(namespace, fallback = T.unsafe(nil)); end - - # Where to look for Thor files. - # - # source://thor//lib/thor/util.rb#212 - def globs_for(path); end - - # Receives a path and load the thor file in the path. The file is evaluated - # inside the sandbox to avoid namespacing conflicts. - # - # source://thor//lib/thor/util.rb#152 - def load_thorfile(path, content = T.unsafe(nil), debug = T.unsafe(nil)); end - - # Receives a constant and converts it to a Thor namespace. Since Thor - # commands can be added to a sandbox, this method is also responsible for - # removing the sandbox namespace. - # - # This method should not be used in general because it's used to deal with - # older versions of Thor. On current versions, if you need to get the - # namespace from a class, just call namespace on it. - # - # ==== Parameters - # constant<Object>:: The constant to be converted to the thor path. - # - # ==== Returns - # String:: If we receive Foo::Bar::Baz it returns "foo:bar:baz" - # - # source://thor//lib/thor/util.rb#43 - def namespace_from_thor_class(constant); end - - # Given the contents, evaluate it inside the sandbox and returns the - # namespaces defined in the sandbox. - # - # ==== Parameters - # contents<String> - # - # ==== Returns - # Array[Object] - # - # source://thor//lib/thor/util.rb#58 - def namespaces_in_content(contents, file = T.unsafe(nil)); end - - # Return the path to the ruby interpreter taking into account multiple - # installations and windows extensions. - # - # source://thor//lib/thor/util.rb#220 - def ruby_command; end - - # Receives a string and convert it to snake case. SnakeCase returns snake_case. - # - # ==== Parameters - # String - # - # ==== Returns - # String - # - # source://thor//lib/thor/util.rb#90 - def snake_case(str); end - - # Returns the thor classes declared inside the given class. - # - # source://thor//lib/thor/util.rb#74 - def thor_classes_in(klass); end - - # Returns the root where thor files are located, depending on the OS. - # - # source://thor//lib/thor/util.rb#191 - def thor_root; end - - # Returns the files in the thor root. On Windows thor_root will be something - # like this: - # - # C:\Documents and Settings\james\.thor - # - # If we don't #gsub the \ character, Dir.glob will fail. - # - # source://thor//lib/thor/util.rb#202 - def thor_root_glob; end - - # source://thor//lib/thor/util.rb#167 - def user_home; end - end -end diff --git a/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi b/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi deleted file mode 100644 index ccdfd066..00000000 --- a/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +++ /dev/null @@ -1,65 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `unicode-display_width` gem. -# Please instead update this file by running `bin/tapioca gem unicode-display_width`. - -# source://unicode-display_width//lib/unicode/display_width/constants.rb#3 -module Unicode; end - -# source://unicode-display_width//lib/unicode/display_width/constants.rb#4 -class Unicode::DisplayWidth - # @return [DisplayWidth] a new instance of DisplayWidth - # - # source://unicode-display_width//lib/unicode/display_width.rb#104 - def initialize(ambiguous: T.unsafe(nil), overwrite: T.unsafe(nil), emoji: T.unsafe(nil)); end - - # source://unicode-display_width//lib/unicode/display_width.rb#110 - def get_config(**kwargs); end - - # source://unicode-display_width//lib/unicode/display_width.rb#118 - def of(string, **kwargs); end - - class << self - # source://unicode-display_width//lib/unicode/display_width/index.rb#14 - def decompress_index(index, level); end - - # source://unicode-display_width//lib/unicode/display_width.rb#86 - def emoji_extra_width_of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), _ = T.unsafe(nil)); end - - # source://unicode-display_width//lib/unicode/display_width.rb#12 - def of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), options = T.unsafe(nil)); end - - # Same as .width_no_overwrite - but with applying overwrites for each char - # - # source://unicode-display_width//lib/unicode/display_width.rb#57 - def width_all_features(string, ambiguous, overwrite, options); end - - # source://unicode-display_width//lib/unicode/display_width.rb#30 - def width_no_overwrite(string, ambiguous, options = T.unsafe(nil)); end - end -end - -# source://unicode-display_width//lib/unicode/display_width.rb#9 -Unicode::DisplayWidth::ASCII_NON_ZERO_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://unicode-display_width//lib/unicode/display_width/constants.rb#7 -Unicode::DisplayWidth::DATA_DIRECTORY = T.let(T.unsafe(nil), String) - -# source://unicode-display_width//lib/unicode/display_width.rb#10 -Unicode::DisplayWidth::FIRST_4096 = T.let(T.unsafe(nil), Array) - -# source://unicode-display_width//lib/unicode/display_width/index.rb#11 -Unicode::DisplayWidth::INDEX = T.let(T.unsafe(nil), Array) - -# source://unicode-display_width//lib/unicode/display_width/constants.rb#8 -Unicode::DisplayWidth::INDEX_FILENAME = T.let(T.unsafe(nil), String) - -# source://unicode-display_width//lib/unicode/display_width.rb#8 -Unicode::DisplayWidth::INITIAL_DEPTH = T.let(T.unsafe(nil), Integer) - -# source://unicode-display_width//lib/unicode/display_width/constants.rb#6 -Unicode::DisplayWidth::UNICODE_VERSION = T.let(T.unsafe(nil), String) - -# source://unicode-display_width//lib/unicode/display_width/constants.rb#5 -Unicode::DisplayWidth::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/unparser@0.6.7.rbi b/sorbet/rbi/gems/unparser@0.6.7.rbi deleted file mode 100644 index 8c3ff894..00000000 --- a/sorbet/rbi/gems/unparser@0.6.7.rbi +++ /dev/null @@ -1,4524 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `unparser` gem. -# Please instead update this file by running `bin/tapioca gem unparser`. - -# Library namespace -# -# source://unparser//lib/unparser/equalizer.rb#3 -module Unparser - class << self - # Construct a parser buffer from string - # - # @param source [String] - # @return [Parser::Source::Buffer] - # - # source://unparser//lib/unparser.rb#147 - def buffer(source, identification = T.unsafe(nil)); end - - # Parse string into AST - # - # @param source [String] - # @return [Parser::AST::Node, nil] - # - # source://unparser//lib/unparser.rb#105 - def parse(source); end - - # Parse string into either syntax error or AST - # - # @param source [String] - # @return [Either<Parser::SyntaxError, (Parser::ASTNode, nil)>] - # - # source://unparser//lib/unparser.rb#114 - def parse_either(source); end - - # Parse string into AST, with comments - # - # @param source [String] - # @return [Parser::AST::Node] - # - # source://unparser//lib/unparser.rb#125 - def parse_with_comments(source); end - - # Parser instance that produces AST unparser understands - # - # @api private - # @return [Parser::Base] - # - # source://unparser//lib/unparser.rb#134 - def parser; end - - # Unparse an AST (and, optionally, comments) into a string - # - # @api public - # @param node [Parser::AST::Node, nil] - # @param comment_array [Array] - # @raise InvalidNodeError - # if the node passed is invalid - # @return [String] - # - # source://unparser//lib/unparser.rb#60 - def unparse(node, comment_array = T.unsafe(nil)); end - - # Unparse capturing errors - # - # This is mostly useful for writing testing tools against unparser. - # - # @param node [Parser::AST::Node, nil] - # @return [Either<Exception, String>] - # - # source://unparser//lib/unparser.rb#96 - def unparse_either(node); end - - # Unparse with validation - # - # @param node [Parser::AST::Node, nil] - # @param comment_array [Array] - # @return [Either<Validation,String>] - # - # source://unparser//lib/unparser.rb#78 - def unparse_validate(node, comment_array = T.unsafe(nil)); end - end -end - -# Namespace for AST processing tools -# -# source://unparser//lib/unparser/ast.rb#5 -module Unparser::AST - class << self - # Return local variables that get assigned in scope - # - # @api private - # @param node [Parser::AST::Node] - # @return [Set<Symbol>] - # - # source://unparser//lib/unparser/ast.rb#57 - def local_variable_assignments(node); end - - # Return local variables read - # - # @api private - # @param node [Parser::AST::Node] - # @return [Set<Symbol>] - # - # source://unparser//lib/unparser/ast.rb#72 - def local_variable_reads(node); end - - # Test for local variable inherited scope reset - # - # @api private - # @param node [Parser::AST::Node] - # @return [Boolean] - # - # source://unparser//lib/unparser/ast.rb#33 - def not_close_scope?(node); end - - # Test for local variable scope reset - # - # @api private - # @param node [Parser::AST::Node] - # @return [Boolean] - # - # source://unparser//lib/unparser/ast.rb#45 - def not_reset_scope?(node); end - end -end - -# Nodes that assign a local variable -# -# source://unparser//lib/unparser/ast.rb#14 -Unparser::AST::ASSIGN_NODES = T.let(T.unsafe(nil), Set) - -# source://unparser//lib/unparser/ast.rb#11 -Unparser::AST::CLOSE_NODES = T.let(T.unsafe(nil), Array) - -# AST enumerator -# -# source://unparser//lib/unparser/ast.rb#80 -class Unparser::AST::Enumerator - include ::Enumerable - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Return each node - # - # @api private - # @return [Enumerator<Parser::AST::Node>] if no block given - # @return [self] otherwise - # - # source://unparser//lib/unparser/ast.rb#106 - def each(&block); end - - # Return nodes selected by type - # - # @api private - # @param type [Symbol] - # @return [Enumerable<Parser::AST::Node>] - # - # source://unparser//lib/unparser/ast.rb#130 - def type(type); end - - # Return nodes selected by types - # - # @api private - # @param types [Enumerable<Symbol>] - # @return [Enumerable<Parser::AST::Node>] - # - # source://unparser//lib/unparser/ast.rb#118 - def types(types); end - - class << self - # Return new instance - # - # @api private - # @param node [Parser::AST::Node] - # @param controller [#call(node)] - # @return [Enumerator] - # - # source://unparser//lib/unparser/ast.rb#92 - def new(node, controller = T.unsafe(nil)); end - - private - - # Return frozne set of objects - # - # @api private - # @param enumerable [Enumerable] - # @return [Set] - # - # source://unparser//lib/unparser/ast.rb#142 - def set(enumerable); end - - # Return nodes of type - # - # @api private - # @param node [Parser::AST::Node] - # @param type [Symbol] - # @return [Enumerable<Parser::AST::Node]] Enumerable<Parser::AST::Node] - # - # source://unparser//lib/unparser/ast.rb#156 - def type(node, type); end - end -end - -# source://unparser//lib/unparser/ast.rb#6 -Unparser::AST::FIRST_CHILD = T.let(T.unsafe(nil), Proc) - -# source://unparser//lib/unparser/ast.rb#10 -Unparser::AST::INHERIT_NODES = T.let(T.unsafe(nil), Array) - -# Calculated local variable scope for a given node -# -# source://unparser//lib/unparser/ast/local_variable_scope.rb#7 -class Unparser::AST::LocalVariableScope - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - include ::Enumerable - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Initialize object - # - # @api private - # @param node [Parser::AST::Node] - # @return [undefined] - # - # source://unparser//lib/unparser/ast/local_variable_scope.rb#18 - def initialize(node); end - - # Test if local variable was first at given assignment - # - # @api private - # @param node [Parser::AST::Node] - # @return [Boolean] - # - # source://unparser//lib/unparser/ast/local_variable_scope.rb#35 - def first_assignment?(node); end - - # Test if local variables where first assigned in body and read by conditional - # - # @api private - # @param body [Parser::AST::Node] - # @param condition [Parser::AST::Node] - # @return [Boolean] - # - # source://unparser//lib/unparser/ast/local_variable_scope.rb#64 - def first_assignment_in?(left, right); end - - # Test if local variable is defined for given node - # - # @api private - # @param node [Parser::AST::Node] - # @param name [Symbol] - # @return [Boolean] - # - # source://unparser//lib/unparser/ast/local_variable_scope.rb#51 - def local_variable_defined_for_node?(node, name); end - - private - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#76 - def match(needle); end -end - -# Local variable scope enumerator -# -# source://unparser//lib/unparser/ast/local_variable_scope.rb#85 -class Unparser::AST::LocalVariableScopeEnumerator - include ::Enumerable - - # Initialize object - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/ast/local_variable_scope.rb#94 - def initialize; end - - # Enumerate local variable scope scope - # - # @api private - # @return [self] if block given - # @return [Enumerator<Array<Symbol>>] ] - # otherwise - # - # source://unparser//lib/unparser/ast/local_variable_scope.rb#121 - def each(node, &block); end - - private - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#127 - def current; end - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#156 - def define(name); end - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#141 - def enter(node); end - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#152 - def leave(node); end - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#168 - def pop; end - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#164 - def push_inherit; end - - # source://unparser//lib/unparser/ast/local_variable_scope.rb#160 - def push_reset; end - - # @yield [node, current.dup, before] - # - # source://unparser//lib/unparser/ast/local_variable_scope.rb#131 - def visit(node, &block); end - - class << self - # Enumerate each node with its local variable scope - # - # @api private - # @param node [Parser::AST::Node] - # @return [self] - # - # source://unparser//lib/unparser/ast/local_variable_scope.rb#106 - def each(node, &block); end - end -end - -# source://unparser//lib/unparser/ast.rb#9 -Unparser::AST::RESET_NODES = T.let(T.unsafe(nil), Array) - -# source://unparser//lib/unparser/ast.rb#7 -Unparser::AST::TAUTOLOGY = T.let(T.unsafe(nil), Proc) - -# Controlled AST walker walking the AST in deeth first search with pre order -# -# source://unparser//lib/unparser/ast.rb#164 -class Unparser::AST::Walker - include ::Unparser::Equalizer::Methods - - # Call walker with node - # - # @api private - # @param node [Parser::AST::Node] - # @return [undefined] - # - # source://unparser//lib/unparser/ast.rb#188 - def call(node); end - - class << self - # Call ast walker - # - # @api private - # @param node [Parser::AST::Node] - # @return [self] - # - # source://unparser//lib/unparser/ast.rb#175 - def call(node, controller = T.unsafe(nil), &block); end - end -end - -# Module to allow class and methods to be abstract -# -# Original code before vendoring and reduction from: https://github.com/dkubb/abstract_type. -# -# source://unparser//lib/unparser/abstract_type.rb#7 -module Unparser::AbstractType - mixes_in_class_methods ::Unparser::AbstractType::AbstractMethodDeclarations - - class << self - private - - # Define the new method on the abstract type - # - # Ensures that the instance cannot be of the abstract type - # and must be a descendant. - # - # @api private - # @param abstract_class [Class] - # @return [undefined] - # - # source://unparser//lib/unparser/abstract_type.rb#35 - def create_new_method(abstract_class); end - - # Hook called when module is included - # - # @api private - # @param descendant [Module] the module or class including AbstractType - # @return [undefined] - # - # source://unparser//lib/unparser/abstract_type.rb#17 - def included(descendant); end - end -end - -# source://unparser//lib/unparser/abstract_type.rb#47 -module Unparser::AbstractType::AbstractMethodDeclarations - # Create abstract instance methods - # - # @api public - # @example - # class Foo - # include AbstractType - # - # # Create an abstract instance method - # abstract_method :some_method - # end - # @param names [Array<#to_s>] - # @return [self] - # - # source://unparser//lib/unparser/abstract_type.rb#64 - def abstract_method(*names); end - - # Create abstract singleton methods - # - # @api private - # @example - # class Foo - # include AbstractType - # - # # Create an abstract instance method - # abstract_singleton_method :some_method - # end - # @param names [Array<#to_s>] - # @return [self] - # - # source://unparser//lib/unparser/abstract_type.rb#84 - def abstract_singleton_method(*names); end - - private - - # Create abstract instance method - # - # @api private - # @param name [#to_s] the name of the method to create - # @return [undefined] - # - # source://unparser//lib/unparser/abstract_type.rb#113 - def create_abstract_instance_method(name); end - - # Create abstract singleton method - # - # @api private - # @param name [#to_s] the name of the method to create - # @return [undefined] - # - # source://unparser//lib/unparser/abstract_type.rb#99 - def create_abstract_singleton_method(name); end -end - -# Allows objects to be made immutable -# -# Original code before vendoring and reduction from: https://github.com/dkubb/adamantium. -# -# source://unparser//lib/unparser/adamantium.rb#7 -module Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - - mixes_in_class_methods ::Unparser::Adamantium::ModuleMethods - mixes_in_class_methods ::Unparser::Adamantium::ClassMethods - - class << self - private - - # ModuleMethods - # - # source://unparser//lib/unparser/adamantium.rb#141 - def included(descendant); end - end -end - -# Methods mixed in to adamantium classes -# -# source://unparser//lib/unparser/adamantium.rb#70 -module Unparser::Adamantium::ClassMethods - # Instantiate a new frozen object - # - # @api public - # @return [Object] - # - # source://unparser//lib/unparser/adamantium.rb#77 - def new(*_arg0); end -end - -# source://unparser//lib/unparser/adamantium.rb#8 -module Unparser::Adamantium::InstanceMethods - # A noop #dup for immutable objects - # - # @api public - # @return [self] - # - # source://unparser//lib/unparser/adamantium.rb#14 - def dup; end - - # Freeze the object - # - # @api public - # @return [Object] - # - # source://unparser//lib/unparser/adamantium.rb#23 - def freeze; end - - private - - # source://unparser//lib/unparser/adamantium.rb#30 - def memoized_method_cache; end -end - -# Storage for memoized methods -# -# source://unparser//lib/unparser/adamantium.rb#37 -class Unparser::Adamantium::Memory - # Initialize the memory storage for memoized methods - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/adamantium.rb#44 - def initialize(values); end - - # Fetch the value from memory, or evaluate if it does not exist - # - # @api public - # @param name [Symbol] - # @yieldreturn [Object] the value to memoize - # - # source://unparser//lib/unparser/adamantium.rb#58 - def fetch(name); end -end - -# Build the memoized method -# -# source://unparser//lib/unparser/adamantium/method_builder.rb#6 -class Unparser::Adamantium::MethodBuilder - # Initialize an object to build a memoized method - # - # @api private - # @param descendant [Module] - # @param method_name [Symbol] - # @return [undefined] - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#47 - def initialize(descendant, method_name); end - - # Build a new memoized method - # - # @api public - # @example - # method_builder.call # => creates new method - # @return [UnboundMethod] - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#63 - def call; end - - private - - # source://unparser//lib/unparser/adamantium/method_builder.rb#72 - def assert_arity(arity); end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#83 - def create_memoized_method; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#78 - def remove_original_method; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#97 - def set_method_visibility; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#101 - def visibility; end -end - -# Raised when a block is passed to a memoized method -# -# source://unparser//lib/unparser/adamantium/method_builder.rb#25 -class Unparser::Adamantium::MethodBuilder::BlockNotAllowedError < ::ArgumentError - # Initialize a block not allowed exception - # - # @api private - # @param descendant [Module] - # @param method [Symbol] - # @return [BlockNotAllowedError] a new instance of BlockNotAllowedError - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#33 - def initialize(descendant, method); end -end - -# Raised when the method arity is invalid -# -# source://unparser//lib/unparser/adamantium/method_builder.rb#9 -class Unparser::Adamantium::MethodBuilder::InvalidArityError < ::ArgumentError - # Initialize an invalid arity exception - # - # @api private - # @param descendant [Module] - # @param method [Symbol] - # @param arity [Integer] - # @return [InvalidArityError] a new instance of InvalidArityError - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#18 - def initialize(descendant, method, arity); end -end - -# Methods mixed in to adamantium modules -# -# source://unparser//lib/unparser/adamantium.rb#84 -module Unparser::Adamantium::ModuleMethods - # Memoize a list of methods - # - # @api public - # @param methods [Array<#to_s>] a list of methods to memoize - # @return [self] - # - # source://unparser//lib/unparser/adamantium.rb#94 - def memoize(*methods); end - - # Test if method is memoized - # - # @param name [Symbol] - # @return [Bool] - # - # source://unparser//lib/unparser/adamantium.rb#104 - def memoized?(method_name); end - - # Return unmemoized instance method - # - # @api public - # @param name [Symbol] - # @raise [NameError] raised if the method is unknown - # @return [UnboundMethod] the memoized method - # - # source://unparser//lib/unparser/adamantium.rb#119 - def unmemoized_instance_method(method_name); end - - private - - # source://unparser//lib/unparser/adamantium.rb#127 - def memoize_method(method_name); end - - # source://unparser//lib/unparser/adamantium.rb#135 - def memoized_methods; end -end - -# Original code before vendoring and reduction from: https://github.com/mbj/anima. -# -# source://unparser//lib/unparser/anima.rb#5 -class Unparser::Anima < ::Module - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Initialize object - # - # - # @return [undefined] - # - # source://unparser//lib/unparser/anima.rb#18 - def initialize(*names); end - - # Return new anima with attributes added - # - # @example - # anima = Anima.new(:foo) - # anima.add(:bar) # equals Anima.new(:foo, :bar) - # @return [Anima] - # - # source://unparser//lib/unparser/anima.rb#31 - def add(*names); end - - # Return attribute names - # - # @return [Enumerable<Symbol>] - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def attribute_names(&block); end - - # Return names - # - # @return [AttributeSet] - # - # source://unparser//lib/unparser/anima.rb#11 - def attributes; end - - # Return attributes hash for instance - # - # @param object [Object] - # @return [Hash] - # - # source://unparser//lib/unparser/anima.rb#52 - def attributes_hash(object); end - - # Initialize instance - # - # @param object [Object] - # @param attribute_hash [Hash] - # @return [self] - # - # source://unparser//lib/unparser/anima.rb#73 - def initialize_instance(object, attribute_hash); end - - # Return new anima with attributes removed - # - # @example - # anima = Anima.new(:foo, :bar) - # anima.remove(:bar) # equals Anima.new(:foo) - # @return [Anima] - # - # source://unparser//lib/unparser/anima.rb#43 - def remove(*names); end - - private - - # Fail unless keys in +attribute_hash+ matches #attribute_names - # - # @param klass [Class] the class being initialized - # @param attribute_hash [Hash] the attributes to initialize +object+ with - # @raise [Error] - # @return [undefined] - # - # source://unparser//lib/unparser/anima.rb#164 - def assert_known_attributes(klass, attribute_hash); end - - # Infect the instance with anima - # - # @param scope [Class, Module] - # @return [undefined] - # - # source://unparser//lib/unparser/anima.rb#137 - def included(descendant); end - - # Return new instance - # - # @param attributes [Enumerable<Symbol>] - # @return [Anima] - # - # source://unparser//lib/unparser/anima.rb#180 - def new(attributes); end -end - -# An attribute -# -# source://unparser//lib/unparser/anima/attribute.rb#6 -class Unparser::Anima::Attribute - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Initialize attribute - # - # @param name [Symbol] - # @return [Attribute] a new instance of Attribute - # - # source://unparser//lib/unparser/anima/attribute.rb#12 - def initialize(name); end - - # Get attribute value from object - # - # @param object [Object] - # @return [Object] - # - # source://unparser//lib/unparser/anima/attribute.rb#42 - def get(object); end - - # Return instance variable name - # - # @return [Symbol] - # - # source://unparser//lib/unparser/anima/attribute.rb#25 - def instance_variable_name; end - - # Load attribute - # - # @param object [Object] - # @param attributes [Hash] - # @return [self] - # - # source://unparser//lib/unparser/anima/attribute.rb#33 - def load(object, attributes); end - - # Return attribute name - # - # @return [Symbol] - # - # source://unparser//lib/unparser/anima/attribute.rb#20 - def name; end - - # Set attribute value in object - # - # @param object [Object] - # @param value [Object] - # @return [self] - # - # source://unparser//lib/unparser/anima/attribute.rb#52 - def set(object, value); end -end - -# Abstract base class for anima errors -# -# source://unparser//lib/unparser/anima/error.rb#6 -class Unparser::Anima::Error < ::RuntimeError - # Initialize object - # - # @param klass [Class] the class being initialized - # @param missing [Enumerable<Symbol>] - # @param unknown [Enumerable<Symbol>] - # @return [undefined] - # - # source://unparser//lib/unparser/anima/error.rb#18 - def initialize(klass, missing, unknown); end -end - -# source://unparser//lib/unparser/anima/error.rb#7 -Unparser::Anima::Error::FORMAT = T.let(T.unsafe(nil), String) - -# Static instance methods for anima infected classes -# -# source://unparser//lib/unparser/anima.rb#82 -module Unparser::Anima::InstanceMethods - # Initialize an anima infected object - # - # - # @param attributes [#to_h] a hash that matches anima defined attributes - # @return [undefined] - # - # source://unparser//lib/unparser/anima.rb#91 - def initialize(attributes); end - - # Return a hash representation of an anima infected object - # - # @api public - # @example - # anima.to_h # => { :foo => : bar } - # @return [Hash] - # - # source://unparser//lib/unparser/anima.rb#104 - def to_h; end - - # Return updated instance - # - # @api public - # @example - # klass = Class.new do - # include Anima.new(:foo, :bar) - # end - # - # foo = klass.new(:foo => 1, :bar => 2) - # updated = foo.with(:foo => 3) - # updated.foo # => 3 - # updated.bar # => 2 - # @param attributes [Hash] - # @return [Anima] - # - # source://unparser//lib/unparser/anima.rb#125 - def with(attributes); end -end - -# Buffer used to emit into -# -# source://unparser//lib/unparser/buffer.rb#6 -class Unparser::Buffer - # Initialize object - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/buffer.rb#16 - def initialize; end - - # Append string - # - # @api private - # @param string [String] - # @return [self] - # - # source://unparser//lib/unparser/buffer.rb#29 - def append(string); end - - # Append a string without an indentation prefix - # - # @api private - # @param string [String] - # @return [self] - # - # source://unparser//lib/unparser/buffer.rb#45 - def append_without_prefix(string); end - - # Return content of buffer - # - # @api private - # @return [String] - # - # source://unparser//lib/unparser/buffer.rb#104 - def content; end - - # Test for a fresh line - # - # @api private - # @return [Boolean] - # - # source://unparser//lib/unparser/buffer.rb#94 - def fresh_line?; end - - # Increase indent - # - # @api private - # @return [self] - # - # source://unparser//lib/unparser/buffer.rb#55 - def indent; end - - # Write newline - # - # @api private - # @return [self] - # - # source://unparser//lib/unparser/buffer.rb#77 - def nl; end - - # source://unparser//lib/unparser/buffer.rb#81 - def root_indent; end - - # Decrease indent - # - # @api private - # @return [self] - # - # source://unparser//lib/unparser/buffer.rb#66 - def unindent; end - - # Write raw fragment to buffer - # - # Does not do indentation logic. - # - # @param fragment [String] - # @return [self] - # - # source://unparser//lib/unparser/buffer.rb#115 - def write(fragment); end - - private - - # source://unparser//lib/unparser/buffer.rb#124 - def prefix; end -end - -# source://unparser//lib/unparser/buffer.rb#122 -Unparser::Buffer::INDENT_SPACE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/buffer.rb#8 -Unparser::Buffer::NL = T.let(T.unsafe(nil), String) - -# Unparser specific AST builder defaulting to modern AST format -# -# source://unparser//lib/unparser.rb#23 -class Unparser::Builder < ::Parser::Builders::Default - # @return [Builder] a new instance of Builder - # - # source://unparser//lib/unparser.rb#26 - def initialize; end -end - -# Unparser CLI implementation -# -# source://unparser//lib/unparser/cli.rb#5 -class Unparser::CLI - # Initialize object - # - # @api private - # @param arguments [Array<String>] - # @return [undefined] - # - # source://unparser//lib/unparser/cli.rb#74 - def initialize(arguments); end - - # Add options - # - # - # @api private - # @param builder [OptionParser] - # @return [undefined] - # - # source://unparser//lib/unparser/cli.rb#102 - def add_options(builder); end - - # Return exit status - # - # @api private - # @return [Integer] - # - # source://unparser//lib/unparser/cli.rb#132 - def exit_status; end - - private - - # source://unparser//lib/unparser/cli.rb#155 - def effective_targets; end - - # source://unparser//lib/unparser/cli.rb#143 - def process_target(target); end - - # source://unparser//lib/unparser/cli.rb#170 - def targets(file_name); end - - class << self - # Run CLI - # - # @api private - # @param arguments [Array<String>] - # @return [Integer] the exit status - # - # source://unparser//lib/unparser/cli.rb#63 - def run(*arguments); end - end -end - -# source://unparser//lib/unparser/cli.rb#8 -Unparser::CLI::EXIT_FAILURE = T.let(T.unsafe(nil), Integer) - -# source://unparser//lib/unparser/cli.rb#7 -Unparser::CLI::EXIT_SUCCESS = T.let(T.unsafe(nil), Integer) - -# source://unparser//lib/unparser/cli.rb#10 -class Unparser::CLI::Target - include ::Unparser::AbstractType - extend ::Unparser::AbstractType::AbstractMethodDeclarations - - class << self - # source://unparser//lib/unparser/abstract_type.rb#36 - def new(*args, &block); end - end -end - -# Path target -# -# source://unparser//lib/unparser/cli.rb#14 -class Unparser::CLI::Target::Path < ::Unparser::CLI::Target - include ::Unparser::Equalizer::Methods - - # Literal for this target - # - # @return [Validation] - # - # source://unparser//lib/unparser/cli.rb#27 - def literal_validation; end - - # Validation for this target - # - # @return [Validation] - # - # source://unparser//lib/unparser/cli.rb#20 - def validation; end -end - -# String target -# -# source://unparser//lib/unparser/cli.rb#33 -class Unparser::CLI::Target::String - include ::Unparser::Equalizer::Methods - - # Literal for this target - # - # @return [Validation] - # - # source://unparser//lib/unparser/cli.rb#46 - def literal_validation; end - - # Validation for this target - # - # @return [Validation] - # - # source://unparser//lib/unparser/cli.rb#39 - def validation; end -end - -# Class to colorize strings -# -# source://unparser//lib/unparser/color.rb#5 -class Unparser::Color - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Format text with color - # - # @param text [String] - # @return [String] - # - # source://unparser//lib/unparser/color.rb#13 - def format(text); end -end - -# source://unparser//lib/unparser/color.rb#39 -Unparser::Color::GREEN = T.let(T.unsafe(nil), Unparser::Color) - -# source://unparser//lib/unparser/color.rb#17 -Unparser::Color::NONE = T.let(T.unsafe(nil), T.untyped) - -# source://unparser//lib/unparser/color.rb#38 -Unparser::Color::RED = T.let(T.unsafe(nil), Unparser::Color) - -# Holds the comments that remain to be emitted -# -# source://unparser//lib/unparser/comments.rb#6 -class Unparser::Comments - # Initialize object - # - # @api private - # @param comments [Array] - # @return [undefined] - # - # source://unparser//lib/unparser/comments.rb#30 - def initialize(comments); end - - # Consume part or all of the node - # - # @api private - # @param node [Parser::AST::Node] - # @param source_part [Symbol] - # @return [undefined] - # - # source://unparser//lib/unparser/comments.rb#44 - def consume(node, source_part = T.unsafe(nil)); end - - # Proxy to singleton - # - # NOTICE: - # Delegating to stateless helpers is a pattern I saw many times in our code. - # Maybe we should make another helper module? include SingletonDelegator.new(:source_range) ? - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/comments.rb#18 - def source_range(*arguments); end - - # Take all remaining comments - # - # @api private - # @return [Array] - # - # source://unparser//lib/unparser/comments.rb#68 - def take_all; end - - # Take comments appear in the source before the specified part of the node - # - # @api private - # @param node [Parser::AST::Node] - # @param source_part [Symbol] - # @return [Array] - # - # source://unparser//lib/unparser/comments.rb#81 - def take_before(node, source_part); end - - # Take end-of-line comments - # - # @api private - # @return [Array] - # - # source://unparser//lib/unparser/comments.rb#55 - def take_eol_comments; end - - private - - # source://unparser//lib/unparser/comments.rb#119 - def take_up_to_line(line); end - - # source://unparser//lib/unparser/comments.rb#114 - def take_while; end - - # source://unparser//lib/unparser/comments.rb#123 - def unshift_documents(comments); end - - class << self - # Return source location part - # - # FIXME: This method should not be needed. It does to much inline signalling. - # - # :reek:ManualDispatch - # - # @api private - # @param node [Parser::AST::Node] - # @param part [Symbol] - # @return [Parser::Source::Range] if present - # @return [nil] otherwise - # - # source://unparser//lib/unparser/comments.rb#107 - def source_range(node, part); end - end -end - -# A mixin to define a composition -# -# Original code before vendoring and reduction from: https://github.com/mbj/concord. -# -# source://unparser//lib/unparser/concord.rb#7 -class Unparser::Concord < ::Module - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Initialize object - # - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/concord.rb#30 - def initialize(*names); end - - # Return names - # - # @api private - # @return [Enumerable<Symbol>] - # - # source://unparser//lib/unparser/concord.rb#19 - def names; end - - private - - # Define equalizer - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/concord.rb#48 - def define_equalizer; end - - # Define initialize method - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/concord.rb#72 - def define_initialize; end - - # Define readers - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/concord.rb#58 - def define_readers; end - - # Return instance variable names - # - # @api private - # @return [String] - # - # source://unparser//lib/unparser/concord.rb#92 - def instance_variable_names; end -end - -# The maximum number of objects the hosting class is composed of -# -# source://unparser//lib/unparser/concord.rb#11 -Unparser::Concord::MAX_NR_OF_OBJECTS = T.let(T.unsafe(nil), Integer) - -# Mixin for public attribute readers -# -# source://unparser//lib/unparser/concord.rb#97 -class Unparser::Concord::Public < ::Unparser::Concord - # Hook called when module is included - # - # @api private - # @param descendant [Class, Module] - # @return [undefined] - # - # source://unparser//lib/unparser/concord.rb#107 - def included(descendant); end -end - -# All unparser constants maybe included in other libraries. -# -# source://unparser//lib/unparser/constants.rb#5 -module Unparser::Constants; end - -# All binary operators of the ruby language -# -# source://unparser//lib/unparser/constants.rb#13 -Unparser::Constants::BINARY_OPERATORS = T.let(T.unsafe(nil), Set) - -# source://unparser//lib/unparser/constants.rb#63 -Unparser::Constants::KEYWORDS = T.let(T.unsafe(nil), Set) - -# source://unparser//lib/unparser/constants.rb#45 -Unparser::Constants::K_ALIAS = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#44 -Unparser::Constants::K_AND = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#23 -Unparser::Constants::K_BEGIN = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#37 -Unparser::Constants::K_BREAK = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#24 -Unparser::Constants::K_CASE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#25 -Unparser::Constants::K_CLASS = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#21 -Unparser::Constants::K_DEF = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#28 -Unparser::Constants::K_DEFINE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#33 -Unparser::Constants::K_DEFINED = T.let(T.unsafe(nil), String) - -# Keywords -# -# source://unparser//lib/unparser/constants.rb#20 -Unparser::Constants::K_DO = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#59 -Unparser::Constants::K_EEND = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#46 -Unparser::Constants::K_ELSE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#47 -Unparser::Constants::K_ELSIF = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#58 -Unparser::Constants::K_ENCODING = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#22 -Unparser::Constants::K_END = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#27 -Unparser::Constants::K_ENSURE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#41 -Unparser::Constants::K_FALSE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#60 -Unparser::Constants::K_FILE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#48 -Unparser::Constants::K_FOR = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#43 -Unparser::Constants::K_IF = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#51 -Unparser::Constants::K_IN = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#29 -Unparser::Constants::K_MODULE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#40 -Unparser::Constants::K_NEXT = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#49 -Unparser::Constants::K_NIL = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#50 -Unparser::Constants::K_NOT = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#52 -Unparser::Constants::K_OR = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#35 -Unparser::Constants::K_POSTEXE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#34 -Unparser::Constants::K_PREEXE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#39 -Unparser::Constants::K_REDO = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#30 -Unparser::Constants::K_RESCUE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#38 -Unparser::Constants::K_RETRY = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#31 -Unparser::Constants::K_RETURN = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#26 -Unparser::Constants::K_SELF = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#36 -Unparser::Constants::K_SUPER = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#61 -Unparser::Constants::K_THEN = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#42 -Unparser::Constants::K_TRUE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#32 -Unparser::Constants::K_UNDEF = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#53 -Unparser::Constants::K_UNLESS = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#56 -Unparser::Constants::K_UNTIL = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#54 -Unparser::Constants::K_WHEN = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#55 -Unparser::Constants::K_WHILE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/constants.rb#57 -Unparser::Constants::K_YIELD = T.let(T.unsafe(nil), String) - -# All unary operators of the ruby language -# -# source://unparser//lib/unparser/constants.rb#8 -Unparser::Constants::UNARY_OPERATORS = T.let(T.unsafe(nil), Set) - -# DSL to help defining emitters -# -# source://unparser//lib/unparser/dsl.rb#5 -module Unparser::DSL - private - - # source://unparser//lib/unparser/dsl.rb#32 - def children(*names); end - - # source://unparser//lib/unparser/dsl.rb#17 - def define_child(name, index); end - - # source://unparser//lib/unparser/dsl.rb#24 - def define_group(name, range); end - - # source://unparser//lib/unparser/dsl.rb#9 - def define_remaining_children(names); end -end - -# Class to create diffs from source code -# -# source://unparser//lib/unparser/diff.rb#5 -class Unparser::Diff - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Colorized unified source diff between old and new - # - # @return [String] if there is a diff - # @return [nil] otherwise - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def colorized_diff(&block); end - - # Unified source diff between old and new - # - # @return [String] if there is exactly one diff - # @return [nil] otherwise - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def diff(&block); end - - private - - # source://unparser//lib/unparser/diff.rb#62 - def diffs; end - - # source://unparser//lib/unparser/diff.rb#66 - def hunks; end - - # source://unparser//lib/unparser/diff.rb#81 - def max_length; end - - # source://unparser//lib/unparser/diff.rb#72 - def minimized_hunk; end - - class << self - # Build new object from source strings - # - # @param old [String] - # @param new [String] - # @return [Diff] - # - # source://unparser//lib/unparser/diff.rb#46 - def build(old, new); end - - private - - # source://unparser//lib/unparser/diff.rb#85 - def colorize_line(line); end - - # Break up source into lines - # - # @param source [String] - # @return [Array<String>] - # - # source://unparser//lib/unparser/diff.rb#55 - def lines(source); end - end -end - -# source://unparser//lib/unparser/diff.rb#8 -Unparser::Diff::ADDITION = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/diff.rb#9 -Unparser::Diff::DELETION = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/diff.rb#10 -Unparser::Diff::NEWLINE = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser.rb#34 -Unparser::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) - -# source://unparser//lib/unparser.rb#33 -Unparser::EMPTY_STRING = T.let(T.unsafe(nil), String) - -# RequireBLock -# -# source://unparser//lib/unparser/either.rb#21 -class Unparser::Either - include ::Unparser::RequireBlock - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # Test for left constructor - # - # @return [Boolean] - # - # source://unparser//lib/unparser/either.rb#42 - def left?; end - - # Test for right constructor - # - # @return [Boolean] - # - # source://unparser//lib/unparser/either.rb#49 - def right?; end - - class << self - # Execute block and wrap error in left - # - # @param exception [Class<Exception>] - # @return [Either<Exception, Object>] - # - # source://unparser//lib/unparser/either.rb#33 - def wrap_error(*exceptions); end - end -end - -# source://unparser//lib/unparser/either.rb#53 -class Unparser::Either::Left < ::Unparser::Either - # Evaluate applicative block - # - # @return [Either::Left<Object>] - # - # source://unparser//lib/unparser/either.rb#64 - def bind(&block); end - - # Evaluate left side of branch - # - # @param left [#call] - # @param _right [#call] - # - # source://unparser//lib/unparser/either.rb#98 - def either(left, _right); end - - # Evaluate functor block - # - # @return [Either::Left<Object>] - # - # source://unparser//lib/unparser/either.rb#57 - def fmap(&block); end - - # Unwrap value from left - # - # @return [Object] - # - # source://unparser//lib/unparser/either.rb#71 - def from_left; end - - # Unwrap value from right - # - # @return [Object] - # - # source://unparser//lib/unparser/either.rb#79 - def from_right; end - - # Map over left value - # - # @return [Either::Right<Object>] - # - # source://unparser//lib/unparser/either.rb#90 - def lmap; end -end - -# Left -# -# source://unparser//lib/unparser/either.rb#103 -class Unparser::Either::Right < ::Unparser::Either - # Evaluate applicative block - # - # @return [Either<Object>] - # @yield [value] - # - # source://unparser//lib/unparser/either.rb#114 - def bind; end - - # Evaluate right side of branch - # - # @param _left [#call] - # @param right [#call] - # - # source://unparser//lib/unparser/either.rb#148 - def either(_left, right); end - - # Evaluate functor block - # - # @return [Either::Right<Object>] - # - # source://unparser//lib/unparser/either.rb#107 - def fmap; end - - # Unwrap value from left - # - # @return [Object] - # - # source://unparser//lib/unparser/either.rb#122 - def from_left; end - - # Unwrap value from right - # - # @return [Object] - # - # source://unparser//lib/unparser/either.rb#133 - def from_right; end - - # Map over left value - # - # @return [Either::Right<Object>] - # - # source://unparser//lib/unparser/either.rb#140 - def lmap(&block); end -end - -# Emitter base class -# -# source://unparser//lib/unparser/emitter.rb#7 -class Unparser::Emitter - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Constants - include ::Unparser::AbstractType - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - extend ::Unparser::AbstractType::AbstractMethodDeclarations - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - extend ::Unparser::DSL - - # source://unparser//lib/unparser/anima.rb#146 - def buffer; end - - # source://unparser//lib/unparser/anima.rb#146 - def comments; end - - # Dispatch node write as statement - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/abstract_type.rb#114 - def dispatch(*_arg0); end - - # source://unparser//lib/unparser/emitter.rb#59 - def emit_mlhs; end - - # source://unparser//lib/unparser/anima.rb#146 - def local_variable_scope; end - - # source://unparser//lib/unparser/anima.rb#146 - def node; end - - # LocalVariableRoot - # - # source://unparser//lib/unparser/emitter.rb#38 - def node_type; end - - class << self - # source://unparser//lib/unparser/anima.rb#140 - def anima; end - - # Return emitter - # - # - # @api private - # @return [Emitter] - # - # source://unparser//lib/unparser/emitter.rb#70 - def emitter(buffer:, comments:, node:, local_variable_scope:); end - - # source://unparser//lib/unparser/abstract_type.rb#36 - def new(*args, &block); end - - private - - # Register emitter for type - # - # @api private - # @param types [Symbol] - # @return [undefined] - # - # source://unparser//lib/unparser/emitter.rb#50 - def handle(*types); end - end -end - -# Emitter for alias nodes -# -# source://unparser//lib/unparser/emitter/alias.rb#6 -class Unparser::Emitter::Alias < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/alias.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def source; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# Arguments emitter -# -# source://unparser//lib/unparser/emitter/args.rb#6 -class Unparser::Emitter::Args < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/args.rb#7 - def emit_block_arguments; end - - # source://unparser//lib/unparser/emitter/args.rb#15 - def emit_def_arguments; end - - # source://unparser//lib/unparser/emitter/args.rb#19 - def emit_lambda_arguments; end - - private - - # source://unparser//lib/unparser/emitter/args.rb#26 - def emit_shadowargs; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def normal_arguments(&block); end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def shadowargs(&block); end -end - -# Argument emitter -# -# source://unparser//lib/unparser/emitter/argument.rb#84 -class Unparser::Emitter::Argument < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#91 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Array literal emitter -# -# source://unparser//lib/unparser/emitter/array.rb#6 -class Unparser::Emitter::Array < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/array.rb#9 - def emit_heredoc_reminders; end - - private - - # source://unparser//lib/unparser/emitter/array.rb#15 - def dispatch; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def emitters(&block); end -end - -# Emitter for array patterns -# -# source://unparser//lib/unparser/emitter/array_pattern.rb#6 -class Unparser::Emitter::ArrayPattern < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/array_pattern.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/emitter/array_pattern.rb#20 - def emit_member(node); end -end - -# Base class for assignment emitters -# -# source://unparser//lib/unparser/emitter/assignment.rb#7 -class Unparser::Emitter::Assignment < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/assignment.rb#14 - def emit_heredoc_reminders; end - - # source://unparser//lib/unparser/abstract_type.rb#114 - def emit_left(*_arg0); end - - # source://unparser//lib/unparser/emitter/assignment.rb#10 - def symbol_name; end - - private - - # source://unparser//lib/unparser/emitter/assignment.rb#22 - def dispatch; end - - # source://unparser//lib/unparser/emitter/assignment.rb#27 - def emit_right; end -end - -# source://unparser//lib/unparser/emitter/assignment.rb#8 -Unparser::Emitter::Assignment::BINARY_OPERATOR = T.let(T.unsafe(nil), Array) - -# Constant assignment emitter -# -# source://unparser//lib/unparser/emitter/assignment.rb#57 -class Unparser::Emitter::Assignment::Constant < ::Unparser::Emitter::Assignment - private - - # source://unparser//lib/unparser/dsl.rb#18 - def base; end - - # source://unparser//lib/unparser/emitter/assignment.rb#65 - def emit_left; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def right; end -end - -# Variable assignment emitter -# -# source://unparser//lib/unparser/emitter/assignment.rb#42 -class Unparser::Emitter::Assignment::Variable < ::Unparser::Emitter::Assignment - private - - # source://unparser//lib/unparser/emitter/assignment.rb#50 - def emit_left; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def right; end -end - -# Emitter for begin nodes -# -# source://unparser//lib/unparser/emitter/begin.rb#7 -class Unparser::Emitter::Begin < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/begin.rb#11 - def emit_heredoc_reminders; end - - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/begin.rb#19 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Non send binary operator / keyword emitter -# -# source://unparser//lib/unparser/emitter/binary.rb#6 -class Unparser::Emitter::Binary < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/binary.rb#11 - def dispatch; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def writer(&block); end -end - -# Base class for and and or op-assign -# -# source://unparser//lib/unparser/emitter/op_assign.rb#7 -class Unparser::Emitter::BinaryAssign < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/op_assign.rb#17 - def emit_heredoc_reminders; end - - private - - # source://unparser//lib/unparser/emitter/op_assign.rb#24 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def expression; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# source://unparser//lib/unparser/emitter/op_assign.rb#10 -Unparser::Emitter::BinaryAssign::MAP = T.let(T.unsafe(nil), Hash) - -# Block emitter -# -# source://unparser//lib/unparser/emitter/block.rb#7 -class Unparser::Emitter::Block < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def arguments; end - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/block.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/emitter/block.rb#75 - def emit_block_arguments; end - - # source://unparser//lib/unparser/emitter/block.rb#67 - def emit_lambda_arguments; end - - # source://unparser//lib/unparser/emitter/block.rb#61 - def emit_send_target; end - - # source://unparser//lib/unparser/emitter/block.rb#49 - def emit_target; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/block.rb#24 - def need_do?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/block.rb#71 - def numblock?; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def target_writer(&block); end - - # source://unparser//lib/unparser/emitter/block.rb#36 - def write_close; end - - # source://unparser//lib/unparser/emitter/block.rb#28 - def write_open; end -end - -# Block pass node emitter -# -# source://unparser//lib/unparser/emitter/argument.rb#123 -class Unparser::Emitter::BlockPass < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#130 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for toplevel constant reference nodes -# -# source://unparser//lib/unparser/emitter/cbase.rb#6 -class Unparser::Emitter::CBase < ::Unparser::Emitter - private - - # Perform dispatch - # - # @api private - # @return [undefined] - # - # source://unparser//lib/unparser/emitter/cbase.rb#17 - def dispatch; end -end - -# Emitter for case nodes -# -# source://unparser//lib/unparser/emitter/case.rb#6 -class Unparser::Emitter::Case < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def condition; end - - # source://unparser//lib/unparser/emitter/case.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/emitter/case.rb#35 - def emit_condition; end - - # source://unparser//lib/unparser/emitter/case.rb#22 - def emit_else; end - - # source://unparser//lib/unparser/emitter/case.rb#30 - def emit_whens; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def whens(&block); end -end - -# Emitter for case guards -# -# source://unparser//lib/unparser/emitter/case_guard.rb#6 -class Unparser::Emitter::CaseGuard < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def condition; end - - # source://unparser//lib/unparser/emitter/case_guard.rb#19 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/case_guard.rb#10 -Unparser::Emitter::CaseGuard::MAP = T.let(T.unsafe(nil), Hash) - -# Emitter for case matches -# -# source://unparser//lib/unparser/emitter/case_match.rb#6 -class Unparser::Emitter::CaseMatch < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/case_match.rb#20 - def dispatch; end - - # source://unparser//lib/unparser/emitter/case_match.rb#16 - def else_branch; end - - # source://unparser//lib/unparser/emitter/case_match.rb#30 - def emit_else_branch; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def patterns(&block); end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# Emitter for class nodes -# -# source://unparser//lib/unparser/emitter/class.rb#6 -class Unparser::Emitter::Class < ::Unparser::Emitter - include ::Unparser::Emitter::LocalVariableRoot - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def local_variable_scope(&block); end - - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/class.rb#15 - def dispatch; end - - # source://unparser//lib/unparser/emitter/class.rb#23 - def emit_superclass; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def superclass; end -end - -# Emitter for constant access -# -# source://unparser//lib/unparser/emitter/variable.rb#21 -class Unparser::Emitter::Const < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/variable.rb#28 - def dispatch; end - - # source://unparser//lib/unparser/emitter/variable.rb#33 - def emit_scope; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def scope; end -end - -# Emitter for const pattern node -# -# source://unparser//lib/unparser/emitter/const_pattern.rb#6 -class Unparser::Emitter::ConstPattern < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def const; end - - # source://unparser//lib/unparser/emitter/const_pattern.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def pattern; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Dynamic string emitter -# -# source://unparser//lib/unparser/emitter/dstr.rb#6 -class Unparser::Emitter::DStr < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/dstr.rb#10 - def emit_heredoc_reminders; end - - private - - # source://unparser//lib/unparser/emitter/dstr.rb#16 - def dispatch; end -end - -# Dynamic symbol literal emitter -# -# source://unparser//lib/unparser/emitter/dsym.rb#6 -class Unparser::Emitter::DSym < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/dsym.rb#11 - def dispatch; end - - # source://unparser//lib/unparser/emitter/dsym.rb#34 - def emit_begin_child(component); end - - # source://unparser//lib/unparser/emitter/dsym.rb#24 - def emit_str_child(value); end -end - -# Emitter for def node -# -# source://unparser//lib/unparser/emitter/def.rb#6 -class Unparser::Emitter::Def < ::Unparser::Emitter - include ::Unparser::Emitter::LocalVariableRoot - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def local_variable_scope(&block); end - - private - - # source://unparser//lib/unparser/abstract_type.rb#114 - def body(*_arg0); end - - # source://unparser//lib/unparser/emitter/def.rb#17 - def dispatch; end - - # source://unparser//lib/unparser/emitter/def.rb#25 - def emit_arguments; end - - # source://unparser//lib/unparser/abstract_type.rb#114 - def emit_name(*_arg0); end -end - -# Instance def emitter -# -# source://unparser//lib/unparser/emitter/def.rb#34 -class Unparser::Emitter::Def::Instance < ::Unparser::Emitter::Def - private - - # source://unparser//lib/unparser/dsl.rb#18 - def arguments; end - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/def.rb#41 - def emit_name; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for defines on singleton -# -# source://unparser//lib/unparser/emitter/def.rb#48 -class Unparser::Emitter::Def::Singleton < ::Unparser::Emitter::Def - private - - # source://unparser//lib/unparser/dsl.rb#18 - def arguments; end - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/def.rb#56 - def emit_name; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def subject; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/def.rb#63 - def subject_without_parens?; end -end - -# Emitter for defined? nodes -# -# source://unparser//lib/unparser/emitter/defined.rb#6 -class Unparser::Emitter::Defined < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/defined.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def subject; end -end - -# Emitter for in pattern nodes -# -# source://unparser//lib/unparser/emitter/find_pattern.rb#6 -class Unparser::Emitter::FindPattern < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/find_pattern.rb#11 - def dispatch; end -end - -# Emitter for flip flops -# -# source://unparser//lib/unparser/emitter/flipflop.rb#6 -class Unparser::Emitter::FlipFlop < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/flipflop.rb#17 - def symbol_name; end - - private - - # source://unparser//lib/unparser/emitter/flipflop.rb#27 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def left; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def right; end -end - -# source://unparser//lib/unparser/emitter/flipflop.rb#7 -Unparser::Emitter::FlipFlop::MAP = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/emitter/flipflop.rb#12 -Unparser::Emitter::FlipFlop::SYMBOLS = T.let(T.unsafe(nil), Hash) - -# Emiter for float literals -# -# source://unparser//lib/unparser/emitter/float.rb#6 -class Unparser::Emitter::Float < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/float.rb#16 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def value; end -end - -# source://unparser//lib/unparser/emitter/float.rb#11 -Unparser::Emitter::Float::INFINITY = T.let(T.unsafe(nil), Float) - -# source://unparser//lib/unparser/emitter/float.rb#12 -Unparser::Emitter::Float::NEG_INFINITY = T.let(T.unsafe(nil), Float) - -# Emitter control flow modifiers -# -# source://unparser//lib/unparser/emitter/flow_modifier.rb#6 -class Unparser::Emitter::FlowModifier < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/flow_modifier.rb#17 - def emit_heredoc_reminders; end - - private - - # source://unparser//lib/unparser/emitter/flow_modifier.rb#25 - def dispatch; end - - # source://unparser//lib/unparser/emitter/flow_modifier.rb#36 - def emit_arguments; end -end - -# source://unparser//lib/unparser/emitter/flow_modifier.rb#7 -Unparser::Emitter::FlowModifier::MAP = T.let(T.unsafe(nil), Hash) - -# Emitter for for nodes -# -# source://unparser//lib/unparser/emitter/for.rb#6 -class Unparser::Emitter::For < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def assignment; end - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/dsl.rb#18 - def condition; end - - # source://unparser//lib/unparser/emitter/for.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/emitter/for.rb#20 - def emit_condition; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for forwarding arguments -# -# source://unparser//lib/unparser/emitter/argument.rb#6 -class Unparser::Emitter::ForwardArg < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#20 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/argument.rb#7 -Unparser::Emitter::ForwardArg::MAP = T.let(T.unsafe(nil), Hash) - -# Emitter for Hash literals -# -# source://unparser//lib/unparser/emitter/hash.rb#6 -class Unparser::Emitter::Hash < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/hash.rb#9 - def emit_heredoc_reminders; end - - private - - # source://unparser//lib/unparser/emitter/hash.rb#15 - def dispatch; end - - # source://unparser//lib/unparser/emitter/hash.rb#31 - def emit_hash_body; end - - # source://unparser//lib/unparser/emitter/hash.rb#27 - def emit_heredoc_reminder_member(node); end -end - -# Emitter for hash patterns -# -# source://unparser//lib/unparser/emitter/hash_pattern.rb#6 -class Unparser::Emitter::HashPattern < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/hash_pattern.rb#10 - def emit_const_pattern; end - - private - - # source://unparser//lib/unparser/emitter/hash_pattern.rb#18 - def dispatch; end - - # source://unparser//lib/unparser/emitter/hash_pattern.rb#24 - def emit_hash_body; end - - # source://unparser//lib/unparser/emitter/hash_pattern.rb#41 - def emit_match_var(node); end - - # source://unparser//lib/unparser/emitter/hash_pattern.rb#28 - def emit_member(node); end - - # source://unparser//lib/unparser/emitter/hash_pattern.rb#46 - def emit_pair(node); end - - # source://unparser//lib/unparser/emitter/hash_pattern.rb#62 - def write_symbol_body(symbol); end -end - -# Base class for pre and postexe emitters -# -# source://unparser//lib/unparser/emitter/hookexe.rb#6 -class Unparser::Emitter::Hookexe < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/hookexe.rb#19 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/hookexe.rb#8 -Unparser::Emitter::Hookexe::MAP = T.let(T.unsafe(nil), Hash) - -# Emitter if nodes -# -# source://unparser//lib/unparser/emitter/if.rb#6 -class Unparser::Emitter::If < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/if.rb#11 - def emit_ternary; end - - private - - # source://unparser//lib/unparser/dsl.rb#18 - def condition; end - - # source://unparser//lib/unparser/emitter/if.rb#21 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def else_branch; end - - # source://unparser//lib/unparser/emitter/if.rb#59 - def emit_condition; end - - # source://unparser//lib/unparser/emitter/if.rb#71 - def emit_else_branch; end - - # source://unparser//lib/unparser/emitter/if.rb#63 - def emit_if_branch; end - - # source://unparser//lib/unparser/emitter/if.rb#43 - def emit_normal; end - - # source://unparser//lib/unparser/emitter/if.rb#37 - def emit_postcondition; end - - # source://unparser//lib/unparser/dsl.rb#18 - def if_branch; end - - # source://unparser//lib/unparser/emitter/if.rb#55 - def keyword; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/if.rb#29 - def postcondition?; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/if.rb#51 - def unless?; end -end - -# Emitter for in pattern nodes -# -# source://unparser//lib/unparser/emitter/in_match.rb#6 -class Unparser::Emitter::InMatch < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/in_match.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def pattern; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# Emitter for in pattern nodes -# -# source://unparser//lib/unparser/emitter/in_pattern.rb#6 -class Unparser::Emitter::InPattern < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def branch; end - - # source://unparser//lib/unparser/emitter/in_pattern.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def else_branch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end - - # source://unparser//lib/unparser/dsl.rb#18 - def unless_guard; end -end - -# Emitter for send to index references -# -# source://unparser//lib/unparser/emitter/index.rb#6 -class Unparser::Emitter::Index < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/index.rb#10 - def dispatch; end - - # source://unparser//lib/unparser/emitter/index.rb#15 - def emit_receiver; end -end - -# Emitter for assign to index nodes -# -# source://unparser//lib/unparser/emitter/index.rb#34 -class Unparser::Emitter::Index::Assign < ::Unparser::Emitter::Index - # source://unparser//lib/unparser/emitter/index.rb#47 - def dispatch; end - - # source://unparser//lib/unparser/emitter/index.rb#43 - def emit_heredoc_reminders; end - - # source://unparser//lib/unparser/emitter/index.rb#54 - def emit_mlhs; end - - private - - # source://unparser//lib/unparser/emitter/index.rb#61 - def emit_operation(indices); end -end - -# source://unparser//lib/unparser/emitter/index.rb#39 -Unparser::Emitter::Index::Assign::NO_VALUE_PARENT = T.let(T.unsafe(nil), Set) - -# source://unparser//lib/unparser/emitter/index.rb#38 -Unparser::Emitter::Index::Assign::VALUE_RANGE = T.let(T.unsafe(nil), Range) - -# source://unparser//lib/unparser/emitter/index.rb#19 -class Unparser::Emitter::Index::Reference < ::Unparser::Emitter::Index - private - - # source://unparser//lib/unparser/emitter/index.rb#26 - def emit_operation; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def indices(&block); end -end - -# Emitter for explicit begins -# -# source://unparser//lib/unparser/emitter/kwbegin.rb#6 -class Unparser::Emitter::KWBegin < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/kwbegin.rb#11 - def dispatch; end - - # source://unparser//lib/unparser/emitter/kwbegin.rb#25 - def emit_multiple_body; end -end - -# Optional keyword argument emitter -# -# source://unparser//lib/unparser/emitter/argument.rb#41 -class Unparser::Emitter::KeywordOptional < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#48 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def value; end -end - -# Emitter for splats -# -# source://unparser//lib/unparser/emitter/splat.rb#6 -class Unparser::Emitter::KwSplat < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/splat.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def subject; end -end - -# Keyword argument emitter -# -# source://unparser//lib/unparser/emitter/argument.rb#56 -class Unparser::Emitter::Kwarg < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#63 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/kwargs.rb#5 -class Unparser::Emitter::Kwargs < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/kwargs.rb#8 - def dispatch; end -end - -# Emitter for lambda nodes -# -# source://unparser//lib/unparser/emitter/lambda.rb#6 -class Unparser::Emitter::Lambda < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/lambda.rb#11 - def dispatch; end -end - -# source://unparser//lib/unparser/emitter.rb#20 -module Unparser::Emitter::LocalVariableRoot - # Return local variable root - # - # @api private - # @return [Parser::AST::Node] - # - # source://unparser//lib/unparser/emitter.rb#27 - def local_variable_scope; end - - class << self - # @private - # - # source://unparser//lib/unparser/emitter.rb#31 - def included(descendant); end - end -end - -# Emitter for multiple assignment nodes -# -# source://unparser//lib/unparser/emitter/masgn.rb#6 -class Unparser::Emitter::MASGN < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/masgn.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def source; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# Emitter for multiple assignment left hand side -# -# source://unparser//lib/unparser/emitter/mlhs.rb#6 -class Unparser::Emitter::MLHS < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/mlhs.rb#15 - def dispatch; end - - # source://unparser//lib/unparser/emitter/mlhs.rb#31 - def emit_many; end - - # source://unparser//lib/unparser/emitter/mlhs.rb#23 - def emit_one_child_mlhs; end -end - -# source://unparser//lib/unparser/emitter/mlhs.rb#9 -Unparser::Emitter::MLHS::NO_COMMA = T.let(T.unsafe(nil), Array) - -# Base class for special match node emitters -# -# source://unparser//lib/unparser/emitter/match.rb#7 -class Unparser::Emitter::Match < ::Unparser::Emitter; end - -# Emitter for match current line -# -# source://unparser//lib/unparser/emitter/match.rb#25 -class Unparser::Emitter::Match::CurrentLine < ::Unparser::Emitter::Match - private - - # source://unparser//lib/unparser/emitter/match.rb#32 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def regexp; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for match with local variable assignment -# -# source://unparser//lib/unparser/emitter/match.rb#9 -class Unparser::Emitter::Match::Lvasgn < ::Unparser::Emitter::Match - private - - # source://unparser//lib/unparser/emitter/match.rb#16 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def lvasgn; end - - # source://unparser//lib/unparser/dsl.rb#18 - def regexp; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for in pattern nodes -# -# source://unparser//lib/unparser/emitter/match_alt.rb#6 -class Unparser::Emitter::MatchAlt < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/match_alt.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def left; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def right; end -end - -# Emitter for in pattern nodes -# -# source://unparser//lib/unparser/emitter/match_as.rb#6 -class Unparser::Emitter::MatchAs < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/match_as.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def left; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def right; end -end - -# Emitter for in pattern nodes -# -# source://unparser//lib/unparser/emitter/match_pattern.rb#6 -class Unparser::Emitter::MatchPattern < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/match_pattern.rb#23 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def pattern; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# Modern ast format emits `match_pattern` -# node on single line pre 3.0, but 3.0+ uses `match_pattern_p` -# -# source://unparser//lib/unparser/emitter/match_pattern.rb#14 -Unparser::Emitter::MatchPattern::SYMBOL = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/emitter/match_pattern_p.rb#5 -class Unparser::Emitter::MatchPatternP < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/match_pattern_p.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def pattern; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# Emiter for match rest nodes -# -# source://unparser//lib/unparser/emitter/match_rest.rb#6 -class Unparser::Emitter::MatchRest < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/match_rest.rb#11 - def dispatch; end - - # source://unparser//lib/unparser/emitter/match_rest.rb#16 - def emit_array_pattern; end - - # source://unparser//lib/unparser/emitter/match_rest.rb#21 - def emit_hash_pattern; end - - private - - # source://unparser//lib/unparser/emitter/match_rest.rb#28 - def emit_match_var; end - - # source://unparser//lib/unparser/dsl.rb#18 - def match_var; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for in pattern nodes -# -# source://unparser//lib/unparser/emitter/match_var.rb#6 -class Unparser::Emitter::MatchVar < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/match_var.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for module nodes -# -# source://unparser//lib/unparser/emitter/module.rb#6 -class Unparser::Emitter::Module < ::Unparser::Emitter - include ::Unparser::Emitter::LocalVariableRoot - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def local_variable_scope(&block); end - - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/module.rb#15 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter.rb#18 -Unparser::Emitter::NO_INDENT = T.let(T.unsafe(nil), Array) - -# Emitter for nth_ref nodes (regexp captures) -# -# source://unparser//lib/unparser/emitter/variable.rb#42 -class Unparser::Emitter::NthRef < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/variable.rb#50 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/variable.rb#43 -Unparser::Emitter::NthRef::PREFIX = T.let(T.unsafe(nil), String) - -# Emitter for op assign -# -# source://unparser//lib/unparser/emitter/op_assign.rb#33 -class Unparser::Emitter::OpAssign < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/op_assign.rb#40 - def dispatch; end - - # source://unparser//lib/unparser/emitter/op_assign.rb#46 - def emit_operator; end - - # source://unparser//lib/unparser/dsl.rb#18 - def operator; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end - - # source://unparser//lib/unparser/dsl.rb#18 - def value; end -end - -# Optional argument emitter -# -# source://unparser//lib/unparser/emitter/argument.rb#27 -class Unparser::Emitter::Optarg < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#34 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def value; end -end - -# Emitter for key value pairs in hash literals or kwargs -# -# source://unparser//lib/unparser/emitter/pair.rb#6 -class Unparser::Emitter::Pair < ::Unparser::Emitter - private - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/pair.rb#28 - def colon?(key); end - - # source://unparser//lib/unparser/emitter/pair.rb#17 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def key; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def value; end -end - -# source://unparser//lib/unparser/emitter/pair.rb#7 -Unparser::Emitter::Pair::BAREWORD = T.let(T.unsafe(nil), Regexp) - -# Emitter for pin nodes -# -# source://unparser//lib/unparser/emitter/pin.rb#6 -class Unparser::Emitter::Pin < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/pin.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def target; end -end - -# Emitter for postconditions -# -# source://unparser//lib/unparser/emitter/repetition.rb#7 -class Unparser::Emitter::Post < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/dsl.rb#18 - def condition; end - - # source://unparser//lib/unparser/emitter/repetition.rb#19 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/repetition.rb#10 -Unparser::Emitter::Post::MAP = T.let(T.unsafe(nil), Hash) - -# Base class for primitive emitters -# -# source://unparser//lib/unparser/emitter/primitive.rb#6 -class Unparser::Emitter::Primitive < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def value; end -end - -# Emitter for complex literals -# -# source://unparser//lib/unparser/emitter/primitive.rb#24 -class Unparser::Emitter::Primitive::Complex < ::Unparser::Emitter::Primitive - private - - # source://unparser//lib/unparser/emitter/primitive.rb#39 - def dispatch; end - - # source://unparser//lib/unparser/emitter/primitive.rb#44 - def emit_imaginary; end - - # source://unparser//lib/unparser/emitter/primitive.rb#48 - def imaginary_node; end -end - -# source://unparser//lib/unparser/emitter/primitive.rb#30 -Unparser::Emitter::Primitive::Complex::MAP = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/emitter/primitive.rb#28 -Unparser::Emitter::Primitive::Complex::RATIONAL_FORMAT = T.let(T.unsafe(nil), String) - -# Emitter for primitives based on Object#inspect -# -# source://unparser//lib/unparser/emitter/primitive.rb#11 -class Unparser::Emitter::Primitive::Inspect < ::Unparser::Emitter::Primitive - private - - # source://unparser//lib/unparser/emitter/primitive.rb#17 - def dispatch; end -end - -# Emiter for numeric literals -# -# source://unparser//lib/unparser/emitter/primitive.rb#80 -class Unparser::Emitter::Primitive::Numeric < ::Unparser::Emitter::Primitive - private - - # source://unparser//lib/unparser/emitter/primitive.rb#86 - def dispatch; end -end - -# Emitter for rational literals -# -# source://unparser//lib/unparser/emitter/primitive.rb#56 -class Unparser::Emitter::Primitive::Rational < ::Unparser::Emitter::Primitive - private - - # source://unparser//lib/unparser/emitter/primitive.rb#65 - def dispatch; end - - # source://unparser//lib/unparser/emitter/primitive.rb#73 - def write_rational(value); end -end - -# source://unparser//lib/unparser/emitter/primitive.rb#60 -Unparser::Emitter::Primitive::Rational::RATIONAL_FORMAT = T.let(T.unsafe(nil), String) - -# Progarg emitter -# -# source://unparser//lib/unparser/emitter/argument.rb#98 -class Unparser::Emitter::Procarg < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#105 - def dispatch; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/argument.rb#115 - def needs_parens?; end -end - -# source://unparser//lib/unparser/emitter/argument.rb#101 -Unparser::Emitter::Procarg::PARENS = T.let(T.unsafe(nil), Array) - -# Registry for node emitters -# -# source://unparser//lib/unparser/emitter.rb#16 -Unparser::Emitter::REGISTRY = T.let(T.unsafe(nil), Hash) - -# Range emitters -# -# source://unparser//lib/unparser/emitter/range.rb#6 -class Unparser::Emitter::Range < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/range.rb#17 - def symbol_name; end - - private - - # source://unparser//lib/unparser/dsl.rb#18 - def begin_node; end - - # source://unparser//lib/unparser/emitter/range.rb#27 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def end_node; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/range.rb#12 -Unparser::Emitter::Range::SYMBOLS = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/emitter/range.rb#7 -Unparser::Emitter::Range::TOKENS = T.let(T.unsafe(nil), Hash) - -# Emitter for regexp literals -# -# source://unparser//lib/unparser/emitter/regexp.rb#6 -class Unparser::Emitter::Regexp < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def body(&block); end - - # source://unparser//lib/unparser/emitter/regexp.rb#13 - def dispatch; end - - # source://unparser//lib/unparser/emitter/regexp.rb#24 - def emit_body(node); end - - # source://unparser//lib/unparser/emitter/regexp.rb#20 - def emit_options; end -end - -# Emitter for while and until nodes -# -# source://unparser//lib/unparser/emitter/repetition.rb#27 -class Unparser::Emitter::Repetition < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/dsl.rb#18 - def condition; end - - # source://unparser//lib/unparser/emitter/repetition.rb#39 - def dispatch; end - - # source://unparser//lib/unparser/emitter/repetition.rb#51 - def emit_keyword; end - - # source://unparser//lib/unparser/emitter/repetition.rb#55 - def emit_normal; end - - # source://unparser//lib/unparser/emitter/repetition.rb#66 - def emit_postcontrol; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/repetition.rb#47 - def postcontrol?; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/emitter/repetition.rb#28 -Unparser::Emitter::Repetition::MAP = T.let(T.unsafe(nil), Hash) - -# Emitter for rescue nodes -# -# source://unparser//lib/unparser/emitter/rescue.rb#6 -class Unparser::Emitter::Rescue < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/rescue.rb#11 - def dispatch; end -end - -# Rest argument emitter -# -# source://unparser//lib/unparser/emitter/argument.rb#70 -class Unparser::Emitter::Restarg < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/argument.rb#77 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Root emitter a special case -# -# source://unparser//lib/unparser/emitter/root.rb#6 -class Unparser::Emitter::Root < ::Unparser::Emitter - include ::Unparser::Emitter::LocalVariableRoot - - # source://unparser//lib/unparser/concord.rb#60 - def buffer; end - - # source://unparser//lib/unparser/concord.rb#60 - def comments; end - - # source://unparser//lib/unparser/emitter/root.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def local_variable_scope(&block); end - - # source://unparser//lib/unparser/concord.rb#60 - def node; end -end - -# source://unparser//lib/unparser/emitter/root.rb#10 -Unparser::Emitter::Root::END_NL = T.let(T.unsafe(nil), Array) - -# Emitter for sclass nodes -# -# source://unparser//lib/unparser/emitter/class.rb#33 -class Unparser::Emitter::SClass < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/emitter/class.rb#40 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def object; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for send -# -# source://unparser//lib/unparser/emitter/send.rb#6 -class Unparser::Emitter::Send < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/send.rb#13 - def emit_heredoc_reminders; end - - # source://unparser//lib/unparser/emitter/send.rb#9 - def emit_mlhs; end - - private - - # source://unparser//lib/unparser/emitter/send.rb#19 - def dispatch; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def writer(&block); end -end - -# Emitter for simple nodes that generate a single token -# -# source://unparser//lib/unparser/emitter/simple.rb#6 -class Unparser::Emitter::Simple < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/simple.rb#28 - def dispatch; end -end - -# source://unparser//lib/unparser/emitter/simple.rb#7 -Unparser::Emitter::Simple::MAP = T.let(T.unsafe(nil), Hash) - -# Emitter for splats -# -# source://unparser//lib/unparser/emitter/splat.rb#20 -class Unparser::Emitter::Splat < ::Unparser::Emitter - # source://unparser//lib/unparser/emitter/splat.rb#25 - def emit_mlhs; end - - private - - # source://unparser//lib/unparser/emitter/splat.rb#32 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def subject; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def subject_emitter(&block); end -end - -# Emitter for super nodes -# -# source://unparser//lib/unparser/emitter/super.rb#7 -class Unparser::Emitter::Super < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/super.rb#12 - def dispatch; end -end - -# Emitter for undef nodes -# -# source://unparser//lib/unparser/emitter/undef.rb#6 -class Unparser::Emitter::Undef < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/undef.rb#11 - def dispatch; end -end - -# Emitter for various variable accesses -# -# source://unparser//lib/unparser/emitter/variable.rb#7 -class Unparser::Emitter::Variable < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/variable.rb#14 - def dispatch; end - - # source://unparser//lib/unparser/dsl.rb#18 - def name; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# Emitter for when nodes -# -# source://unparser//lib/unparser/emitter/case.rb#44 -class Unparser::Emitter::When < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def captures(&block); end - - # source://unparser//lib/unparser/emitter/case.rb#51 - def dispatch; end - - # source://unparser//lib/unparser/emitter/case.rb#57 - def emit_captures; end -end - -# Dynamic execute string literal emitter -# -# source://unparser//lib/unparser/emitter/xstr.rb#6 -class Unparser::Emitter::XStr < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/xstr.rb#12 - def dispatch; end - - # source://unparser//lib/unparser/emitter/xstr.rb#65 - def emit_begin(component); end - - # source://unparser//lib/unparser/emitter/xstr.rb#24 - def emit_heredoc; end - - # source://unparser//lib/unparser/emitter/xstr.rb#51 - def emit_string(value); end - - # source://unparser//lib/unparser/emitter/xstr.rb#39 - def emit_xstr; end - - # source://unparser//lib/unparser/emitter/xstr.rb#55 - def escape_xstr(input); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/emitter/xstr.rb#20 - def heredoc?; end -end - -# Emitter for yield node -# -# source://unparser//lib/unparser/emitter/yield.rb#7 -class Unparser::Emitter::Yield < ::Unparser::Emitter - private - - # source://unparser//lib/unparser/emitter/yield.rb#12 - def dispatch; end -end - -# Define equality, equivalence and inspection methods -# -# Original code before vendoring and reduction from: https://github.com/dkubb/equalizer. -# -# source://unparser//lib/unparser/equalizer.rb#7 -class Unparser::Equalizer < ::Module - # Initialize an Equalizer with the given keys - # - # Will use the keys with which it is initialized to define #cmp?, - # #hash, and #inspect - # - # - # @api private - # @param keys [Array<Symbol>] - # @return [undefined] - # - # source://unparser//lib/unparser/equalizer.rb#20 - def initialize(*keys); end - - private - - # source://unparser//lib/unparser/equalizer.rb#39 - def define_cmp_method; end - - # source://unparser//lib/unparser/equalizer.rb#49 - def define_hash_method; end - - # source://unparser//lib/unparser/equalizer.rb#56 - def define_inspect_method; end - - # source://unparser//lib/unparser/equalizer.rb#33 - def define_methods; end - - # source://unparser//lib/unparser/equalizer.rb#29 - def included(descendant); end -end - -# The comparison methods -# -# source://unparser//lib/unparser/equalizer.rb#66 -module Unparser::Equalizer::Methods - # Compare the object with other object for equivalency - # - # @api public - # @example - # object == other # => true or false - # @param other [Object] the other object to compare with - # @return [Boolean] - # - # source://unparser//lib/unparser/equalizer.rb#93 - def ==(other); end - - # Compare the object with other object for equality - # - # @api public - # @example - # object.eql?(other) # => true or false - # @param other [Object] the other object to compare with - # @return [Boolean] - # - # source://unparser//lib/unparser/equalizer.rb#78 - def eql?(other); end -end - -# source://unparser//lib/unparser/generation.rb#5 -module Unparser::Generation - # source://unparser//lib/unparser/generation.rb#10 - def emit_heredoc_reminders; end - - # source://unparser//lib/unparser/generation.rb#12 - def symbol_name; end - - # source://unparser//lib/unparser/generation.rb#14 - def write_to_buffer; end - - private - - # source://unparser//lib/unparser/generation.rb#247 - def children; end - - # source://unparser//lib/unparser/generation.rb#239 - def conditional_parentheses(flag, &block); end - - # source://unparser//lib/unparser/generation.rb#21 - def delimited(nodes, delimiter = T.unsafe(nil), &block); end - - # source://unparser//lib/unparser/generation.rb#123 - def emit_body(node, indent: T.unsafe(nil)); end - - # source://unparser//lib/unparser/generation.rb#196 - def emit_body_ensure_rescue(node); end - - # source://unparser//lib/unparser/generation.rb#145 - def emit_body_inner(node); end - - # source://unparser//lib/unparser/generation.rb#158 - def emit_body_member(node); end - - # source://unparser//lib/unparser/generation.rb#180 - def emit_body_rescue(node); end - - # source://unparser//lib/unparser/generation.rb#77 - def emit_comments(comments); end - - # source://unparser//lib/unparser/generation.rb#69 - def emit_comments_before(source_part = T.unsafe(nil)); end - - # source://unparser//lib/unparser/generation.rb#166 - def emit_ensure(node); end - - # source://unparser//lib/unparser/generation.rb#60 - def emit_eof_comments; end - - # source://unparser//lib/unparser/generation.rb#54 - def emit_eol_comments; end - - # source://unparser//lib/unparser/generation.rb#27 - def emit_join(nodes, emit_node, emit_delimiter); end - - # source://unparser//lib/unparser/generation.rb#115 - def emit_optional_body(node, indent: T.unsafe(nil)); end - - # source://unparser//lib/unparser/generation.rb#188 - def emit_optional_body_ensure_rescue(node); end - - # source://unparser//lib/unparser/generation.rb#206 - def emit_rescue_postcontrol(node); end - - # source://unparser//lib/unparser/generation.rb#212 - def emit_rescue_regular(node); end - - # source://unparser//lib/unparser/generation.rb#220 - def emitter(node); end - - # source://unparser//lib/unparser/generation.rb#235 - def first_child; end - - # source://unparser//lib/unparser/generation.rb#106 - def indented; end - - # source://unparser//lib/unparser/generation.rb#93 - def k_end; end - - # source://unparser//lib/unparser/generation.rb#39 - def nl; end - - # source://unparser//lib/unparser/generation.rb#100 - def parentheses(open = T.unsafe(nil), close = T.unsafe(nil)); end - - # source://unparser//lib/unparser/generation.rb#224 - def visit(node); end - - # source://unparser//lib/unparser/generation.rb#228 - def visit_deep(node); end - - # source://unparser//lib/unparser/generation.rb#44 - def with_comments; end - - # source://unparser//lib/unparser/generation.rb#89 - def write(*strings); end - - # source://unparser//lib/unparser/generation.rb#216 - def writer_with(klass, node); end - - # source://unparser//lib/unparser/generation.rb#50 - def ws; end -end - -# source://unparser//lib/unparser/generation.rb#6 -Unparser::Generation::EXTRA_NL = T.let(T.unsafe(nil), Array) - -# Error raised when unparser encounters an invalid AST -# -# source://unparser//lib/unparser.rb#39 -class Unparser::InvalidNodeError < ::RuntimeError - # @return [InvalidNodeError] a new instance of InvalidNodeError - # - # source://unparser//lib/unparser.rb#42 - def initialize(message, node); end - - # Returns the value of attribute node. - # - # source://unparser//lib/unparser.rb#40 - def node; end -end - -# source://unparser//lib/unparser/node_details.rb#4 -module Unparser::NodeDetails - include ::Unparser::NodeHelpers - include ::Unparser::Constants - - private - - # source://unparser//lib/unparser/node_details.rb#17 - def children; end - - class << self - # @private - # - # source://unparser//lib/unparser/node_details.rb#7 - def included(descendant); end - end -end - -# source://unparser//lib/unparser/node_details/send.rb#5 -class Unparser::NodeDetails::Send - include ::Unparser::NodeHelpers - include ::Unparser::Constants - include ::Unparser::NodeDetails - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - extend ::Unparser::DSL - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def arguments(&block); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/node_details/send.rb#36 - def arguments?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def assignment?(&block); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/node_details/send.rb#32 - def assignment_operator?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/node_details/send.rb#21 - def binary_syntax_allowed?; end - - # source://unparser//lib/unparser/node_details/send.rb#40 - def non_assignment_selector; end - - # source://unparser//lib/unparser/dsl.rb#18 - def receiver; end - - # source://unparser//lib/unparser/dsl.rb#18 - def selector; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/node_details/send.rb#17 - def selector_binary_operator?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/node_details/send.rb#28 - def selector_unary_operator?; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def string_selector(&block); end - - private - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end -end - -# source://unparser//lib/unparser/node_details/send.rb#8 -Unparser::NodeDetails::Send::ASSIGN_SUFFIX = T.let(T.unsafe(nil), String) - -# source://unparser//lib/unparser/node_details/send.rb#9 -Unparser::NodeDetails::Send::NON_ASSIGN_RANGE = T.let(T.unsafe(nil), Range) - -# source://unparser//lib/unparser/node_helpers.rb#4 -module Unparser::NodeHelpers - # Helper for building nodes - # - # @api private - # @param type [Symbol] - # @param children [Array] - # @return [Parser::AST::Node] - # - # source://unparser//lib/unparser/node_helpers.rb#26 - def n(type, children = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/node_helpers.rb#30 - def n?(type, node); end - - # Helper for building nodes - # - # @api private - # @param type [Symbol] - # @param children [Parser::AST::Node] - # @return [Parser::AST::Node] - # - # source://unparser//lib/unparser/node_helpers.rb#14 - def s(type, *children); end - - # source://unparser//lib/unparser/node_helpers.rb#71 - def unwrap_single_begin(node); end - - private - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_arg?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_args?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_array?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_array_pattern?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_begin?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_block?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_cbase?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_const?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_dstr?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_empty_else?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_ensure?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_hash?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_hash_pattern?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_if?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_in_pattern?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_int?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_kwarg?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_kwargs?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_kwsplat?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_lambda?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_match_rest?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_pair?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_rescue?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_send?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_shadowarg?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_splat?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_str?(node); end - - # source://unparser//lib/unparser/node_helpers.rb#65 - def n_sym?(node); end -end - -# source://unparser//lib/unparser/either.rb#4 -module Unparser::RequireBlock - private - - # Raise error unless block is provided - # - # @raise [MissingBlockError] if no block is given - # @return [self] - # - # source://unparser//lib/unparser/either.rb#14 - def require_block; end -end - -# source://unparser//lib/unparser/emitter.rb#4 -class Unparser::UnknownNodeError < ::ArgumentError; end - -# Validation of unparser results -# -# source://unparser//lib/unparser/validation.rb#5 -class Unparser::Validation - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - - # source://unparser//lib/unparser/anima.rb#146 - def generated_node; end - - # source://unparser//lib/unparser/anima.rb#146 - def generated_source; end - - # source://unparser//lib/unparser/anima.rb#146 - def identification; end - - # source://unparser//lib/unparser/anima.rb#146 - def original_node; end - - # source://unparser//lib/unparser/anima.rb#146 - def original_source; end - - # Return error report - # - # @api private - # @return [String] - # - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def report(&block); end - - # Test if source could be unparsed successfully - # - # @api private - # @return [Boolean] - # - # source://unparser//lib/unparser/validation.rb#20 - def success?; end - - private - - # source://unparser//lib/unparser/validation.rb#106 - def make_report(label, attribute_name); end - - # source://unparser//lib/unparser/validation.rb#118 - def node_diff_report; end - - # source://unparser//lib/unparser/validation.rb#110 - def report_exception(exception); end - - class << self - # source://unparser//lib/unparser/anima.rb#140 - def anima; end - - # Create validator from node - # - # @param original_node [Parser::AST::Node] - # @return [Validator] - # - # source://unparser//lib/unparser/validation.rb#79 - def from_node(original_node); end - - # Create validator from file - # - # @param path [Pathname] - # @return [Validator] - # - # source://unparser//lib/unparser/validation.rb#100 - def from_path(path); end - - # Create validator from string - # - # @param original_source [String] - # @return [Validator] - # - # source://unparser//lib/unparser/validation.rb#53 - def from_string(original_source); end - - private - - # source://unparser//lib/unparser/validation.rb#133 - def const_unit(_value); end - end -end - -# source://unparser//lib/unparser/validation.rb#136 -class Unparser::Validation::Literal < ::Unparser::Validation - # source://unparser//lib/unparser/validation.rb#141 - def report; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/validation.rb#137 - def success?; end - - private - - # source://unparser//lib/unparser/validation.rb#156 - def source_diff_report; end -end - -# source://unparser//lib/unparser/writer.rb#4 -module Unparser::Writer - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - - mixes_in_class_methods ::Unparser::DSL - - class << self - # @private - # - # source://unparser//lib/unparser/writer.rb#7 - def included(descendant); end - end -end - -# source://unparser//lib/unparser/writer/binary.rb#5 -class Unparser::Writer::Binary - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Writer - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - extend ::Unparser::DSL - - # source://unparser//lib/unparser/anima.rb#146 - def buffer; end - - # source://unparser//lib/unparser/anima.rb#146 - def comments; end - - # source://unparser//lib/unparser/writer/binary.rb#54 - def dispatch; end - - # source://unparser//lib/unparser/writer/binary.rb#46 - def emit_operator; end - - # source://unparser//lib/unparser/anima.rb#146 - def local_variable_scope; end - - # source://unparser//lib/unparser/anima.rb#146 - def node; end - - # source://unparser//lib/unparser/writer/binary.rb#50 - def symbol_name; end - - private - - # source://unparser//lib/unparser/writer/binary.rb#62 - def effective_symbol; end - - # source://unparser//lib/unparser/writer/binary.rb#74 - def emit_with(map); end - - # source://unparser//lib/unparser/writer/binary.rb#80 - def keyword_symbol; end - - # source://unparser//lib/unparser/dsl.rb#18 - def left; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def left_emitter(&block); end - - # source://unparser//lib/unparser/writer/binary.rb#84 - def operator_symbol; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def right; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def right_emitter(&block); end - - class << self - # source://unparser//lib/unparser/anima.rb#140 - def anima; end - end -end - -# source://unparser//lib/unparser/writer/binary.rb#22 -Unparser::Writer::Binary::KEYWORD_SYMBOLS = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/writer/binary.rb#16 -Unparser::Writer::Binary::KEYWORD_TOKENS = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/writer/binary.rb#34 -Unparser::Writer::Binary::MAP = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/writer/binary.rb#42 -Unparser::Writer::Binary::NEED_KEYWORD = T.let(T.unsafe(nil), Array) - -# source://unparser//lib/unparser/writer/binary.rb#28 -Unparser::Writer::Binary::OPERATOR_SYMBOLS = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/writer/binary.rb#10 -Unparser::Writer::Binary::OPERATOR_TOKENS = T.let(T.unsafe(nil), Hash) - -# source://unparser//lib/unparser/writer/dynamic_string.rb#5 -class Unparser::Writer::DynamicString - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Writer - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - extend ::Unparser::DSL - - # source://unparser//lib/unparser/anima.rb#146 - def buffer; end - - # source://unparser//lib/unparser/anima.rb#146 - def comments; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#32 - def dispatch; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#25 - def emit_heredoc_reminder; end - - # source://unparser//lib/unparser/anima.rb#146 - def local_variable_scope; end - - # source://unparser//lib/unparser/anima.rb#146 - def node; end - - private - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#159 - def breakpoint?(child, current); end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#63 - def classify(node); end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#71 - def classify_str(node); end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#193 - def emit_body(children); end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#149 - def emit_dstr; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#132 - def emit_dynamic(child); end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#145 - def emit_dynamic_component(node); end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#54 - def emit_heredoc_body; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#59 - def emit_heredoc_footer; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#50 - def emit_heredoc_header; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#116 - def emit_normal_heredoc_body; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#185 - def emit_segment(children, index); end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#128 - def escape_dynamic(string); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#46 - def heredoc?; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#42 - def heredoc_header; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#95 - def heredoc_pattern?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#105 - def heredoc_pattern_2?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#99 - def heredoc_pattern_3?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#111 - def nl_last_child?; end - - # source://unparser//lib/unparser/writer/dynamic_string.rb#169 - def segments; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#87 - def str_empty?(node); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#83 - def str_nl?(node); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/dynamic_string.rb#91 - def str_ws?(node); end - - class << self - # source://unparser//lib/unparser/anima.rb#140 - def anima; end - end -end - -# source://unparser//lib/unparser/writer/dynamic_string.rb#21 -Unparser::Writer::DynamicString::FLAT_INTERPOLATION = T.let(T.unsafe(nil), Set) - -# source://unparser//lib/unparser/writer/dynamic_string.rb#8 -Unparser::Writer::DynamicString::PATTERNS_2 = T.let(T.unsafe(nil), Array) - -# source://unparser//lib/unparser/writer/dynamic_string.rb#14 -Unparser::Writer::DynamicString::PATTERNS_3 = T.let(T.unsafe(nil), Array) - -# Writer for rescue bodies -# -# source://unparser//lib/unparser/writer/resbody.rb#6 -class Unparser::Writer::Resbody - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Writer - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - extend ::Unparser::DSL - - # source://unparser//lib/unparser/anima.rb#146 - def buffer; end - - # source://unparser//lib/unparser/anima.rb#146 - def comments; end - - # source://unparser//lib/unparser/writer/resbody.rb#11 - def emit_postcontrol; end - - # source://unparser//lib/unparser/writer/resbody.rb#16 - def emit_regular; end - - # source://unparser//lib/unparser/anima.rb#146 - def local_variable_scope; end - - # source://unparser//lib/unparser/anima.rb#146 - def node; end - - private - - # source://unparser//lib/unparser/dsl.rb#18 - def assignment; end - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/writer/resbody.rb#32 - def emit_assignment; end - - # source://unparser//lib/unparser/writer/resbody.rb#25 - def emit_exception; end - - # source://unparser//lib/unparser/dsl.rb#18 - def exception; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - class << self - # source://unparser//lib/unparser/anima.rb#140 - def anima; end - end -end - -# source://unparser//lib/unparser/writer/rescue.rb#5 -class Unparser::Writer::Rescue - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Writer - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - extend ::Unparser::DSL - - # source://unparser//lib/unparser/anima.rb#146 - def buffer; end - - # source://unparser//lib/unparser/anima.rb#146 - def comments; end - - # source://unparser//lib/unparser/writer/rescue.rb#23 - def emit_heredoc_reminders; end - - # source://unparser//lib/unparser/writer/rescue.rb#27 - def emit_postcontrol; end - - # source://unparser//lib/unparser/writer/rescue.rb#12 - def emit_regular; end - - # source://unparser//lib/unparser/anima.rb#146 - def local_variable_scope; end - - # source://unparser//lib/unparser/anima.rb#146 - def node; end - - private - - # source://unparser//lib/unparser/dsl.rb#18 - def body; end - - # source://unparser//lib/unparser/writer/rescue.rb#34 - def else_node; end - - # source://unparser//lib/unparser/writer/rescue.rb#38 - def emit_rescue_body(node); end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def rescue_bodies(&block); end - - # source://unparser//lib/unparser/dsl.rb#18 - def rescue_body; end - - class << self - # source://unparser//lib/unparser/anima.rb#140 - def anima; end - end -end - -# Writer for send -# -# source://unparser//lib/unparser/writer/send.rb#6 -class Unparser::Writer::Send - include ::Unparser::NodeHelpers - include ::Unparser::Generation - include ::Unparser::Constants - include ::Unparser::Adamantium - include ::Unparser::Adamantium::InstanceMethods - include ::Unparser::Writer - include ::Unparser::Anima::InstanceMethods - include ::Unparser::Equalizer::Methods - extend ::Unparser::Adamantium::ModuleMethods - extend ::Unparser::Adamantium::ClassMethods - extend ::Unparser::DSL - - # source://unparser//lib/unparser/anima.rb#146 - def buffer; end - - # source://unparser//lib/unparser/anima.rb#146 - def comments; end - - # source://unparser//lib/unparser/writer/send.rb#21 - def dispatch; end - - # source://unparser//lib/unparser/writer/send.rb#33 - def emit_heredoc_reminders; end - - # source://unparser//lib/unparser/writer/send.rb#25 - def emit_mlhs; end - - # source://unparser//lib/unparser/writer/send.rb#29 - def emit_selector; end - - # source://unparser//lib/unparser/anima.rb#146 - def local_variable_scope; end - - # source://unparser//lib/unparser/anima.rb#146 - def node; end - - private - - # source://unparser//lib/unparser/writer/send.rb#73 - def arguments; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/send.rb#85 - def avoid_clash?; end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def details(&block); end - - # source://unparser//lib/unparser/adamantium/method_builder.rb#87 - def effective_writer(&block); end - - # source://unparser//lib/unparser/writer/send.rb#45 - def effective_writer_class; end - - # source://unparser//lib/unparser/writer/send.rb#65 - def emit_arguments; end - - # source://unparser//lib/unparser/writer/send.rb#81 - def emit_heredoc_reminder(argument); end - - # source://unparser//lib/unparser/writer/send.rb#77 - def emit_normal_arguments; end - - # source://unparser//lib/unparser/writer/send.rb#61 - def emit_operator; end - - # source://unparser//lib/unparser/writer/send.rb#106 - def emit_send_regular(node); end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/send.rb#89 - def local_variable_clash?; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/send.rb#93 - def parses_as_constant?; end - - # source://unparser//lib/unparser/dsl.rb#18 - def receiver; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def selector; end - - # @return [Boolean] - # - # source://unparser//lib/unparser/writer/send.rb#57 - def write_as_attribute_assignment?; end - - class << self - # source://unparser//lib/unparser/anima.rb#140 - def anima; end - end -end - -# Writer for send as attribute assignment -# -# source://unparser//lib/unparser/writer/send/attribute_assignment.rb#7 -class Unparser::Writer::Send::AttributeAssignment < ::Unparser::Writer::Send - # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#10 - def dispatch; end - - # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#22 - def emit_send_mlhs; end - - private - - # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#34 - def emit_attribute; end - - # source://unparser//lib/unparser/writer/send/attribute_assignment.rb#29 - def emit_receiver; end - - # source://unparser//lib/unparser/dsl.rb#18 - def first_argument; end - - # source://unparser//lib/unparser/dsl.rb#18 - def receiver; end - - # source://unparser//lib/unparser/dsl.rb#11 - def remaining_children; end - - # source://unparser//lib/unparser/dsl.rb#18 - def selector; end -end - -# Writer for binary sends -# -# source://unparser//lib/unparser/writer/send/binary.rb#7 -class Unparser::Writer::Send::Binary < ::Unparser::Writer::Send - # source://unparser//lib/unparser/writer/send/binary.rb#8 - def dispatch; end - - private - - # source://unparser//lib/unparser/writer/send/binary.rb#16 - def emit_operator; end - - # source://unparser//lib/unparser/writer/send/binary.rb#20 - def emit_right; end -end - -# source://unparser//lib/unparser/writer/send.rb#9 -Unparser::Writer::Send::INDEX_ASSIGN = T.let(T.unsafe(nil), Symbol) - -# source://unparser//lib/unparser/writer/send.rb#10 -Unparser::Writer::Send::INDEX_REFERENCE = T.let(T.unsafe(nil), Symbol) - -# source://unparser//lib/unparser/writer/send.rb#12 -Unparser::Writer::Send::OPERATORS = T.let(T.unsafe(nil), Hash) - -# Writer for "regular" receiver.selector(arguments...) case -# -# source://unparser//lib/unparser/writer/send/regular.rb#7 -class Unparser::Writer::Send::Regular < ::Unparser::Writer::Send - # source://unparser//lib/unparser/writer/send/regular.rb#8 - def dispatch; end - - # source://unparser//lib/unparser/writer/send/regular.rb#18 - def emit_arguments_without_heredoc_body; end - - # source://unparser//lib/unparser/writer/send/regular.rb#22 - def emit_receiver; end - - # source://unparser//lib/unparser/writer/send/regular.rb#14 - def emit_send_mlhs; end -end - -# Writer for unary sends -# -# source://unparser//lib/unparser/writer/send/unary.rb#7 -class Unparser::Writer::Send::Unary < ::Unparser::Writer::Send - # source://unparser//lib/unparser/writer/send/unary.rb#15 - def dispatch; end -end - -# source://unparser//lib/unparser/writer/send/unary.rb#8 -Unparser::Writer::Send::Unary::MAP = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/yard@0.9.32.rbi b/sorbet/rbi/gems/yard@0.9.34.rbi similarity index 100% rename from sorbet/rbi/gems/yard@0.9.32.rbi rename to sorbet/rbi/gems/yard@0.9.34.rbi diff --git a/sorbet/tapioca/config.yml b/sorbet/tapioca/config.yml index 00f87a70..c9926a2d 100644 --- a/sorbet/tapioca/config.yml +++ b/sorbet/tapioca/config.yml @@ -1,14 +1,32 @@ --- gem: -# Add your `gem` command parameters here: -# -# exclude: -# - gem_name -# doc: true -# workers: 5 -dsl: -# Add your `dsl` command parameters here: -# -# exclude: -# - SomeGeneratorName -# workers: 5 + exclude: + - diff-lcs + - docile + - erubi + - json + - language_server-protocol + - netrc + - parallel + - prettier_print + - prism + - racc + - rainbow + - rbi + - redcarpet + - rexml + - rubocop-capybara + - rubocop-factory_bot + - rubocop-packaging + - rubocop-performance + - rubocop-rake + - rubocop-rspec + - rubocop-sorbet + - ruby-progressbar + - simplecov-html + - simplecov_json_formatter + - spoom + - syntax_tree + - tapioca + - thor + - unicode-display_width diff --git a/yard-sorbet.gemspec b/yard-sorbet.gemspec index da1a1fc7..125d5402 100644 --- a/yard-sorbet.gemspec +++ b/yard-sorbet.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |spec| spec.summary = 'Create YARD docs from Sorbet type signatures' spec.description = 'A YARD plugin that incorporates Sorbet type information' spec.homepage = 'https://github.com/dduugg/yard-sorbet' - spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0') + spec.required_ruby_version = Gem::Requirement.new('>= 3.0') spec.metadata = { 'bug_tracker_uri' => "#{spec.homepage}/issues", diff --git a/yard/magic_comment_handler.rb b/yard/magic_comment_handler.rb index 578b890b..ee498649 100644 --- a/yard/magic_comment_handler.rb +++ b/yard/magic_comment_handler.rb @@ -8,7 +8,7 @@ class MagicCommentHandler < YARD::Handlers::Ruby::Base extend T::Sig # File header regexp that matches magic comments - FILE_HEADER = T.let(/\Atyped: [[:alpha:]]+\nfrozen_string_literal: [[:alpha:]]+/.freeze, Regexp) + FILE_HEADER = T.let(/\Atyped: [[:alpha:]]+\nfrozen_string_literal: [[:alpha:]]+/, Regexp) handles :class, :module namespace_only